@@ -90,6 +90,13 @@ def new(self, result):
90
90
91
91
92
92
class PaginationList (ListBase ):
93
+ """
94
+ Pagination lists are used to return a paginated list of Objects.
95
+
96
+ You can use the `has_next` and `get_next` methods to get the next page of result data from the API.
97
+ The `has_previous` and `get_previous` methods return the previous page.
98
+ """
99
+
93
100
_parent : "ResourceBase"
94
101
95
102
def __init__ (self , result : Any , parent : "ResourceBase" , client : "Client" ):
@@ -105,15 +112,15 @@ def __init__(self, result: Any, parent: "ResourceBase", client: "Client"):
105
112
super ().__init__ (result , client )
106
113
107
114
def get_next (self ):
108
- """Return the next set of objects in an ObjectList ."""
115
+ """Return the next set of objects in the paginated list ."""
109
116
url = self ._get_link ("next" )
110
117
if url is None :
111
118
return None
112
119
resp = self ._parent .perform_api_call (self ._parent .REST_READ , url )
113
120
return PaginationList (resp , self ._parent , self .client )
114
121
115
122
def get_previous (self ):
116
- """Return the previous set of objects in an ObjectList ."""
123
+ """Return the previous set of objects in the paginated list ."""
117
124
url = self ._get_link ("previous" )
118
125
if url is None :
119
126
return None
@@ -129,6 +136,12 @@ def new(self, result):
129
136
130
137
131
138
class ObjectList (ListBase ):
139
+ """
140
+ Object lists are used to return an embedded list on an object.
141
+
142
+ It works to similar to PaginationList, but has no pagination (as all data is already embedded).
143
+ """
144
+
132
145
_object_type : Type [ObjectBase ]
133
146
134
147
def __init__ (self , result : Any , object_type : Type [ObjectBase ], client : Optional ["Client" ] = None ):
0 commit comments