We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9e8786e + da8c2b1 commit ade59bdCopy full SHA for ade59bd
1 file changed
README.md
@@ -138,6 +138,26 @@ LetterboxdAPI.shared.getMemberWatchlist(withId: "id") { result in
138
}
139
```
140
141
+### Run a query for any endpoint
142
+``` swift
143
+struct List: Decodable {
144
+ var id: String
145
+ var name: String
146
+}
147
+
148
+LetterboxdAPI.shared.query(path: "/list/coMSs", parameters: [:]) { (result: Result<List, Error>) in
149
+ switch result {
150
+ case .success(let list):
151
+ // list is of type List, declared a few lines above
152
+ print(list.id)
153
154
+ case .failure(let error):
155
+ // error may be of type LetterboxdAPIError
156
+ print(error)
157
+ }
158
159
+```
160
161
## Contributing
162
163
- If you need help or you'd like to ask a general question, open an issue.
0 commit comments