def drive(self): """Retrieve the properties and relationships of a Drive resource.""" if self.is_property_available('drive'): return self.properties['drive'] else: return Drive(self.context, ResourcePath("drive", self.resourcePath))
def drive(self): """The default drive (document library) for this site.""" if self.is_property_available('drive'): return self.properties['drive'] else: return Drive(self.context, ResourcePath("drive", self.resourcePath))
def drive(self): """Only present on document libraries. Allows access to the list as a drive resource with driveItems.""" if self.is_property_available('drive'): return self.properties['drive'] else: from office365.onedrive.drive import Drive return Drive(self.context, ResourcePath("drive", self.resourcePath))
def __getitem__(self, key): """ :param key: key is used to address a Drive resource by either an index in collection or by drive id :type key: int or str """ if type(key) == int: return super(DriveCollection, self).__getitem__(key) return Drive(self.context, ResourcePath(key, self.resource_path))
def drive(self): """Retrieve the properties and relationships of a Drive resource.""" return self.properties.get( 'drive', Drive(self.context, ResourcePath("drive", self.resource_path)))
def get_by_id(self, drive_id): """Retrieve Drive by unique identifier""" return Drive( self.context, ResourcePathEntity(self.context, self.resource_path, drive_id))
def get_by_id(self, url): """Retrieve DriveItem by url""" return Drive(self.context, ResourcePathEntity(self.context, self.resourcePath, url))
def drive(self): """Only present on document libraries. Allows access to the list as a drive resource with driveItems.""" from office365.onedrive.drive import Drive return self.properties.get( 'drive', Drive(self.context, ResourcePath("drive", self.resource_path)))