Commit c767a32
✨ Add AccountService rated content and lists endpoints (#261)
* ✨ Add AccountService rated content and lists endpoints
Add 5 new methods to AccountService for retrieving user's rated content and custom lists:
**New Models:**
- ✨ Created `RatedSort` enum for sorting rated content
- ✨ Created `TVEpisodePageableList` typealias for pageable episode lists
- ✨ Created `MediaListPageableList` typealias for pageable list results
**New Service Methods:**
- ✨ Added `ratedMovies(sortedBy:page:accountID:session:)` - Get user's rated movies
- ✨ Added `ratedTVSeries(sortedBy:page:accountID:session:)` - Get user's rated TV series
- ✨ Added `ratedTVEpisodes(sortedBy:page:accountID:session:)` - Get user's rated TV episodes
- ✨ Added `lists(page:accountID:session:)` - Get user's custom lists
**New Request Classes:**
- ✨ Created `RatedMoviesRequest` for rated movies endpoint
- ✨ Created `RatedTVSeriesRequest` for rated TV series endpoint
- ✨ Created `RatedTVEpisodesRequest` for rated TV episodes endpoint
- ✨ Created `AccountListsRequest` for user lists endpoint
**Tests:**
- ✅ Added comprehensive unit tests with mock data for all new methods
- ✅ Added integration tests for rated content and lists retrieval
- ✅ All AccountService tests passing
**Documentation:**
- 📚 Updated `AccountService.md` with new method groups
- 📚 Added new models to `TMDb.md` documentation catalog
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* 🐛 Fix test build issues and file length violation
- Use #require() to unwrap optional page property in integration tests
- Remove duplicate MediaListPageableList typealias (use existing MediaListSummaryPageableList)
- Split AccountService.swift to meet 400-line limit (move defaults to separate file)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Fix
---------
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 70a4a93 commit c767a32
14 files changed
Lines changed: 999 additions & 57 deletions
File tree
- Sources/TMDb
- Domain
- Models
- Services/Account
- Requests
- Sorts
- TMDb.docc
- Extensions
- Tests
- TMDbIntegrationTests
- TMDbTests
- Domain/Services/Account
- Mocks/Models
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
Lines changed: 225 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
Lines changed: 23 additions & 57 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | 235 | | |
240 | | - | |
| 236 | + | |
241 | 237 | | |
242 | 238 | | |
243 | 239 | | |
| |||
247 | 243 | | |
248 | 244 | | |
249 | 245 | | |
250 | | - | |
| 246 | + | |
251 | 247 | | |
252 | | - | |
253 | | - | |
254 | | - | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
255 | 251 | | |
256 | 252 | | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
| 253 | + | |
265 | 254 | | |
266 | 255 | | |
267 | | - | |
| 256 | + | |
268 | 257 | | |
269 | 258 | | |
270 | 259 | | |
| |||
274 | 263 | | |
275 | 264 | | |
276 | 265 | | |
277 | | - | |
| 266 | + | |
278 | 267 | | |
279 | | - | |
280 | | - | |
281 | | - | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
282 | 271 | | |
283 | 272 | | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
| 273 | + | |
292 | 274 | | |
293 | 275 | | |
294 | | - | |
| 276 | + | |
295 | 277 | | |
296 | 278 | | |
297 | 279 | | |
| |||
301 | 283 | | |
302 | 284 | | |
303 | 285 | | |
304 | | - | |
| 286 | + | |
305 | 287 | | |
306 | | - | |
307 | | - | |
308 | | - | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
309 | 291 | | |
310 | 292 | | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
| 293 | + | |
319 | 294 | | |
320 | 295 | | |
321 | | - | |
| 296 | + | |
322 | 297 | | |
323 | 298 | | |
324 | | - | |
325 | 299 | | |
326 | 300 | | |
327 | 301 | | |
328 | 302 | | |
329 | 303 | | |
330 | 304 | | |
331 | | - | |
| 305 | + | |
332 | 306 | | |
333 | | - | |
334 | | - | |
335 | | - | |
| 307 | + | |
| 308 | + | |
336 | 309 | | |
337 | 310 | | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
| 311 | + | |
346 | 312 | | |
347 | 313 | | |
0 commit comments