🍿 @lorenzopant/tmdb

Details

Get the top level details of a TV series by ID.

Get the top level details of a TV series by ID. Supports appending sub-resources in a single request via append_to_response.

async details<T extends readonly TVAppendToResponseNamespace[] = []>(
  params: TVDetailsParams & { append_to_response?: T }
): Promise<T extends [] ? TVSeriesDetails : TVDetailsWithAppends<T>>

TMDB Reference: TV Series Details

Parameters

NameTypeRequiredDescription
series_idnumberTMDB TV series identifier.
append_to_responseTVAppendToResponseNamespace[]Sub-resources to append to the response.
languageLanguageLanguage for localized results. Defaults to en-US.

Returns

TVSeriesDetails when no appends are provided, or TVDetailsWithAppends<T> when append_to_response is specified.

Example

// Basic details
const show = await tmdb.tvSeries.details({ series_id: 1396 });
console.log(show.name); // "Breaking Bad"

// With appended data
const show = await tmdb.tvSeries.details({
	series_id: 1396,
	append_to_response: ["credits", "videos", "keywords"],
});
console.log(show.credits.cast);
console.log(show.videos.results);

On this page