MCPcopy Index your code
hub / github.com/O365/python-o365 / get_version

Method get_version

O365/drive.py:819–839  ·  view source on GitHub ↗

Returns a version for specified id :return: a version object of specified id :rtype: DriveItemVersion

(self, version_id)

Source from the content-addressed store, hash-verified

817 for item in data.get('value', [])]
818
819 def get_version(self, version_id):
820 """ Returns a version for specified id
821
822 :return: a version object of specified id
823 :rtype: DriveItemVersion
824 """
825 if not self.object_id:
826 return None
827
828 url = self.build_url(
829 self._endpoints.get('version').format(id=self.object_id,
830 version_id=version_id))
831
832 response = self.con.get(url)
833 if not response:
834 return None
835
836 data = response.json()
837
838 # Everything received from cloud must be passed as self._cloud_data_key
839 return DriveItemVersion(parent=self, **{self._cloud_data_key: data})
840
841 def share_with_link(self, share_type='view', share_scope='anonymous', share_password=None, share_expiration_date=None):
842 """ Creates or returns a link you can share with others

Callers

nothing calls this directly

Calls 4

DriveItemVersionClass · 0.85
build_urlMethod · 0.80
jsonMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected