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

Method get_items

O365/drive.py:1533–1556  ·  view source on GitHub ↗

Returns a collection of drive items from the root folder :param int limit: max no. of items to get. Over 999 uses batch. :param query: applies a OData filter to the request :type query: Query or str :param order_by: orders the result set based on this condition

(self, limit=None, *, query=None, order_by=None, batch=None)

Source from the content-addressed store, hash-verified

1531 return items
1532
1533 def get_items(self, limit=None, *, query=None, order_by=None, batch=None):
1534 """ Returns a collection of drive items from the root folder
1535
1536 :param int limit: max no. of items to get. Over 999 uses batch.
1537 :param query: applies a OData filter to the request
1538 :type query: Query or str
1539 :param order_by: orders the result set based on this condition
1540 :type order_by: Query or str
1541 :param int batch: batch size, retrieves items in
1542 batches allowing to retrieve more items than the limit.
1543 :return: items in this folder
1544 :rtype: generator of DriveItem or Pagination
1545 """
1546
1547 if self.object_id:
1548 # reference the current drive_id
1549 url = self.build_url(
1550 self._endpoints.get('list_items').format(id=self.object_id))
1551 else:
1552 # we don't know the drive_id so go to the default
1553 url = self.build_url(self._endpoints.get('list_items_default'))
1554
1555 return self._base_get_list(url, limit=limit, query=query,
1556 order_by=order_by, batch=batch)
1557
1558 def get_child_folders(self, limit=None, *, query=None, order_by=None, batch=None):
1559 """ Returns all the folders inside this folder

Callers 5

get_child_foldersMethod · 0.95
get_folder_from_pathMethod · 0.45
download_fileMethod · 0.45
_get_child_folderMethod · 0.45
_download_folderMethod · 0.45

Calls 3

_base_get_listMethod · 0.95
build_urlMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected