Skip to content

Media: refresh methods use POST#810

Merged
vladjerca merged 1 commit into
masterfrom
feat/refresh_media_methods_post
Jun 11, 2026
Merged

Media: refresh methods use POST#810
vladjerca merged 1 commit into
masterfrom
feat/refresh_media_methods_post

Conversation

@rectifyer

@rectifyer rectifyer commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Important

This fixes a bug with PR #809 and uses the correct POST methods.

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 POST /movies/:id/refresh Movie metadata (add ?images=true to also refresh images)
movies.justwatch.refresh POST /movies/:id/refresh/justwatch Movie JustWatch watch-now links
shows.refresh POST /shows/:id/refresh Show metadata (add ?images=true to also refresh images)
shows.justwatch.refresh POST /shows/:id/refresh/justwatch Show JustWatch watch-now links
people.refresh POST /people/:id/refresh Person metadata (add ?images=true to also refresh images)

All five are POST, 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

@rectifyer rectifyer requested a review from vladjerca June 11, 2026 20:50
@rectifyer

Copy link
Copy Markdown
Contributor Author

@vladjerca This fixes the previous PR and correctly uses POST methods 🤦 Since that version is not published yet, I didn't bump it here.

@vladjerca vladjerca merged commit d2452da into master Jun 11, 2026
3 checks passed
@vladjerca vladjerca deleted the feat/refresh_media_methods_post branch June 11, 2026 21:03
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