MCPcopy Create free account
hub / github.com/O365/python-o365 / get_drives

Method get_drives

O365/drive.py:1918–1934  ·  view source on GitHub ↗

Returns a collection of drives

(self)

Source from the content-addressed store, hash-verified

1916 **{self._cloud_data_key: drive})
1917
1918 def get_drives(self):
1919 """ Returns a collection of drives"""
1920
1921 url = self.build_url(self._endpoints.get('list_drives'))
1922
1923 response = self.con.get(url)
1924
1925 if not response:
1926 return []
1927
1928 data = response.json()
1929
1930 # Everything received from cloud must be passed as self._cloud_data_key
1931 drives = [self.drive_constructor(parent=self, **{self._cloud_data_key: drive}) for
1932 drive in data.get('value', [])]
1933
1934 return drives

Callers 2

__init__Method · 0.80

Calls 3

build_urlMethod · 0.80
jsonMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected