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)
| 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 |
no test coverage detected