added tv show endpoints
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tmdb-ts",
|
"name": "tmdb-ts",
|
||||||
"version": "0.0.7",
|
"version": "0.0.8",
|
||||||
"description": "TMDB v3 library wrapper",
|
"description": "TMDB v3 library wrapper",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
|
|||||||
@@ -1,12 +1,7 @@
|
|||||||
import querystring, { ParsedUrlQueryInput } from 'querystring';
|
import querystring, { ParsedUrlQueryInput } from 'querystring';
|
||||||
import { BaseEndpoint } from './base';
|
import { BaseEndpoint } from './base';
|
||||||
import { Changes } from '../types/changes';
|
import { ChangeOptions, Changes } from '../types/changes';
|
||||||
|
|
||||||
export interface ChangeOptions extends ParsedUrlQueryInput {
|
|
||||||
end_date?: string;
|
|
||||||
start_date?: string;
|
|
||||||
page?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export class ChangeEndpoint extends BaseEndpoint {
|
export class ChangeEndpoint extends BaseEndpoint {
|
||||||
constructor(protected readonly accessToken: string) {
|
constructor(protected readonly accessToken: string) {
|
||||||
|
|||||||
@@ -8,3 +8,4 @@ export * from './search';
|
|||||||
export * from './genre';
|
export * from './genre';
|
||||||
export * from './movies';
|
export * from './movies';
|
||||||
export * from './configuration';
|
export * from './configuration';
|
||||||
|
export * from './tv-shows';
|
||||||
|
|||||||
@@ -1,17 +1,26 @@
|
|||||||
import { BaseEndpoint } from './base';
|
import { BaseEndpoint } from './base';
|
||||||
import {
|
import {
|
||||||
AlternativeTitles,
|
AlternativeTitles,
|
||||||
|
ChangeOptions,
|
||||||
Credits,
|
Credits,
|
||||||
|
ExternalIds,
|
||||||
Images,
|
Images,
|
||||||
Keywords, LatestMovie, MovieChanges,
|
Keywords,
|
||||||
MovieDetails, MovieLists, MovieRecommendations, MovieReviews, MoviesPlayingNow, MovieTranslations, PopularMovies,
|
LatestMovie,
|
||||||
|
MovieChanges,
|
||||||
|
MovieDetails,
|
||||||
|
MovieLists,
|
||||||
|
MoviesPlayingNow,
|
||||||
|
PopularMovies,
|
||||||
|
Recommendations,
|
||||||
ReleaseDates,
|
ReleaseDates,
|
||||||
SimilarMovies, TopRatedMovies, UpcomingMovies,
|
Reviews,
|
||||||
|
SimilarMovies,
|
||||||
|
TopRatedMovies, Translations,
|
||||||
|
UpcomingMovies,
|
||||||
Videos,
|
Videos,
|
||||||
} from '../types/movie';
|
WatchProviders,
|
||||||
import { ExternalIds } from '../types';
|
} from '../types';
|
||||||
import { WatchProviders } from '../types/watch-providers';
|
|
||||||
import { ChangeOptions } from './changes';
|
|
||||||
import querystring from 'querystring';
|
import querystring from 'querystring';
|
||||||
|
|
||||||
const BASE_MOVIE = '/movie';
|
const BASE_MOVIE = '/movie';
|
||||||
@@ -55,18 +64,18 @@ export class MoviesEndpoint extends BaseEndpoint{
|
|||||||
return await this.api.get<MovieLists>(`${BASE_MOVIE}/${id}/lists?${params}`);
|
return await this.api.get<MovieLists>(`${BASE_MOVIE}/${id}/lists?${params}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
async recommendations(id: number, options?: {page?: number}): Promise<MovieRecommendations>{
|
async recommendations(id: number, options?: {page?: number}): Promise<Recommendations>{
|
||||||
const params = querystring.encode(options);
|
const params = querystring.encode(options);
|
||||||
return await this.api.get<MovieRecommendations>(`${BASE_MOVIE}/${id}/recommendations?${params}`);
|
return await this.api.get<Recommendations>(`${BASE_MOVIE}/${id}/recommendations?${params}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
async releaseDates(id: number): Promise<ReleaseDates>{
|
async releaseDates(id: number): Promise<ReleaseDates>{
|
||||||
return await this.api.get<ReleaseDates>(`${BASE_MOVIE}/${id}/release_dates`);
|
return await this.api.get<ReleaseDates>(`${BASE_MOVIE}/${id}/release_dates`);
|
||||||
}
|
}
|
||||||
|
|
||||||
async reviews(id: number, options?: {page?: number}): Promise<MovieReviews>{
|
async reviews(id: number, options?: {page?: number}): Promise<Reviews>{
|
||||||
const params = querystring.encode(options);
|
const params = querystring.encode(options);
|
||||||
return await this.api.get<MovieReviews>(`${BASE_MOVIE}/${id}/reviews?${params}`);
|
return await this.api.get<Reviews>(`${BASE_MOVIE}/${id}/reviews?${params}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
async similar(id: number, options?: {page?: number}): Promise<SimilarMovies>{
|
async similar(id: number, options?: {page?: number}): Promise<SimilarMovies>{
|
||||||
@@ -74,8 +83,8 @@ export class MoviesEndpoint extends BaseEndpoint{
|
|||||||
return await this.api.get<SimilarMovies>(`${BASE_MOVIE}/${id}/similar?${params}`);
|
return await this.api.get<SimilarMovies>(`${BASE_MOVIE}/${id}/similar?${params}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
async translations(id: number): Promise<MovieTranslations>{
|
async translations(id: number): Promise<Translations>{
|
||||||
return await this.api.get<MovieTranslations>(`${BASE_MOVIE}/${id}/translations`);
|
return await this.api.get<Translations>(`${BASE_MOVIE}/${id}/translations`);
|
||||||
}
|
}
|
||||||
|
|
||||||
async videos(id: number): Promise<Videos>{
|
async videos(id: number): Promise<Videos>{
|
||||||
@@ -94,7 +103,7 @@ export class MoviesEndpoint extends BaseEndpoint{
|
|||||||
return await this.api.get<LatestMovie>(`${BASE_MOVIE}/latest`);
|
return await this.api.get<LatestMovie>(`${BASE_MOVIE}/latest`);
|
||||||
}
|
}
|
||||||
|
|
||||||
async nowPlaying(options?: {page?: number, region?: string}): Promise<MoviesPlayingNow>{
|
async nowPlaying(options?: {page?: number, region?: string, language?: string}): Promise<MoviesPlayingNow>{
|
||||||
const params = querystring.encode(options);
|
const params = querystring.encode(options);
|
||||||
return await this.api.get<MoviesPlayingNow>(`${BASE_MOVIE}/now_playing?${params}`);
|
return await this.api.get<MoviesPlayingNow>(`${BASE_MOVIE}/now_playing?${params}`);
|
||||||
}
|
}
|
||||||
@@ -104,12 +113,12 @@ export class MoviesEndpoint extends BaseEndpoint{
|
|||||||
return await this.api.get<PopularMovies>(`${BASE_MOVIE}/popular?${params}`);
|
return await this.api.get<PopularMovies>(`${BASE_MOVIE}/popular?${params}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
async topRated(options?: {page?: number, region?: string}): Promise<TopRatedMovies>{
|
async topRated(options?: {page?: number, region?: string, language?: string}): Promise<TopRatedMovies>{
|
||||||
const params = querystring.encode(options);
|
const params = querystring.encode(options);
|
||||||
return await this.api.get<TopRatedMovies>(`${BASE_MOVIE}/top_rated?${params}`);
|
return await this.api.get<TopRatedMovies>(`${BASE_MOVIE}/top_rated?${params}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
async upcoming(options?: {page?: number, region?: string}): Promise<UpcomingMovies>{
|
async upcoming(options?: {page?: number, region?: string, language?: string}): Promise<UpcomingMovies>{
|
||||||
const params = querystring.encode(options);
|
const params = querystring.encode(options);
|
||||||
return await this.api.get<UpcomingMovies>(`${BASE_MOVIE}/upcoming?${params}`);
|
return await this.api.get<UpcomingMovies>(`${BASE_MOVIE}/upcoming?${params}`);
|
||||||
}
|
}
|
||||||
|
|||||||
134
src/endpoints/tv-shows.ts
Normal file
134
src/endpoints/tv-shows.ts
Normal file
@@ -0,0 +1,134 @@
|
|||||||
|
import { BaseEndpoint } from './base';
|
||||||
|
import {
|
||||||
|
AlternativeTitles,
|
||||||
|
ChangeOptions,
|
||||||
|
ContentRatings,
|
||||||
|
Credits,
|
||||||
|
EpisodeGroups,
|
||||||
|
ExternalIds,
|
||||||
|
Images,
|
||||||
|
Keywords,
|
||||||
|
LatestTvShows,
|
||||||
|
OnTheAir,
|
||||||
|
PopularTvShows,
|
||||||
|
Recommendations,
|
||||||
|
Reviews,
|
||||||
|
ScreenedTheatrically,
|
||||||
|
SimilarTvShows,
|
||||||
|
TopRatedTvShows,
|
||||||
|
Translations,
|
||||||
|
TvShowChanges,
|
||||||
|
TvShowDetails,
|
||||||
|
TvShowsAiringToday,
|
||||||
|
Videos,
|
||||||
|
WatchProviders,
|
||||||
|
} from '../types';
|
||||||
|
import querystring from 'querystring';
|
||||||
|
|
||||||
|
const BASE_TV = '/tv';
|
||||||
|
|
||||||
|
export class TvShowsEndpoint extends BaseEndpoint{
|
||||||
|
constructor(protected readonly accessToken: string) {
|
||||||
|
super(accessToken);
|
||||||
|
}
|
||||||
|
|
||||||
|
async details(id: number): Promise<TvShowDetails>{
|
||||||
|
return await this.api.get<TvShowDetails>(`${BASE_TV}/${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
async alternativeTitles(id: number): Promise<AlternativeTitles>{
|
||||||
|
return await this.api.get<AlternativeTitles>(`${BASE_TV}/${id}/alternative_titles`);
|
||||||
|
}
|
||||||
|
|
||||||
|
async changes(id: number, options?: ChangeOptions): Promise<TvShowChanges>{
|
||||||
|
const params = querystring.encode(options);
|
||||||
|
return await this.api.get<TvShowChanges>(`${BASE_TV}/${id}/changes?${params}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
async contentRatings(id: number): Promise<ContentRatings>{
|
||||||
|
return await this.api.get<ContentRatings>(`${BASE_TV}/${id}/content_ratings`);
|
||||||
|
}
|
||||||
|
|
||||||
|
async credits(id: number): Promise<Credits>{
|
||||||
|
return await this.api.get<Credits>(`${BASE_TV}/${id}/credits`);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
async episodeGroups(id: number): Promise<EpisodeGroups>{
|
||||||
|
return await this.api.get<EpisodeGroups>(`${BASE_TV}/${id}/episode_groups`);
|
||||||
|
}
|
||||||
|
|
||||||
|
async externalIds(id: number): Promise<ExternalIds>{
|
||||||
|
return await this.api.get<ExternalIds>(`${BASE_TV}/${id}/external_ids`);
|
||||||
|
}
|
||||||
|
|
||||||
|
async images(id: number): Promise<Images>{
|
||||||
|
return await this.api.get<Images>(`${BASE_TV}/${id}/images`);
|
||||||
|
}
|
||||||
|
|
||||||
|
async keywords(id: number): Promise<Keywords>{
|
||||||
|
return await this.api.get<Keywords>(`${BASE_TV}/${id}/keywords`);
|
||||||
|
}
|
||||||
|
|
||||||
|
async recommendations(id: number, options?: {page?: number}): Promise<Recommendations>{
|
||||||
|
const params = querystring.encode(options);
|
||||||
|
return await this.api.get<Recommendations>(`${BASE_TV}/${id}/recommendations?${params}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
async reviews(id: number, options?: {page?: number}): Promise<Reviews>{
|
||||||
|
const params = querystring.encode(options);
|
||||||
|
return await this.api.get<Reviews>(`${BASE_TV}/${id}/reviews?${params}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
async screenedTheatrically(id: number, options?: {page?: number}): Promise<ScreenedTheatrically>{
|
||||||
|
const params = querystring.encode(options);
|
||||||
|
return await this.api.get<ScreenedTheatrically>(`${BASE_TV}/${id}/screened_theatrically`);
|
||||||
|
}
|
||||||
|
|
||||||
|
async similar(id: number, options?: {page?: number}): Promise<SimilarTvShows>{
|
||||||
|
const params = querystring.encode(options);
|
||||||
|
return await this.api.get<SimilarTvShows>(`${BASE_TV}/${id}/similar?${params}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
async translations(id: number): Promise<Translations>{
|
||||||
|
return await this.api.get<Translations>(`${BASE_TV}/${id}/translations`);
|
||||||
|
}
|
||||||
|
|
||||||
|
async videos(id: number): Promise<Videos>{
|
||||||
|
return await this.api.get<Videos>(`${BASE_TV}/${id}/videos`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Powered by JustWatch
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
async watchProviders(id: number): Promise<WatchProviders>{
|
||||||
|
return await this.api.get<WatchProviders>(`${BASE_TV}/${id}/watch/providers`);
|
||||||
|
}
|
||||||
|
|
||||||
|
async latest(): Promise<LatestTvShows>{
|
||||||
|
return await this.api.get<LatestTvShows>(`${BASE_TV}/latest`);
|
||||||
|
}
|
||||||
|
|
||||||
|
async onTheAir(): Promise<OnTheAir>{
|
||||||
|
return await this.api.get<OnTheAir>(`${BASE_TV}/on_the_air`);
|
||||||
|
}
|
||||||
|
|
||||||
|
async airingToday(options?: {page?: number, region?: string, language?: string}): Promise<TvShowsAiringToday>{
|
||||||
|
const params = querystring.encode(options);
|
||||||
|
return await this.api.get<TvShowsAiringToday>(`${BASE_TV}/airing_today?${params}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
async popular(options?: {page?: number}): Promise<PopularTvShows>{
|
||||||
|
const params = querystring.encode(options);
|
||||||
|
return await this.api.get<PopularTvShows>(`${BASE_TV}/popular?${params}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
async topRated(options?: {page?: number, region?: string, language?: string}): Promise<TopRatedTvShows>{
|
||||||
|
const params = querystring.encode(options);
|
||||||
|
return await this.api.get<TopRatedTvShows>(`${BASE_TV}/top_rated?${params}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -6,6 +6,7 @@ import {
|
|||||||
GenreEndpoint,
|
GenreEndpoint,
|
||||||
MoviesEndpoint,
|
MoviesEndpoint,
|
||||||
SearchEndpoint,
|
SearchEndpoint,
|
||||||
|
TvShowsEndpoint,
|
||||||
ConfigurationEndpoint,
|
ConfigurationEndpoint,
|
||||||
} from './endpoints';
|
} from './endpoints';
|
||||||
|
|
||||||
@@ -47,4 +48,8 @@ export default class TMDB {
|
|||||||
get movies(): MoviesEndpoint{
|
get movies(): MoviesEndpoint{
|
||||||
return new MoviesEndpoint(this.accessToken);
|
return new MoviesEndpoint(this.accessToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get tvShows(): TvShowsEndpoint{
|
||||||
|
return new TvShowsEndpoint(this.accessToken);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import { ParsedUrlQueryInput } from 'querystring';
|
||||||
|
|
||||||
export interface Change {
|
export interface Change {
|
||||||
id: number;
|
id: number;
|
||||||
adult: boolean | undefined;
|
adult: boolean | undefined;
|
||||||
@@ -10,3 +12,8 @@ export interface Changes{
|
|||||||
total_results: number;
|
total_results: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface ChangeOptions extends ParsedUrlQueryInput {
|
||||||
|
end_date?: string;
|
||||||
|
start_date?: string;
|
||||||
|
page?: number;
|
||||||
|
}
|
||||||
|
|||||||
@@ -36,3 +36,102 @@ export interface CreditResponse {
|
|||||||
person?: Person;
|
person?: Person;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface Title {
|
||||||
|
iso_3166_1: string;
|
||||||
|
title: string;
|
||||||
|
type: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface AlternativeTitles {
|
||||||
|
id: number;
|
||||||
|
titles: Title[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Cast {
|
||||||
|
adult: boolean;
|
||||||
|
gender: number;
|
||||||
|
id: number;
|
||||||
|
known_for_department: string;
|
||||||
|
name: string;
|
||||||
|
original_name: string;
|
||||||
|
popularity: number;
|
||||||
|
profile_path: string;
|
||||||
|
cast_id: number;
|
||||||
|
character: string;
|
||||||
|
credit_id: string;
|
||||||
|
order: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Crew {
|
||||||
|
adult: boolean;
|
||||||
|
gender: number;
|
||||||
|
id: number;
|
||||||
|
known_for_department: string;
|
||||||
|
name: string;
|
||||||
|
original_name: string;
|
||||||
|
popularity: number;
|
||||||
|
profile_path: string;
|
||||||
|
credit_id: string;
|
||||||
|
department: string;
|
||||||
|
job: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Credits {
|
||||||
|
id: number;
|
||||||
|
cast: Cast[];
|
||||||
|
crew: Crew[];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export interface Backdrop {
|
||||||
|
aspect_ratio: number;
|
||||||
|
file_path: string;
|
||||||
|
height: number;
|
||||||
|
iso_639_1?: any;
|
||||||
|
vote_average: number;
|
||||||
|
vote_count: number;
|
||||||
|
width: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Poster {
|
||||||
|
aspect_ratio: number;
|
||||||
|
file_path: string;
|
||||||
|
height: number;
|
||||||
|
iso_639_1: string;
|
||||||
|
vote_average: number;
|
||||||
|
vote_count: number;
|
||||||
|
width: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Images {
|
||||||
|
id: number;
|
||||||
|
backdrops: Backdrop[];
|
||||||
|
posters: Poster[];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export interface Video {
|
||||||
|
id: string;
|
||||||
|
iso_639_1: string;
|
||||||
|
iso_3166_1: string;
|
||||||
|
key: string;
|
||||||
|
name: string;
|
||||||
|
site: string;
|
||||||
|
size: number;
|
||||||
|
type: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Videos {
|
||||||
|
id: number;
|
||||||
|
results: Video[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Keywords {
|
||||||
|
id: number;
|
||||||
|
keywords: Array<{
|
||||||
|
id: number;
|
||||||
|
name: string;
|
||||||
|
}>
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,17 @@
|
|||||||
export * from './certification';
|
export * from './certification';
|
||||||
export * from './credits';
|
export * from './credits';
|
||||||
export * from './changes';
|
export * from './changes';
|
||||||
|
export * from './movies';
|
||||||
|
export * from './search';
|
||||||
|
export * from './tv-shows';
|
||||||
|
export * from './watch-providers';
|
||||||
|
|
||||||
|
export interface AuthorDetails {
|
||||||
|
name: string;
|
||||||
|
username: string;
|
||||||
|
avatar_path: string;
|
||||||
|
rating?: number;
|
||||||
|
}
|
||||||
|
|
||||||
export interface KnownFor {
|
export interface KnownFor {
|
||||||
id: number;
|
id: number;
|
||||||
@@ -93,3 +103,95 @@ export interface ExternalIds {
|
|||||||
twitter_id: string;
|
twitter_id: string;
|
||||||
id: number;
|
id: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface ProductionCompany {
|
||||||
|
id: number;
|
||||||
|
logo_path: string;
|
||||||
|
name: string;
|
||||||
|
origin_country: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProductionCountry {
|
||||||
|
iso_3166_1: string;
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface SpokenLanguage {
|
||||||
|
english_name: string;
|
||||||
|
iso_639_1: string;
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ContentRatings{
|
||||||
|
results: ContentRatingsResult[];
|
||||||
|
id: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ContentRatingsResult {
|
||||||
|
iso_3166_1: string;
|
||||||
|
rating: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export interface Recommendation {
|
||||||
|
adult: boolean;
|
||||||
|
backdrop_path?: any;
|
||||||
|
genre_ids: number[];
|
||||||
|
id: number;
|
||||||
|
original_language: string;
|
||||||
|
original_title: string;
|
||||||
|
overview: string;
|
||||||
|
release_date: string;
|
||||||
|
poster_path?: any;
|
||||||
|
popularity: number;
|
||||||
|
title: string;
|
||||||
|
video: boolean;
|
||||||
|
vote_average: number;
|
||||||
|
vote_count: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export interface Recommendations {
|
||||||
|
page: number;
|
||||||
|
results: Recommendation[];
|
||||||
|
total_pages: number;
|
||||||
|
total_results: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Review {
|
||||||
|
author: string;
|
||||||
|
author_details: AuthorDetails;
|
||||||
|
content: string;
|
||||||
|
created_at: Date;
|
||||||
|
id: string;
|
||||||
|
updated_at: Date;
|
||||||
|
url: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Reviews {
|
||||||
|
id: number;
|
||||||
|
page: number;
|
||||||
|
results: Review[];
|
||||||
|
total_pages: number;
|
||||||
|
total_results: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export interface TranslationData {
|
||||||
|
title: string;
|
||||||
|
overview: string;
|
||||||
|
homepage: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Translation {
|
||||||
|
iso_3166_1: string;
|
||||||
|
iso_639_1: string;
|
||||||
|
name: string;
|
||||||
|
english_name: string;
|
||||||
|
data: TranslationData;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Translations {
|
||||||
|
id: number;
|
||||||
|
translations: Translation[];
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,346 +0,0 @@
|
|||||||
import { Genre, Movie } from './index';
|
|
||||||
|
|
||||||
export interface ProductionCompany {
|
|
||||||
id: number;
|
|
||||||
logo_path: string;
|
|
||||||
name: string;
|
|
||||||
origin_country: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ProductionCountry {
|
|
||||||
iso_3166_1: string;
|
|
||||||
name: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface SpokenLanguage {
|
|
||||||
iso_639_1: string;
|
|
||||||
name: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface MovieDetails {
|
|
||||||
adult: boolean;
|
|
||||||
backdrop_path: string;
|
|
||||||
belongs_to_collection?: any;
|
|
||||||
budget: number;
|
|
||||||
genres: Genre[];
|
|
||||||
homepage: string;
|
|
||||||
id: number;
|
|
||||||
imdb_id: string;
|
|
||||||
original_language: string;
|
|
||||||
original_title: string;
|
|
||||||
overview: string;
|
|
||||||
popularity: number;
|
|
||||||
poster_path?: any;
|
|
||||||
production_companies: ProductionCompany[];
|
|
||||||
production_countries: ProductionCountry[];
|
|
||||||
release_date: string;
|
|
||||||
revenue: number;
|
|
||||||
runtime: number;
|
|
||||||
spoken_languages: SpokenLanguage[];
|
|
||||||
status: string;
|
|
||||||
tagline: string;
|
|
||||||
title: string;
|
|
||||||
video: boolean;
|
|
||||||
vote_average: number;
|
|
||||||
vote_count: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
export interface Title {
|
|
||||||
iso_3166_1: string;
|
|
||||||
title: string;
|
|
||||||
type: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface AlternativeTitles {
|
|
||||||
id: number;
|
|
||||||
titles: Title[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Cast {
|
|
||||||
adult: boolean;
|
|
||||||
gender: number;
|
|
||||||
id: number;
|
|
||||||
known_for_department: string;
|
|
||||||
name: string;
|
|
||||||
original_name: string;
|
|
||||||
popularity: number;
|
|
||||||
profile_path: string;
|
|
||||||
cast_id: number;
|
|
||||||
character: string;
|
|
||||||
credit_id: string;
|
|
||||||
order: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Crew {
|
|
||||||
adult: boolean;
|
|
||||||
gender: number;
|
|
||||||
id: number;
|
|
||||||
known_for_department: string;
|
|
||||||
name: string;
|
|
||||||
original_name: string;
|
|
||||||
popularity: number;
|
|
||||||
profile_path: string;
|
|
||||||
credit_id: string;
|
|
||||||
department: string;
|
|
||||||
job: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Credits {
|
|
||||||
id: number;
|
|
||||||
cast: Cast[];
|
|
||||||
crew: Crew[];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
export interface Backdrop {
|
|
||||||
aspect_ratio: number;
|
|
||||||
file_path: string;
|
|
||||||
height: number;
|
|
||||||
iso_639_1?: any;
|
|
||||||
vote_average: number;
|
|
||||||
vote_count: number;
|
|
||||||
width: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Poster {
|
|
||||||
aspect_ratio: number;
|
|
||||||
file_path: string;
|
|
||||||
height: number;
|
|
||||||
iso_639_1: string;
|
|
||||||
vote_average: number;
|
|
||||||
vote_count: number;
|
|
||||||
width: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Images {
|
|
||||||
id: number;
|
|
||||||
backdrops: Backdrop[];
|
|
||||||
posters: Poster[];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
export interface Video {
|
|
||||||
id: string;
|
|
||||||
iso_639_1: string;
|
|
||||||
iso_3166_1: string;
|
|
||||||
key: string;
|
|
||||||
name: string;
|
|
||||||
site: string;
|
|
||||||
size: number;
|
|
||||||
type: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Videos {
|
|
||||||
id: number;
|
|
||||||
results: Video[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Keywords {
|
|
||||||
id: number;
|
|
||||||
keywords: Array<{
|
|
||||||
id: number;
|
|
||||||
name: string;
|
|
||||||
}>
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ReleaseDate {
|
|
||||||
certification: string;
|
|
||||||
iso_639_1: string;
|
|
||||||
release_date: Date;
|
|
||||||
type: number;
|
|
||||||
note: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ReleaseDateResult {
|
|
||||||
iso_3166_1: string;
|
|
||||||
release_dates: ReleaseDate[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ReleaseDates {
|
|
||||||
id: number;
|
|
||||||
results: ReleaseDateResult[];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
export interface SimilarMovies {
|
|
||||||
page: number;
|
|
||||||
results: Movie[];
|
|
||||||
total_pages: number;
|
|
||||||
total_results: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
export interface AuthorDetails {
|
|
||||||
name: string;
|
|
||||||
username: string;
|
|
||||||
avatar_path: string;
|
|
||||||
rating?: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Review {
|
|
||||||
author: string;
|
|
||||||
author_details: AuthorDetails;
|
|
||||||
content: string;
|
|
||||||
created_at: Date;
|
|
||||||
id: string;
|
|
||||||
updated_at: Date;
|
|
||||||
url: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface MovieReviews {
|
|
||||||
id: number;
|
|
||||||
page: number;
|
|
||||||
results: Review[];
|
|
||||||
total_pages: number;
|
|
||||||
total_results: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
export interface TranslationData {
|
|
||||||
title: string;
|
|
||||||
overview: string;
|
|
||||||
homepage: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Translation {
|
|
||||||
iso_3166_1: string;
|
|
||||||
iso_639_1: string;
|
|
||||||
name: string;
|
|
||||||
english_name: string;
|
|
||||||
data: TranslationData;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface MovieTranslations {
|
|
||||||
id: number;
|
|
||||||
translations: Translation[];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
export interface MovieList {
|
|
||||||
description: string;
|
|
||||||
favorite_count: number;
|
|
||||||
id: number;
|
|
||||||
item_count: number;
|
|
||||||
iso_639_1: string;
|
|
||||||
list_type: string;
|
|
||||||
name: string;
|
|
||||||
poster_path: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface MovieLists {
|
|
||||||
id: number;
|
|
||||||
page: number;
|
|
||||||
results: MovieList[];
|
|
||||||
total_pages: number;
|
|
||||||
total_results: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
export interface MovieChangeItem {
|
|
||||||
id: string;
|
|
||||||
action: string;
|
|
||||||
time: string;
|
|
||||||
iso_639_1: string;
|
|
||||||
value: string;
|
|
||||||
original_value: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface MovieChange {
|
|
||||||
key: string;
|
|
||||||
items: MovieChangeItem[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface MovieChanges {
|
|
||||||
changes: MovieChange[];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
export interface MovieRecommendation {
|
|
||||||
adult: boolean;
|
|
||||||
backdrop_path?: any;
|
|
||||||
genre_ids: number[];
|
|
||||||
id: number;
|
|
||||||
original_language: string;
|
|
||||||
original_title: string;
|
|
||||||
overview: string;
|
|
||||||
release_date: string;
|
|
||||||
poster_path?: any;
|
|
||||||
popularity: number;
|
|
||||||
title: string;
|
|
||||||
video: boolean;
|
|
||||||
vote_average: number;
|
|
||||||
vote_count: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface MovieRecommendations {
|
|
||||||
page: number;
|
|
||||||
results: MovieRecommendation[];
|
|
||||||
total_pages: number;
|
|
||||||
total_results: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
export interface LatestMovie {
|
|
||||||
adult: boolean;
|
|
||||||
backdrop_path?: any;
|
|
||||||
belongs_to_collection?: any;
|
|
||||||
budget: number;
|
|
||||||
genres: Genre[];
|
|
||||||
homepage: string;
|
|
||||||
id: number;
|
|
||||||
imdb_id: string;
|
|
||||||
original_language: string;
|
|
||||||
original_title: string;
|
|
||||||
overview: string;
|
|
||||||
popularity: number;
|
|
||||||
poster_path: string;
|
|
||||||
production_companies: any[];
|
|
||||||
production_countries: any[];
|
|
||||||
release_date: string;
|
|
||||||
revenue: number;
|
|
||||||
runtime: number;
|
|
||||||
spoken_languages: any[];
|
|
||||||
status: string;
|
|
||||||
tagline: string;
|
|
||||||
title: string;
|
|
||||||
video: boolean;
|
|
||||||
vote_average: number;
|
|
||||||
vote_count: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
export interface Dates {
|
|
||||||
maximum: string;
|
|
||||||
minimum: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface MoviesPlayingNow {
|
|
||||||
page: number;
|
|
||||||
results: Movie[];
|
|
||||||
dates: Dates;
|
|
||||||
total_pages: number;
|
|
||||||
total_results: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface PopularMovies {
|
|
||||||
page: number;
|
|
||||||
results: Movie[];
|
|
||||||
total_results: number;
|
|
||||||
total_pages: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface TopRatedMovies {
|
|
||||||
page: number;
|
|
||||||
results: Movie[];
|
|
||||||
total_results: number;
|
|
||||||
total_pages: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface UpcomingMovies {
|
|
||||||
page: number;
|
|
||||||
results: Movie[];
|
|
||||||
total_results: number;
|
|
||||||
total_pages: number;
|
|
||||||
}
|
|
||||||
157
src/types/movies.ts
Normal file
157
src/types/movies.ts
Normal file
@@ -0,0 +1,157 @@
|
|||||||
|
import { Genre, Movie, ProductionCompany, ProductionCountry, SpokenLanguage } from './';
|
||||||
|
|
||||||
|
export interface MovieDetails {
|
||||||
|
adult: boolean;
|
||||||
|
backdrop_path: string;
|
||||||
|
belongs_to_collection?: any;
|
||||||
|
budget: number;
|
||||||
|
genres: Genre[];
|
||||||
|
homepage: string;
|
||||||
|
id: number;
|
||||||
|
imdb_id: string;
|
||||||
|
original_language: string;
|
||||||
|
original_title: string;
|
||||||
|
overview: string;
|
||||||
|
popularity: number;
|
||||||
|
poster_path?: any;
|
||||||
|
production_companies: ProductionCompany[];
|
||||||
|
production_countries: ProductionCountry[];
|
||||||
|
release_date: string;
|
||||||
|
revenue: number;
|
||||||
|
runtime: number;
|
||||||
|
spoken_languages: SpokenLanguage[];
|
||||||
|
status: string;
|
||||||
|
tagline: string;
|
||||||
|
title: string;
|
||||||
|
video: boolean;
|
||||||
|
vote_average: number;
|
||||||
|
vote_count: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export interface ReleaseDate {
|
||||||
|
certification: string;
|
||||||
|
iso_639_1: string;
|
||||||
|
release_date: Date;
|
||||||
|
type: number;
|
||||||
|
note: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ReleaseDateResult {
|
||||||
|
iso_3166_1: string;
|
||||||
|
release_dates: ReleaseDate[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ReleaseDates {
|
||||||
|
id: number;
|
||||||
|
results: ReleaseDateResult[];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export interface SimilarMovies {
|
||||||
|
page: number;
|
||||||
|
results: Movie[];
|
||||||
|
total_pages: number;
|
||||||
|
total_results: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface MovieList {
|
||||||
|
description: string;
|
||||||
|
favorite_count: number;
|
||||||
|
id: number;
|
||||||
|
item_count: number;
|
||||||
|
iso_639_1: string;
|
||||||
|
list_type: string;
|
||||||
|
name: string;
|
||||||
|
poster_path: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface MovieLists {
|
||||||
|
id: number;
|
||||||
|
page: number;
|
||||||
|
results: MovieList[];
|
||||||
|
total_pages: number;
|
||||||
|
total_results: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export interface MovieChangeItem {
|
||||||
|
id: string;
|
||||||
|
action: string;
|
||||||
|
time: string;
|
||||||
|
iso_639_1: string;
|
||||||
|
value: string;
|
||||||
|
original_value: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface MovieChange {
|
||||||
|
key: string;
|
||||||
|
items: MovieChangeItem[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface MovieChanges {
|
||||||
|
changes: MovieChange[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface LatestMovie {
|
||||||
|
adult: boolean;
|
||||||
|
backdrop_path?: any;
|
||||||
|
belongs_to_collection?: any;
|
||||||
|
budget: number;
|
||||||
|
genres: Genre[];
|
||||||
|
homepage: string;
|
||||||
|
id: number;
|
||||||
|
imdb_id: string;
|
||||||
|
original_language: string;
|
||||||
|
original_title: string;
|
||||||
|
overview: string;
|
||||||
|
popularity: number;
|
||||||
|
poster_path: string;
|
||||||
|
production_companies: any[];
|
||||||
|
production_countries: any[];
|
||||||
|
release_date: string;
|
||||||
|
revenue: number;
|
||||||
|
runtime: number;
|
||||||
|
spoken_languages: any[];
|
||||||
|
status: string;
|
||||||
|
tagline: string;
|
||||||
|
title: string;
|
||||||
|
video: boolean;
|
||||||
|
vote_average: number;
|
||||||
|
vote_count: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export interface Dates {
|
||||||
|
maximum: string;
|
||||||
|
minimum: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface MoviesPlayingNow {
|
||||||
|
page: number;
|
||||||
|
results: Movie[];
|
||||||
|
dates: Dates;
|
||||||
|
total_pages: number;
|
||||||
|
total_results: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface PopularMovies {
|
||||||
|
page: number;
|
||||||
|
results: Movie[];
|
||||||
|
total_results: number;
|
||||||
|
total_pages: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface TopRatedMovies {
|
||||||
|
page: number;
|
||||||
|
results: Movie[];
|
||||||
|
total_results: number;
|
||||||
|
total_pages: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface UpcomingMovies {
|
||||||
|
page: number;
|
||||||
|
results: Movie[];
|
||||||
|
total_results: number;
|
||||||
|
total_pages: number;
|
||||||
|
}
|
||||||
275
src/types/tv-shows.ts
Normal file
275
src/types/tv-shows.ts
Normal file
@@ -0,0 +1,275 @@
|
|||||||
|
import { Genre, ProductionCompany, ProductionCountry, SpokenLanguage } from './';
|
||||||
|
|
||||||
|
export interface CreatedBy {
|
||||||
|
id: number;
|
||||||
|
credit_id: string;
|
||||||
|
name: string;
|
||||||
|
gender: number;
|
||||||
|
profile_path: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface LastEpisodeToAir {
|
||||||
|
air_date: string;
|
||||||
|
episode_number: number;
|
||||||
|
id: number;
|
||||||
|
name: string;
|
||||||
|
overview: string;
|
||||||
|
production_code: string;
|
||||||
|
season_number: number;
|
||||||
|
still_path: string;
|
||||||
|
vote_average: number;
|
||||||
|
vote_count: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Network {
|
||||||
|
name: string;
|
||||||
|
id: number;
|
||||||
|
logo_path: string;
|
||||||
|
origin_country: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Season {
|
||||||
|
air_date: string;
|
||||||
|
episode_count: number;
|
||||||
|
id: number;
|
||||||
|
name: string;
|
||||||
|
overview: string;
|
||||||
|
poster_path: string;
|
||||||
|
season_number: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface TvShowDetails {
|
||||||
|
backdrop_path: string;
|
||||||
|
created_by: CreatedBy[];
|
||||||
|
episode_run_time: number[];
|
||||||
|
first_air_date: string;
|
||||||
|
genres: Genre[];
|
||||||
|
homepage: string;
|
||||||
|
id: number;
|
||||||
|
in_production: boolean;
|
||||||
|
languages: string[];
|
||||||
|
last_air_date: string;
|
||||||
|
last_episode_to_air: LastEpisodeToAir;
|
||||||
|
name: string;
|
||||||
|
next_episode_to_air?: any;
|
||||||
|
networks: Network[];
|
||||||
|
number_of_episodes: number;
|
||||||
|
number_of_seasons: number;
|
||||||
|
origin_country: string[];
|
||||||
|
original_language: string;
|
||||||
|
original_name: string;
|
||||||
|
overview: string;
|
||||||
|
popularity: number;
|
||||||
|
poster_path: string;
|
||||||
|
production_companies: ProductionCompany[];
|
||||||
|
production_countries: ProductionCountry[];
|
||||||
|
seasons: Season[];
|
||||||
|
spoken_languages: SpokenLanguage[];
|
||||||
|
status: string;
|
||||||
|
tagline: string;
|
||||||
|
type: string;
|
||||||
|
vote_average: number;
|
||||||
|
vote_count: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface TvShowItem {
|
||||||
|
id: string;
|
||||||
|
action: string;
|
||||||
|
time: string;
|
||||||
|
value: any;
|
||||||
|
iso_639_1: string;
|
||||||
|
original_value: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface TvShowChange {
|
||||||
|
key: string;
|
||||||
|
items: TvShowItem[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface TvShowChanges {
|
||||||
|
changes: TvShowChange[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Network {
|
||||||
|
id: number;
|
||||||
|
logo_path: string;
|
||||||
|
name: string;
|
||||||
|
origin_country: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface EpisodeGroup {
|
||||||
|
description: string;
|
||||||
|
episode_count: number;
|
||||||
|
group_count: number;
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
network: Network;
|
||||||
|
type: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface EpisodeGroups {
|
||||||
|
results: EpisodeGroup[];
|
||||||
|
id: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ScreenedTheatricallyResult {
|
||||||
|
id: number;
|
||||||
|
episode_number: number;
|
||||||
|
season_number: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ScreenedTheatrically {
|
||||||
|
id: number;
|
||||||
|
results: ScreenedTheatricallyResult[];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export interface SimilarTvShow {
|
||||||
|
backdrop_path: string;
|
||||||
|
first_air_date: string;
|
||||||
|
genre_ids: number[];
|
||||||
|
id: number;
|
||||||
|
original_language: string;
|
||||||
|
original_name: string;
|
||||||
|
overview: string;
|
||||||
|
origin_country: string[];
|
||||||
|
poster_path: string;
|
||||||
|
popularity: number;
|
||||||
|
name: string;
|
||||||
|
vote_average: number;
|
||||||
|
vote_count: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface SimilarTvShows {
|
||||||
|
page: number;
|
||||||
|
results: SimilarTvShow[];
|
||||||
|
total_pages: number;
|
||||||
|
total_results: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface LatestTvShows {
|
||||||
|
backdrop_path?: any;
|
||||||
|
created_by: any[];
|
||||||
|
episode_run_time: number[];
|
||||||
|
first_air_date: string;
|
||||||
|
genres: Genre[];
|
||||||
|
homepage: string;
|
||||||
|
id: number;
|
||||||
|
in_production: boolean;
|
||||||
|
languages: string[];
|
||||||
|
last_air_date: string;
|
||||||
|
name: string;
|
||||||
|
networks: Network[];
|
||||||
|
number_of_episodes: number;
|
||||||
|
number_of_seasons: number;
|
||||||
|
origin_country: string[];
|
||||||
|
original_language: string;
|
||||||
|
original_name: string;
|
||||||
|
overview?: any;
|
||||||
|
popularity: number;
|
||||||
|
poster_path?: any;
|
||||||
|
production_companies: any[];
|
||||||
|
seasons: Season[];
|
||||||
|
status: string;
|
||||||
|
type: string;
|
||||||
|
vote_average: number;
|
||||||
|
vote_count: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export interface OnTheAirResult {
|
||||||
|
poster_path: string;
|
||||||
|
popularity: number;
|
||||||
|
id: number;
|
||||||
|
backdrop_path: string;
|
||||||
|
vote_average: number;
|
||||||
|
overview: string;
|
||||||
|
first_air_date: string;
|
||||||
|
origin_country: string[];
|
||||||
|
genre_ids: number[];
|
||||||
|
original_language: string;
|
||||||
|
vote_count: number;
|
||||||
|
name: string;
|
||||||
|
original_name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface OnTheAir {
|
||||||
|
page: number;
|
||||||
|
results: OnTheAirResult[];
|
||||||
|
total_results: number;
|
||||||
|
total_pages: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export interface AiringTodayResult {
|
||||||
|
poster_path: string;
|
||||||
|
popularity: number;
|
||||||
|
id: number;
|
||||||
|
backdrop_path: string;
|
||||||
|
vote_average: number;
|
||||||
|
overview: string;
|
||||||
|
first_air_date: string;
|
||||||
|
origin_country: string[];
|
||||||
|
genre_ids: number[];
|
||||||
|
original_language: string;
|
||||||
|
vote_count: number;
|
||||||
|
name: string;
|
||||||
|
original_name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface TvShowsAiringToday {
|
||||||
|
page: number;
|
||||||
|
results: AiringTodayResult[];
|
||||||
|
total_results: number;
|
||||||
|
total_pages: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export interface PopularTvShowResult {
|
||||||
|
poster_path: string;
|
||||||
|
popularity: number;
|
||||||
|
id: number;
|
||||||
|
backdrop_path: string;
|
||||||
|
vote_average: number;
|
||||||
|
overview: string;
|
||||||
|
first_air_date: string;
|
||||||
|
origin_country: string[];
|
||||||
|
genre_ids: number[];
|
||||||
|
original_language: string;
|
||||||
|
vote_count: number;
|
||||||
|
name: string;
|
||||||
|
original_name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface PopularTvShows {
|
||||||
|
page: number;
|
||||||
|
results: PopularTvShowResult[];
|
||||||
|
total_results: number;
|
||||||
|
total_pages: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export interface TopRatedTvShowResult {
|
||||||
|
poster_path: string;
|
||||||
|
popularity: number;
|
||||||
|
id: number;
|
||||||
|
backdrop_path: string;
|
||||||
|
vote_average: number;
|
||||||
|
overview: string;
|
||||||
|
first_air_date: string;
|
||||||
|
origin_country: string[];
|
||||||
|
genre_ids: number[];
|
||||||
|
original_language: string;
|
||||||
|
vote_count: number;
|
||||||
|
name: string;
|
||||||
|
original_name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface TopRatedTvShows {
|
||||||
|
page: number;
|
||||||
|
results: TopRatedTvShowResult[];
|
||||||
|
total_results: number;
|
||||||
|
total_pages: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user