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

Method refresh

O365/drive.py:1733–1753  ·  view source on GitHub ↗

Updates this drive with data from the server :return: Success / Failure :rtype: bool

(self)

Source from the content-addressed store, hash-verified

1731 return File
1732
1733 def refresh(self):
1734 """ Updates this drive with data from the server
1735
1736 :return: Success / Failure
1737 :rtype: bool
1738 """
1739
1740 if self.object_id is None:
1741 url = self.build_url(self._endpoints.get('default_drive'))
1742 else:
1743 url = self.build_url(
1744 self._endpoints.get('get_drive').format(id=self.object_id))
1745
1746 response = self.con.get(url)
1747 if not response:
1748 return False
1749
1750 drive = response.json()
1751
1752 self._update_data({self._cloud_data_key: drive})
1753 return True
1754
1755 def search(self, search_text, limit=None, *, query=None, order_by=None,
1756 batch=None):

Callers

nothing calls this directly

Calls 4

_update_dataMethod · 0.95
build_urlMethod · 0.80
jsonMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected