Get an instance to handle file storage (OneDrive / Sharepoint) for the specified account resource :param resource: Custom resource to be used in this drive object (Defaults to parent main_resource) :return: a representation of OneDrive File Storage :r
(self, *, resource: Optional[str] = None)
| 281 | return Schedule(parent=self, main_resource=resource) |
| 282 | |
| 283 | def storage(self, *, resource: Optional[str] = None): |
| 284 | """ Get an instance to handle file storage (OneDrive / Sharepoint) |
| 285 | for the specified account resource |
| 286 | |
| 287 | :param resource: Custom resource to be used in this drive object |
| 288 | (Defaults to parent main_resource) |
| 289 | :return: a representation of OneDrive File Storage |
| 290 | :rtype: Storage |
| 291 | :raises RuntimeError: if protocol doesn't support the feature |
| 292 | """ |
| 293 | if not isinstance(self.protocol, MSGraphProtocol): |
| 294 | # TODO: Custom protocol accessing OneDrive/Sharepoint Api fails here |
| 295 | raise RuntimeError( |
| 296 | 'Drive options only works on Microsoft Graph API') |
| 297 | from .drive import Storage |
| 298 | return Storage(parent=self, main_resource=resource) |
| 299 | |
| 300 | def sharepoint(self, *, resource: str = ''): |
| 301 | """ Get an instance to read information from Sharepoint sites for the |