Add keyword browsing/filtering and expose alternate titles
CI / lint (push) Canceled after 0s
CI / typecheck (push) Canceled after 0s
CI / unit-tests (push) Canceled after 0s
CI / integration-tests (push) Canceled after 0s
CI / container-build (push) Canceled after 0s
CI / dependency-audit (push) Canceled after 0s
CI / lint (push) Canceled after 0s
CI / typecheck (push) Canceled after 0s
CI / unit-tests (push) Canceled after 0s
CI / integration-tests (push) Canceled after 0s
CI / container-build (push) Canceled after 0s
CI / dependency-audit (push) Canceled after 0s
Keywords were ingested and shown read-only on detail pages, but had no
directory (GET /keywords) or filter param -- the same gap genres had
before today. Mirrors the genre browse pattern exactly: repository,
service, route, plus a `keyword` filter on GET /movies and GET /series.
Alternate/translated titles ("Also Known As") were normalized down to
bare title strings and never written to MovieAlternateTitle/
SeriesAlternateTitle at all. Normalizer now captures country_code + type
per TMDb's actual shape; ingestion writes them; movie/series detail now
expose an alternate_titles list.
Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
e1a36ce227
commit
567b4ef068
+23
-6
@@ -52,12 +52,13 @@ GET /api/v1/search?q=the%20matrix
|
||||
|
||||
`GET /api/v1/movies` browses/discovers without a search query — the
|
||||
complement to `/search` (section 17, additive beyond the spec's minimum
|
||||
endpoint list). Query params: `genre` (an Aurora genre id), `year`
|
||||
(primary release year), `status` (e.g. `released`), `sort_by`
|
||||
(`popularity` default | `release_date` | `vote_average` | `title`),
|
||||
`sort_dir` (`desc` default | `asc`), `page` (default 1), `page_size`
|
||||
(default 20, max 50). An invalid filter value (a malformed genre id, an
|
||||
unknown status) is a 422, not a silently-empty result. Response:
|
||||
endpoint list). Query params: `genre` (an Aurora genre id), `keyword` (an
|
||||
Aurora keyword id), `year` (primary release year), `status` (e.g.
|
||||
`released`), `sort_by` (`popularity` default | `release_date` |
|
||||
`vote_average` | `title`), `sort_dir` (`desc` default | `asc`), `page`
|
||||
(default 1), `page_size` (default 20, max 50). An invalid filter value (a
|
||||
malformed genre/keyword id, an unknown status) is a 422, not a
|
||||
silently-empty result. Response:
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -91,6 +92,7 @@ unknown status) is a 422, not a silently-empty result. Response:
|
||||
"adult": false,
|
||||
"genres": [{ "id": "aur_genre_...", "name": "Action" }],
|
||||
"keywords": [{ "id": "aur_keyword_...", "name": "dystopia" }],
|
||||
"alternate_titles": [{ "title": "Matrix", "country_code": "US", "type": null }],
|
||||
"cast": [{ "id": "aur_credit_...", "person": { "id": "aur_person_...", "name": "Keanu Reeves", "profile_path": null }, "character": "Neo", "billing_order": 0 }],
|
||||
"crew": [{ "id": "aur_credit_...", "person": { "id": "aur_person_...", "name": "Lana Wachowski" }, "department": "Directing", "job": "Director" }],
|
||||
"companies": [{ "id": "aur_company_...", "name": "Village Roadshow Pictures", "company_type": "production_company" }],
|
||||
@@ -109,6 +111,8 @@ unknown status) is a 422, not a silently-empty result. Response:
|
||||
|
||||
`certification` is a convenience pick — the US (MPA) rating, TMDb's own default badge — out of the full `release_dates` list, which carries every country/type/rating TMDb reports (`release_type` one of `premiere` | `theatrical` | `digital` | `physical` | `tv`, collapsed from TMDb's six numeric codes). A rating body name (`system`, e.g. `"MPA"`/`"BBFC"`) is only known for a handful of major markets — everywhere else falls back to the country code itself rather than fabricating a body TMDb never named. Series detail carries the same two fields, sourced from TMDb's `content_ratings` instead — since that endpoint gives no date at all, each rating is anchored to the show's `first_air_date` with `release_type: "tv"`.
|
||||
|
||||
`alternate_titles` ("Also Known As") carries every translated/regional title TMDb tracks, each with the country it applies to (`country_code`, nullable — TMDb sometimes omits it) and an optional `type` (e.g. `"working title"`). Series detail carries the same field.
|
||||
|
||||
`GET /api/v1/movies/{aurora_id}/recommendations` returns TMDb's ranked
|
||||
recommendations, but only the ones already ingested into Aurora — a
|
||||
recommendation pointing at a movie Aurora hasn't seen yet is silently
|
||||
@@ -202,6 +206,19 @@ used elsewhere, since genres are a small, fixed reference set (TMDb has
|
||||
~19-20 total) that a client typically wants in full for a filter dropdown,
|
||||
not paginated the way a catalog of millions of movies needs to be.
|
||||
|
||||
## Keywords
|
||||
|
||||
| Method | Path |
|
||||
|---|---|
|
||||
| GET | `/api/v1/keywords` |
|
||||
|
||||
A directory for the `keyword` filter `GET /movies` and `GET /series` accept,
|
||||
same idea as `GET /genres` above. No filter, no `sort_by` — always
|
||||
alphabetical by name. Unlike genres, keywords are not a small fixed set (a
|
||||
full TMDb catalog has tens of thousands) — `page_size` still defaults to 50
|
||||
(max 200) for consistency with genres, but a client browsing keywords
|
||||
should expect to paginate, not fetch the whole directory at once.
|
||||
|
||||
Collection detail's `movies` list only includes movies already ingested
|
||||
into Aurora — `POST /api/v1/admin/ingest/collection` links a franchise's
|
||||
member movies purely by external-id lookup, the same never-fabricate-a-stub
|
||||
|
||||
Reference in New Issue
Block a user