Skip to content

Media: add refresh methods for movies, shows & people#809

Merged
vladjerca merged 2 commits into
masterfrom
feat/refresh_media_methods
Jun 11, 2026
Merged

Media: add refresh methods for movies, shows & people#809
vladjerca merged 2 commits into
masterfrom
feat/refresh_media_methods

Conversation

@rectifyer

Copy link
Copy Markdown
Contributor

Overview

Adds VIP metadata/artwork refresh endpoints to the movies, shows, and people contracts, plus the JustWatch link refresh for movies and shows. All paths map to existing API routes — no backend changes required.

New methods

Client method Request Refreshes
movies.refresh PUT /movies/:id/refresh Movie metadata (add ?images=true to also refresh images)
movies.justwatch.refresh PUT /movies/:id/refresh/justwatch Movie JustWatch watch-now links
shows.refresh PUT /shows/:id/refresh Show metadata (add ?images=true to also refresh images)
shows.justwatch.refresh PUT /shows/:id/refresh/justwatch Show JustWatch watch-now links
people.refresh PUT /people/:id/refresh Person metadata (add ?images=true to also refresh images)

All five are PUT, require 🔥 VIP + 🔒 OAuth, and return 201 with no body once the refresh is queued.

Usage

// Metadata only
await api.movies.refresh({ params: { id: 'tron-legacy-2010' } });

// Metadata + images
await api.movies.refresh({
  params: { id: 'tron-legacy-2010' },
  query: { images: true },
});

// JustWatch links
await api.movies.justwatch.refresh({ params: { id: 'tron-legacy-2010' } });

// Shows — same shape
await api.shows.refresh({ params: { id: 'game-of-thrones' }, query: { images: true } });
await api.shows.justwatch.refresh({ params: { id: 'game-of-thrones' } });

// People (no JustWatch)
await api.people.refresh({ params: { id: 'bryan-cranston' }, query: { images: true } });

// 201 = queued, body is empty
const { status } = await api.shows.refresh({ params: { id: 'severance' } });

Notes

  • images as a query param. A single refresh method handles both metadata-only and metadata+images via the optional images flag, so there's no separate images endpoint.
  • The JustWatch refresh lives at /refresh/justwatch, nested alongside the existing justwatch.link GET.
  • Shared refreshQuerySchema (images: boolean) added under _internal/request/ and reused by all three contracts.

Verification

  • deno fmt / deno lint — clean
  • deno check (movies, shows, people) — passes
  • deno task openapi:validate — passes (exit 0); all five paths generate as expected

@vladjerca vladjerca merged commit 5ac2b93 into master Jun 11, 2026
3 checks passed
@vladjerca vladjerca deleted the feat/refresh_media_methods branch June 11, 2026 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants