def get_by_id(self, list_id): """Retrieve List client object by id :type list_id: str """ return List(self.context, ResourcePathServiceOperation("GetById", [list_id], self.resource_path))
def ensure_events_list(self): events_list = List(self.context) self.add_child(events_list) qry = ServiceOperationQuery(self, "EnsureEventsList", None, None, None, events_list) self.context.add_query(qry) return events_list
def ensure_site_pages_library(self): """Gets a list that is the default location for wiki pages.""" target_list = List(self.context) self.add_child(target_list) qry = ServiceOperationQuery(self, "ensureSitePagesLibrary", None, None, None, target_list) self.context.add_query(qry) return target_list
def get_by_title(self, list_title): """Retrieve List client object by title :type list_title: str """ return List(self.context, ResourcePathServiceOperation("GetByTitle", [list_title], self.resource_path))
def parent_list(self): """Get parent List""" if self.is_property_available("ParentList"): return self.properties["ParentList"] else: from office365.sharepoint.lists.list import List return List(self.context, ResourcePath("ParentList", self.resource_path))
def get_list_using_path(self, decoded_url): return_list = List(self.context) self.lists.add_child(return_list) from office365.sharepoint.types.resource_path import ResourcePath as SPResPath qry = ServiceOperationQuery(self, "GetListUsingPath", SPResPath(decoded_url), None, None, return_list) self.context.add_query(qry) return return_list
def get_list(self, url): """Get list by url :type url: str """ return List(self.context, ResourcePathServiceOperation("getList", [url], self.resource_path))
def get_catalog(self, type_catalog): """Specifies the list template gallery, site template gallery, Web Part gallery, master page gallery, or other galleries from the site collection, including custom galleries that are defined by users. :type type_catalog: int""" return List( self.context, ResourcePathServiceOperation("getCatalog", [type_catalog], self.resource_path))
def ensure_site_assets_library(self): """Gets a list that is the default asset location for images or other files, which the users upload to their wiki pages.""" target_list = List(self.context) self.add_child(target_list) qry = ServiceOperationQuery(self, "ensureSiteAssetsLibrary", None, None, None, target_list) self.context.add_query(qry) return target_list
def ensure_events_list(self): """Returns a list that is designated as a default location for events.""" return_type = List(self.context) self.add_child(return_type) qry = ServiceOperationQuery(self, "EnsureEventsList", None, None, None, return_type) self.context.add_query(qry) return return_type
def get_by_id(self, list_id): """ Returns the list with the specified list identifier. :param str list_id: Specifies the list identifier """ return List( self.context, ServiceOperationPath("GetById", [list_id], self.resource_path))
def get_catalog(self, type_catalog): """Gets the list template gallery, site template gallery, or Web Part gallery for the Web site. :param int type_catalog: The type of the gallery. """ return List( self.context, ResourcePathServiceOperation("getCatalog", [type_catalog], self.resource_path))
def add(self, list_creation_information): """Creates a List resource :type list_creation_information: ListCreationInformation """ target_list = List(self.context) self.add_child(target_list) qry = CreateEntityQuery(self, list_creation_information, target_list) self.context.add_query(qry) return target_list
def add(self, list_creation_information): """Creates a List resource :type list_creation_information: office365.sharepoint.lists.creation_information.ListCreationInformation """ return_type = List(self.context) self.add_child(return_type) qry = CreateEntityQuery(self, list_creation_information, return_type) self.context.add_query(qry) return return_type
def get_list_using_path(self, decoded_url): """ :type decoded_url: str """ return_list = List(self.context) self.lists.add_child(return_list) qry = ServiceOperationQuery(self, "GetListUsingPath", SPResPath(decoded_url), None, None, return_list) self.context.add_query(qry) return return_list
def default_document_library(self): """Retrieves the default document library.""" return List(self.context, ResourcePathServiceOperation("defaultDocumentLibrary", None, self.resource_path))
def site_user_info_list(self): return self.properties.get('SiteUserInfoList', List(self.context, ResourcePath("SiteUserInfoList", self.resource_path)))
def list(self): """Gets list object that represents List for the alert.""" from office365.sharepoint.lists.list import List return self.properties.get( 'List', List(self.context, ResourcePath("list", self.resource_path)))
def parent_list(self): """Get parent List""" from office365.sharepoint.lists.list import List return self.properties.get( "ParentList", List(self.context, ResourcePath("ParentList", self.resource_path)))
def lookup_list(self): """Specifies the List that the corresponding Lookup Field looks up to.""" from office365.sharepoint.lists.list import List return self.properties.get( "LookupList", List(self.context, ResourcePath("LookupList", self.resource_path)))