Ejemplo n.º 1
0
    def all_lists(self):
        if not hasattr(self, '_all_lists'):
            xml = SP.GetListCollection()
            result = self.opener.post_soap(LIST_WEBSERVICE, xml)

            self._all_lists = []
            for list_element in result.xpath(
                    'sp:GetListCollectionResult/sp:Lists/sp:List',
                    namespaces=namespaces):
                self._all_lists.append(
                    SharePointList(self.opener, self, list_element))

            # Explicitly request information about the UserInfo list.
            # This can be accessed with the name "User Information List"
            result = self.opener.post_soap(LIST_WEBSERVICE,
                                           SP.GetList(SP.listName("UserInfo")))
            list_element = result.xpath('.//sp:List', namespaces=namespaces)[0]
            self._all_lists.append(
                SharePointList(self.opener, self, list_element))

        return self._all_lists
Ejemplo n.º 2
0
 def settings(self):
     if self._settings is None or not len(self._settings):
         xml = SP.GetList(SP.listName(self.id))
         response = self.opener.post_soap(LIST_WEBSERVICE, xml)
         self._settings = response[0][0]
     return self._settings