Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.discovr.media/llms.txt

Use this file to discover all available pages before exploring further.

Opening a movie or TV title gives you a Discovr mediaId (MV_… · TV_…)—usually from a row or page hero. A common details screen stitches together:
These calls need a session JWT after selectProfile() (Sessions, Profiles & Sign Out). Examples use TypeScript / Kotlin / Swift tabs like Authentication.
The screenshot is illustrative—backdrop, poster, synopsis, logos, episodes, similar row: keep what your product needs.
Light theme media details layout: wide backdrop behind a compact hero region, poster art on the left, title area with logo or text, synopsis and metadata in a scrollable column—models combining getMedia (movie or tv object) with getMediaImages for backdrop and brand logo treatment.
Dark theme same media detail view: immersive backdrop, poster column, readable body text and controls on dark background; corresponds to session-tier media detail fetch and image bundle for a single MV_ or TV_ id.

What to load (and when)

  • AlwaysgetMedia(mediaId) for the canonical MediaResponse: either movie or tv is populated; use media_type and the nested object for copy, rating/vote info, genres, and (for TV) the season list metadata you need before episode fetches.
  • Parallel (recommended)getMediaImages(mediaId, { language }) for backdrops, logos, and posters (TMDB-sourced). Pick a logo the way your product needs—e.g. prefer a locale, then fall back to the first entry—so the header can show title art instead of plain text.
  • TV only, when a season is selectedgetSeasonDetails(mediaId, seasonNumber, { language }) for that season’s episodes array (and season-level fields). The series id stays TV_….
  • Optional railgetSimilarRecommendations(mediaId, { language, page }) for a “More like this” row. Treat empty or 404 as “no similar titles” and hide the section.
Wire fields align with getMedia(), getMediaImages, getSeasonDetails, getSimilarRecommendations return types in Type reference. For viewer-specific overlays (lists, playback/history, resume hints), getMediaProfileMeta()—see Understanding getMediaProfileMeta and Profile context.
import { DiscovrClient } from "discovr";
import type { MediaImagesResponse, MediaResponse } from "discovr";

const discovr = new DiscovrClient("your-client-id", {
	basePath: "https://api.discovr.media",
});

async function loadHeader(mediaId: string) {
	const [details, images]: [MediaResponse, MediaImagesResponse] = await Promise.all([
		discovr.getMedia(mediaId),
		discovr.getMediaImages(mediaId, { language: "en" }),
	]);
	// Prefer a localized logo when present — exact shape is in MediaImagesResponse / OpenAPI.
	return { details, images };
}

TV: seasons and episodes

getMedia on a TV_… id should include enough season metadata to render a season picker. When the user chooses a season number, call getSeasonDetails and bind the returned episodes to your list or grid (runtime, stills, episode copy, etc.).
Light theme TV detail: horizontal season selector or chips above a vertical or grid episode list with thumbnails and episode titles; maps to getMedia for season list then getSeasonDetails(mediaId, seasonNumber) for the episodes array.
Dark theme TV layout: same season navigation plus scrollable episodes with artwork and metadata on dark UI; illustrates two-step TV flow after user picks a series from browse.
import { DiscovrClient } from "discovr";
import type { SeasonDetailsResponse } from "discovr";

const discovr = new DiscovrClient("your-client-id", {
	basePath: "https://api.discovr.media",
});

async function loadSeason(tvId: string, seasonNumber: number) {
	const season: SeasonDetailsResponse = await discovr.getSeasonDetails(tvId, seasonNumber, {
		language: "en",
	});
	return season.episodes ?? [];
}

Similar titles

Use getSimilarRecommendations to populate a carousel under the fold. Each result carries Discovr MV_ / TV_ ids suitable for opening another detail view or pushing onto your stack. If the call 404s or returns no results, skip the rail.
Light theme horizontal similar-titles rail below main media detail: poster thumbnails for related movies or shows, scrollable row; pairs with getSimilarRecommendations and optional navigation to another media id.
Dark theme same similar-recommendations strip: related title posters on dark background beneath primary detail content; shows optional second-level discovery without leaving the detail pattern.
import { DiscovrClient } from "discovr";
import type { SimilarResponse } from "discovr";

const discovr = new DiscovrClient("your-client-id", {
	basePath: "https://api.discovr.media",
});

async function loadSimilar(mediaId: string) {
	try {
		const res: SimilarResponse = await discovr.getSimilarRecommendations(mediaId, {
			language: "en-US",
			page: 1,
		});
		return res.results ?? [];
	} catch {
		return [];
	}
}