Returns a version for specified id :return: a version object of specified id :rtype: DriveItemVersion
(self, version_id)
| 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 |
nothing calls this directly
no test coverage detected