Esempio n. 1
0
 def driveItem(self):
     """For document libraries, the driveItem relationship exposes the listItem as a driveItem."""
     from office365.onedrive.driveItem import DriveItem
     return self.properties.get(
         'driveItem',
         DriveItem(self.context,
                   ResourcePath("driveItem", self.resource_path)))
 def __init__(self, parent_entity, name, content):
     from office365.onedrive.driveItem import DriveItem
     return_type = DriveItem(
         parent_entity.context,
         ResourcePathUrl(name, parent_entity.resource_path))
     super(UploadContentQuery, self).__init__(return_type, "content", None,
                                              content, None, return_type)
 def driveItem(self):
     """For document libraries, the driveItem relationship exposes the listItem as a driveItem."""
     if self.is_property_available('driveItem'):
         return self.properties['driveItem']
     else:
         from office365.onedrive.driveItem import DriveItem
         return DriveItem(self.context, ResourcePath("driveItem", self.resource_path))
Esempio n. 4
0
 def root(self):
     """The root folder of the drive."""
     if self.is_property_available("root"):
         return self.properties['root']
     else:
         return DriveItem(self.context,
                          ResourcePath("root", self.resource_path))
Esempio n. 5
0
 def get_by_url(self, url):
     """Retrieve DriveItem by url"""
     return DriveItem(self.context, ResourcePathUrl(url, self.resource_path))
Esempio n. 6
0
 def get_by_id(self, _id):
     """Retrieve DriveItem by id"""
     return DriveItem(self.context, ResourcePath(_id, self.resource_path))
 def __init__(self, parent_entity, name, content):
     return_type = DriveItem(
         parent_entity.context,
         ResourcePathUrl(name, parent_entity.resourcePath))
     super(UploadContentQuery, self).__init__(return_type, "content", None,
                                              content, None, return_type)
 def filesFolder(self):
     """Get the metadata for the location where the files of a channel are stored."""
     return self.properties.get(
         'filesFolder',
         DriveItem(self.context,
                   ResourcePath("filesFolder", self.resource_path)))
Esempio n. 9
0
 def get_by_id(self, _id):
     """Retrieve DriveItem by id"""
     return DriveItem(self.context,
                      ResourcePathEntity(self.context, self.resourcePath, _id))
Esempio n. 10
0
 def root(self):
     """The root folder of the drive."""
     return self.properties.get('root', DriveItem(self.context, ResourcePath("root", self.resource_path)))