Commit 03c6406
✨ Add Movie Service missing endpoints and models (#259)
* 🔧 Add .worktrees/ to .gitignore
Add worktree directory to .gitignore to prevent accidentally committing
worktree contents when working on multiple features in parallel.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* ✨ Add Movie Service missing endpoints and models
Implement Plan 1: Movie Service Additions - adds 9 missing endpoints to
achieve 100% API coverage for Movie Service.
**New Models:**
- AccountStates - User rating, favorite, and watchlist state
- AlternativeTitle - Alternative titles by country
- Translation<T> - Generic translation model
- MovieTranslationData - Movie-specific translation data
- Change models - Change tracking for sync/caching
- AnyCodable - Type-erased codable for dynamic JSON values
**New Methods:**
- accountStates(forMovie:session:) - Get user interaction state
- addRating(_:toMovie:session:) - Add movie rating
- deleteRating(forMovie:session:) - Delete movie rating
- alternativeTitles(forMovie:country:language:) - Get alternative titles
- translations(forMovie:) - Get movie translations
- lists(forMovie:page:language:) - Get lists containing movie
- changes(forMovie:startDate:endDate:page:) - Get movie change history
- latest() - Get latest movie added to TMDb
- changes(startDate:endDate:page:) - Get changed movie IDs
**Tests:**
- Added comprehensive model tests with JSON fixtures
- All 1530 unit tests pass
- Uses #require() instead of force unwrapping
**Documentation:**
- Updated MovieService.md with new method groups
- Added all new models to TMDb.md
- Documentation builds without warnings
**API Coverage:**
- Before: 15/24 endpoints (63%)
- After: 24/24 endpoints (100%)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* 🐛 Fix linting issues in Movie Service
- Fix opening brace spacing in Translation.swift (lines 14 and 84)
- Disable type_body_length warning for TMDbMovieService (302 lines with 24+ methods)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* 🎨 Apply code formatting and fix linting issues
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Add missing tests
* Fix integration tests
---------
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 89bc29f commit 03c6406
48 files changed
Lines changed: 2641 additions & 3 deletions
File tree
- Sources/TMDb
- Domain
- APIClient
- Models
- Services/Movies
- Requests
- Extensions
- TMDb.docc
- Extensions
- Tests
- TMDbIntegrationTests
- TMDbTests
- Domain
- Models
- Services/Movies
- Mocks/Models
- Resources/json
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
59 | 62 | | |
60 | 63 | | |
| 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 | + | |
| 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 | + | |
0 commit comments