当前位置: 首页>>代码示例>>Python>>正文


Python SP.listItemID方法代码示例

本文整理汇总了Python中sharepoint.xml.SP.listItemID方法的典型用法代码示例。如果您正苦于以下问题:Python SP.listItemID方法的具体用法?Python SP.listItemID怎么用?Python SP.listItemID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sharepoint.xml.SP的用法示例。


在下文中一共展示了SP.listItemID方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __iter__

# 需要导入模块: from sharepoint.xml import SP [as 别名]
# 或者: from sharepoint.xml.SP import listItemID [as 别名]
    def __iter__(self):
        """
        Returns an iterator over attachments for a list item.

        Implements http://msdn.microsoft.com/en-us/library/websvclists.lists.getattachmentcollection.aspx
        """
        xml = SP.GetAttachmentCollection(SP.listName(self.list_id),
                                         SP.listItemID(str(self.row_id)))
        response = self.opener.post_soap(LIST_WEBSERVICE, xml,
                                         soapaction='http://schemas.microsoft.com/sharepoint/soap/GetAttachmentCollection')
        for url in response.xpath('//sp:Attachment', namespaces=namespaces):
            yield SharePointAttachment(self, url.text)
开发者ID:pierrejochem,项目名称:python-sharepoint,代码行数:14,代码来源:attachments.py

示例2: add

# 需要导入模块: from sharepoint.xml import SP [as 别名]
# 或者: from sharepoint.xml.SP import listItemID [as 别名]
 def add(self, filename, content):
     xml = SP.AddAttachment(SP.listName(self.list_id), SP.listItemID(str(self.row_id)), SP.fileName(filename), SP.attachment(content))
     response = self.opener.post_soap(LIST_WEBSERVICE, xml,
                                      soapaction='http://schemas.microsoft.com/sharepoint/soap/AddAttachment')
开发者ID:pierrejochem,项目名称:python-sharepoint,代码行数:6,代码来源:attachments.py

示例3: delete

# 需要导入模块: from sharepoint.xml import SP [as 别名]
# 或者: from sharepoint.xml.SP import listItemID [as 别名]
 def delete(self, url):
     xml = SP.DeleteAttachment(SP.listName(self.list_id), SP.listItemID(str(self.row_id)), SP.url(url))
     response = self.opener.post_soap(LIST_WEBSERVICE, xml, 
                                      soapaction='http://schemas.microsoft.com/sharepoint/soap/DeleteAttachment')
开发者ID:pierrejochem,项目名称:python-sharepoint,代码行数:6,代码来源:attachments.py


注:本文中的sharepoint.xml.SP.listItemID方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。