boxsdk.pagination package¶
Submodules¶
boxsdk.pagination.box_object_collection module¶
-
class
boxsdk.pagination.box_object_collection.
BoxObjectCollection
(session, url, limit=None, fields=None, additional_params=None, return_full_pages=False)[source]¶ Bases:
_abcoll.Iterator
,object
An iterator that represents a collection of Box objects (BaseObject).
A BoxObjectCollection instance contains everything it needs in order to retrieve and page through responses from Box API endpoints that return collections of Box objects.
This class only has two public methods:
1). next(), which returns either a Page (sequence of BaseObjects) or individual BaseObjects based on the constructor argument ‘return_full_pages’.
2). next_pointer(), which returns the pointer (either an offset or a marker, based on the endpoint) that will be used to retrieve the next page of Box objects. This pointer can be used when requesting new BoxObjectCollection instances that start off from a particular page, instead of from the very beginning.
boxsdk.pagination.dict_page module¶
-
class
boxsdk.pagination.dict_page.
DictPage
(session, response_object)[source]¶ Bases:
boxsdk.pagination.page.Page
boxsdk.pagination.limit_offset_based_dict_collection module¶
-
class
boxsdk.pagination.limit_offset_based_dict_collection.
LimitOffsetBasedDictCollection
(session, url, limit=None, fields=None, additional_params=None, return_full_pages=False, offset=0)[source]¶ Bases:
boxsdk.pagination.limit_offset_based_object_collection.LimitOffsetBasedObjectCollection
Represents a limit/offset-based collection of simple dicts, which are not translated into objects.
boxsdk.pagination.limit_offset_based_object_collection module¶
-
class
boxsdk.pagination.limit_offset_based_object_collection.
LimitOffsetBasedObjectCollection
(session, url, limit=None, fields=None, additional_params=None, return_full_pages=False, offset=0)[source]¶ Bases:
boxsdk.pagination.box_object_collection.BoxObjectCollection
An iterator of Box objects (BaseObjects) that were retrieved from a Box API endpoint that supports limit-offset type of pagination.
See https://developer.box.com/reference#pagination for more details.
boxsdk.pagination.marker_based_dict_collection module¶
-
class
boxsdk.pagination.marker_based_dict_collection.
MarkerBasedDictCollection
(session, url, limit=None, fields=None, additional_params=None, return_full_pages=False, marker=None, supports_limit_offset_paging=False)[source]¶ Bases:
boxsdk.pagination.marker_based_object_collection.MarkerBasedObjectCollection
Represents a marker-based collection of simple dicts, which are not translated into objects.
boxsdk.pagination.marker_based_object_collection module¶
-
class
boxsdk.pagination.marker_based_object_collection.
MarkerBasedObjectCollection
(session, url, limit=None, fields=None, additional_params=None, return_full_pages=False, marker=None, supports_limit_offset_paging=False)[source]¶ Bases:
boxsdk.pagination.box_object_collection.BoxObjectCollection
An iterator of Box objects (BaseObjects) that were retrieved from a Box API endpoint that supports marker type of pagination.
See https://developer.box.com/reference#pagination for more details.
boxsdk.pagination.page module¶
-
class
boxsdk.pagination.page.
Page
(session, response_object)[source]¶ Bases:
_abcoll.Sequence
,object
A sequence of BaseObjects that belong to a page returned from a paging api call.
The Page makes available detailed response data for page requests.
-
response_object
¶ Return a copy of the response object for this Page.
Return type: dict
-