示例#1
0
 def add(self, list_creation_information):
     """Creates a List resource"""
     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 ensure_site_pages_library(self):
     """Gets a list that is the default location for wiki pages."""
     list_site_pages = List(self.context)
     qry = ClientQuery.service_operation_query(self, ActionType.PostMethod,
                                               "ensuresitepageslibrary")
     self.context.add_query(qry, list_site_pages)
     return list_site_pages
示例#3
0
 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 add(self, list_creation_information):
     """Creates a List resource"""
     list_entry = List(self.context)
     qry = ClientQuery.create_entry_query(self, list_creation_information)
     self.context.add_query(qry, list_entry)
     self.add_child(list_entry)
     return list_entry
 def get_list(self, url):
     """Get list by url
     :type url: str
     """
     return List(
         self.context,
         ResourcePathServiceOperation("getList", [url], self.resource_path))
示例#6
0
 def parentList(self):
     """Get parent List"""
     if self.is_property_available("ParentList"):
         return self.properties["ParentList"]
     else:
         from office365.sharepoint.list import List
         return List(self.context, ResourcePath("ParentList", self.resource_path))
示例#7
0
 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."""
     list_site_assets = List(self.context)
     qry = ServiceOperationQuery(self, "ensuresiteassetslibrary")
     self.context.add_query(qry, list_site_assets)
     return list_site_assets
示例#8
0
 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
示例#9
0
 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 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 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 add(self, list_creation_information):
     """Creates a List resource"""
     list_entry = List(self.context)
     list_creation_information._include_metadata = self.include_metadata
     qry = ClientQuery.create_entry_query(self,
                                          list_creation_information.payload)
     self.context.add_query(qry, list_entry)
     self.add_child(list_entry)
     return list_entry
示例#13
0
 def ensure_site_pages_library(self):
     """Gets a list that is the default location for wiki pages."""
     list_site_pages = List(self.context)
     qry = ServiceOperationQuery(self, "ensuresitepageslibrary")
     self.context.add_query(qry, list_site_pages)
     return list_site_pages
示例#14
0
 def get_by_id(self, list_id):
     """Retrieve List client object by id"""
     return List(self.context,
                 ResourcePathServiceOperation(self.context, self.resourcePath, "GetById", [list_id]))