You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## List of files ([API Reference](https://uploadcare.com/api-refs/rest-api/v0.6.0/#operation/filesList?utm_source=github&utm_medium=referral&utm_campaign=uploadcare-swift)) ##
34
34
35
35
```swift
36
-
// Make a query object
37
-
let query =PaginationQuery()
38
-
.stored(true)
39
-
.ordering(.sizeDESC)
40
-
.limit(5)
41
36
// Make a list of files object
42
-
let filesList = uploadcare.list()
43
-
44
-
// Get file list
45
-
filesList.get(withQuery: query) { list, error in
46
-
iflet error = error {
47
-
print(error)
48
-
return
37
+
lazyvar filesList = uploadcare.listOfFiles()
38
+
39
+
funcsomeFilesListMethod() {
40
+
// Make a query object
41
+
let query =PaginationQuery()
42
+
.stored(true)
43
+
.ordering(.sizeDESC)
44
+
.limit(5)
45
+
46
+
// Get file list
47
+
filesList.get(withQuery: query) { list, error in
48
+
iflet error = error {
49
+
print(error)
50
+
return
51
+
}
52
+
53
+
print(list ??"")
49
54
}
50
-
51
-
print(list asAny)
52
55
}
53
56
```
54
57
@@ -270,7 +273,7 @@ uploadcare.getAuthenticatedUrlFromUrl(url) { value, error in
270
273
271
274
// Value is https://cdn.yourdomain.com/{uuid}/?token={token}&expire={timestamp}
272
275
print(value asAny)
273
-
})
276
+
}
274
277
```
275
278
276
279
## List of webhooks ([API Reference](https://uploadcare.com/api-refs/rest-api/v0.6.0/#operation/webhooksList?utm_source=github&utm_medium=referral&utm_campaign=uploadcare-swift)) ##
0 commit comments