Skip to content

Commit 43b61a5

Browse files
authored
Update REST API.md
1 parent 77c15ad commit 43b61a5

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

Documentation/REST API.md

+28-1
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,41 @@ uploadcare.storeFiles(withUUIDs: uuids) { (response, error) in
148148
let query = GroupsListQuery()
149149
.limit(100)
150150
.ordering(.datetimeCreatedDESC)
151-
151+
152152
uploadcare.listOfGroups(withQuery: query) { (list, error) in
153153
if let error = error {
154154
print(error)
155155
return
156156
}
157157
print(list ?? "")
158158
}
159+
160+
// using GroupsList object:
161+
let groupsList = uploadcare.listOfGroups()
162+
163+
groupsList.get(withQuery: query) { (list, error) in
164+
if let error = error {
165+
print(error)
166+
return
167+
}
168+
print(list ?? "")
169+
}
170+
171+
// get next page
172+
groupsList.nextPage { (list, error) in
173+
if let error = error {
174+
print(error)
175+
return
176+
}
177+
}
178+
// get previous page
179+
groupsList.previousPage { (list, error) in
180+
if let error = error {
181+
print(error)
182+
return
183+
}
184+
print(list ?? "")
185+
}
159186
```
160187

161188
### Group info ([API Reference](https://uploadcare.com/api-refs/rest-api/v0.6.0/#operation/groupInfo?utm_source=github&utm_medium=referral&utm_campaign=uploadcare-swift)) ###

0 commit comments

Comments
 (0)