def remove_site(self, site_url): """Deletes the site with the specified URL :param str site_url: A string representing the URL of the site. """ result = SpoOperation(self.context) qry = ServiceOperationQuery(self, "removeSite", [site_url], None, None, result) self.context.add_query(qry) return result
def remove_deleted_site(self, site_url): """Permanently removes the specified deleted site from the recycle bin. :param str site_url: A string representing the URL of the site. """ result = SpoOperation(self.context) qry = ServiceOperationQuery(self, "RemoveDeletedSite", [site_url], None, None, result) self.context.add_query(qry) return result
def create_site(self, site_create_props): """Queues a site collection for creation with the specified properties. :param SiteCreationProperties site_create_props: A SiteCreationProperties object that contains the initial properties of the new site collection. """ result = SpoOperation(self.context) qry = ServiceOperationQuery(self, "CreateSite", None, site_create_props, "siteCreationProperties", result) self.context.add_query(qry) return result
def create_site(self, url, owner, title=None): """Queues a site collection for creation with the specified properties. :param str title: Sets the new site’s title. :param str url: Sets the new site’s URL. :param str owner: Sets the login name of the owner of the new site. """ return_type = SpoOperation(self.context) payload = SiteCreationProperties(title=title, url=url, owner=owner) qry = ServiceOperationQuery(self, "CreateSite", None, payload, "siteCreationProperties", return_type) self.context.add_query(qry) return return_type