Merge pull request #30 from Der-Penz/feature/append-result
Feature: append_to_result support
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tmdb-ts",
|
"name": "tmdb-ts",
|
||||||
"version": "1.0.0",
|
"version": "1.1.0",
|
||||||
"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,20 +1,20 @@
|
|||||||
import { BaseEndpoint } from './base';
|
import { BaseEndpoint } from './base';
|
||||||
import { ChangeOptions, Changes } from '../types/changes';
|
import { ChangeOptions, MediaChanges } from '../types/changes';
|
||||||
|
|
||||||
export class ChangeEndpoint extends BaseEndpoint {
|
export class ChangeEndpoint extends BaseEndpoint {
|
||||||
constructor(protected readonly accessToken: string) {
|
constructor(protected readonly accessToken: string) {
|
||||||
super(accessToken);
|
super(accessToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
async movies(options?: ChangeOptions): Promise<Changes> {
|
async movies(options?: ChangeOptions): Promise<MediaChanges> {
|
||||||
return await this.api.get<Changes>(`/movie/changes`, options);
|
return await this.api.get<MediaChanges>(`/movie/changes`, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
async tvShows(options?: ChangeOptions): Promise<Changes> {
|
async tvShows(options?: ChangeOptions): Promise<MediaChanges> {
|
||||||
return await this.api.get<Changes>(`/tv/changes`, options);
|
return await this.api.get<MediaChanges>(`/tv/changes`, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
async person(options?: ChangeOptions): Promise<Changes> {
|
async person(options?: ChangeOptions): Promise<MediaChanges> {
|
||||||
return await this.api.get<Changes>(`/person/change`, options);
|
return await this.api.get<MediaChanges>(`/person/change`, options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,16 @@
|
|||||||
import { BaseEndpoint } from './base';
|
import { BaseEndpoint } from './base';
|
||||||
import {
|
import {
|
||||||
AlternativeTitles,
|
AlternativeTitles,
|
||||||
|
AppendToResponse,
|
||||||
|
AppendToResponseMovieKey,
|
||||||
ChangeOptions,
|
ChangeOptions,
|
||||||
|
Changes,
|
||||||
Credits,
|
Credits,
|
||||||
ExternalIds,
|
ExternalIds,
|
||||||
Images,
|
Images,
|
||||||
Keywords,
|
Keywords,
|
||||||
LanguageOption,
|
LanguageOption,
|
||||||
LatestMovie,
|
LatestMovie,
|
||||||
MovieChanges,
|
|
||||||
MovieDetails,
|
MovieDetails,
|
||||||
MovieLists,
|
MovieLists,
|
||||||
MoviesPlayingNow,
|
MoviesPlayingNow,
|
||||||
@@ -33,8 +35,20 @@ export class MoviesEndpoint extends BaseEndpoint {
|
|||||||
super(accessToken);
|
super(accessToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
async details(id: number): Promise<MovieDetails> {
|
async details<T extends AppendToResponseMovieKey[] | undefined>(
|
||||||
return await this.api.get<MovieDetails>(`${BASE_MOVIE}/${id}`);
|
id: number,
|
||||||
|
appendToResponse?: T
|
||||||
|
) {
|
||||||
|
const options = {
|
||||||
|
append_to_response: appendToResponse
|
||||||
|
? appendToResponse.join(',')
|
||||||
|
: undefined,
|
||||||
|
};
|
||||||
|
|
||||||
|
return await this.api.get<AppendToResponse<MovieDetails, T, 'movie'>>(
|
||||||
|
`${BASE_MOVIE}/${id}`,
|
||||||
|
options
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async alternativeTitles(id: number): Promise<AlternativeTitles> {
|
async alternativeTitles(id: number): Promise<AlternativeTitles> {
|
||||||
@@ -43,11 +57,8 @@ export class MoviesEndpoint extends BaseEndpoint {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async changes(id: number, options?: ChangeOptions): Promise<MovieChanges> {
|
async changes(id: number, options?: ChangeOptions): Promise<Changes> {
|
||||||
return await this.api.get<MovieChanges>(
|
return await this.api.get<Changes>(`${BASE_MOVIE}/${id}/changes`, options);
|
||||||
`${BASE_MOVIE}/${id}/changes`,
|
|
||||||
options
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async credits(id: number): Promise<Credits> {
|
async credits(id: number): Promise<Credits> {
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
import {
|
import {
|
||||||
|
AppendToResponse,
|
||||||
|
AppendToResponsePersonKey,
|
||||||
ChangeOptions,
|
ChangeOptions,
|
||||||
ExternalIds,
|
ExternalIds,
|
||||||
Image,
|
|
||||||
PageOption,
|
PageOption,
|
||||||
PeopleTranslations,
|
PeopleImages,
|
||||||
|
PersonTranslations,
|
||||||
PersonChanges,
|
PersonChanges,
|
||||||
PersonCombinedCredits,
|
PersonCombinedCredits,
|
||||||
PersonDetail,
|
PersonDetails,
|
||||||
PersonMovieCredit,
|
PersonMovieCredit,
|
||||||
PersonTvShowCredit,
|
PersonTvShowCredit,
|
||||||
PopularPersons,
|
PopularPersons,
|
||||||
@@ -21,8 +23,19 @@ export class PeopleEndpoint extends BaseEndpoint {
|
|||||||
super(accessToken);
|
super(accessToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
async details(id: number): Promise<PersonDetail> {
|
async details<T extends AppendToResponsePersonKey[] | undefined>(
|
||||||
return await this.api.get<PersonDetail>(`${BASE_PERSON}/${id}`);
|
id: number,
|
||||||
|
appendToResponse?: T
|
||||||
|
) {
|
||||||
|
const options = {
|
||||||
|
append_to_response: appendToResponse
|
||||||
|
? appendToResponse.join(',')
|
||||||
|
: undefined,
|
||||||
|
};
|
||||||
|
return await this.api.get<AppendToResponse<PersonDetails, T, 'person'>>(
|
||||||
|
`${BASE_PERSON}/${id}`,
|
||||||
|
options
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async changes(id: number, options?: ChangeOptions): Promise<PersonChanges> {
|
async changes(id: number, options?: ChangeOptions): Promise<PersonChanges> {
|
||||||
@@ -54,10 +67,8 @@ export class PeopleEndpoint extends BaseEndpoint {
|
|||||||
return await this.api.get<ExternalIds>(`${BASE_PERSON}/${id}/external_ids`);
|
return await this.api.get<ExternalIds>(`${BASE_PERSON}/${id}/external_ids`);
|
||||||
}
|
}
|
||||||
|
|
||||||
async images(id: number): Promise<{ id: number; profiles: Image[] }> {
|
async images(id: number): Promise<PeopleImages> {
|
||||||
return await this.api.get<{ id: number; profiles: Image[] }>(
|
return await this.api.get<PeopleImages>(`${BASE_PERSON}/${id}/images`);
|
||||||
`${BASE_PERSON}/${id}/images`
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async taggedImages(id: number, options?: PageOption): Promise<TaggedImages> {
|
async taggedImages(id: number, options?: PageOption): Promise<TaggedImages> {
|
||||||
@@ -67,14 +78,14 @@ export class PeopleEndpoint extends BaseEndpoint {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async translation(id: number): Promise<PeopleTranslations> {
|
async translation(id: number): Promise<PersonTranslations> {
|
||||||
return await this.api.get<PeopleTranslations>(
|
return await this.api.get<PersonTranslations>(
|
||||||
`${BASE_PERSON}/${id}/translations`
|
`${BASE_PERSON}/${id}/translations`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async latest(): Promise<PersonDetail> {
|
async latest(): Promise<PersonDetails> {
|
||||||
return await this.api.get<PersonDetail>(`${BASE_PERSON}/latest`);
|
return await this.api.get<PersonDetails>(`${BASE_PERSON}/latest`);
|
||||||
}
|
}
|
||||||
|
|
||||||
async popular(options?: PageOption): Promise<PopularPersons> {
|
async popular(options?: PageOption): Promise<PopularPersons> {
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
import { BaseEndpoint } from './base';
|
import { BaseEndpoint } from './base';
|
||||||
import {
|
import {
|
||||||
AlternativeTitles,
|
AlternativeTitles,
|
||||||
|
AppendToResponse,
|
||||||
|
AppendToResponseTvKey,
|
||||||
ChangeOptions,
|
ChangeOptions,
|
||||||
|
Changes,
|
||||||
ContentRatings,
|
ContentRatings,
|
||||||
Credits,
|
Credits,
|
||||||
EpisodeGroups,
|
EpisodeGroups,
|
||||||
@@ -21,7 +24,6 @@ import {
|
|||||||
SimilarTvShows,
|
SimilarTvShows,
|
||||||
TopRatedTvShows,
|
TopRatedTvShows,
|
||||||
Translations,
|
Translations,
|
||||||
TvShowChanges,
|
|
||||||
TvShowDetails,
|
TvShowDetails,
|
||||||
TvShowsAiringToday,
|
TvShowsAiringToday,
|
||||||
Videos,
|
Videos,
|
||||||
@@ -35,8 +37,19 @@ export class TvShowsEndpoint extends BaseEndpoint {
|
|||||||
super(accessToken);
|
super(accessToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
async details(id: number): Promise<TvShowDetails> {
|
async details<T extends AppendToResponseTvKey[] | undefined>(
|
||||||
return await this.api.get<TvShowDetails>(`${BASE_TV}/${id}`);
|
id: number,
|
||||||
|
appendToResponse?: T
|
||||||
|
) {
|
||||||
|
const options = {
|
||||||
|
append_to_response: appendToResponse
|
||||||
|
? appendToResponse.join(',')
|
||||||
|
: undefined,
|
||||||
|
};
|
||||||
|
return await this.api.get<AppendToResponse<TvShowDetails, T, 'tvShow'>>(
|
||||||
|
`${BASE_TV}/${id}`,
|
||||||
|
options
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async alternativeTitles(id: number): Promise<AlternativeTitles> {
|
async alternativeTitles(id: number): Promise<AlternativeTitles> {
|
||||||
@@ -45,11 +58,8 @@ export class TvShowsEndpoint extends BaseEndpoint {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async changes(id: number, options?: ChangeOptions): Promise<TvShowChanges> {
|
async changes(id: number, options?: ChangeOptions): Promise<Changes> {
|
||||||
return await this.api.get<TvShowChanges>(
|
return await this.api.get<Changes>(`${BASE_TV}/${id}/changes`, options);
|
||||||
`${BASE_TV}/${id}/changes`,
|
|
||||||
options
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async contentRatings(id: number): Promise<ContentRatings> {
|
async contentRatings(id: number): Promise<ContentRatings> {
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
export interface Change {
|
export interface MediaChange {
|
||||||
id: number;
|
id: number;
|
||||||
adult: boolean | undefined;
|
adult: boolean | undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Changes {
|
export interface MediaChanges {
|
||||||
results: Change[];
|
results: MediaChange[];
|
||||||
page: number;
|
page: number;
|
||||||
total_pages: number;
|
total_pages: number;
|
||||||
total_results: number;
|
total_results: number;
|
||||||
@@ -15,3 +15,21 @@ export interface ChangeOptions {
|
|||||||
start_date?: string;
|
start_date?: string;
|
||||||
page?: number;
|
page?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface Changes {
|
||||||
|
changes: Change[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Change {
|
||||||
|
key: string;
|
||||||
|
items: ChangeItem[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ChangeItem {
|
||||||
|
id: string;
|
||||||
|
action: string;
|
||||||
|
time: string;
|
||||||
|
value: Array<number>;
|
||||||
|
iso_639_1: string;
|
||||||
|
original_value: Array<number>;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
export interface Images {
|
export interface ImageConfiguration {
|
||||||
base_url: string;
|
base_url: string;
|
||||||
secure_base_url: string;
|
secure_base_url: string;
|
||||||
backdrop_sizes: BackdropSizes[];
|
backdrop_sizes: BackdropSizes[];
|
||||||
@@ -9,7 +9,7 @@ export interface Images {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface Configuration {
|
export interface Configuration {
|
||||||
images: Images;
|
images: ImageConfiguration;
|
||||||
change_keys: ChangeKeys[];
|
change_keys: ChangeKeys[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -128,6 +128,7 @@ export interface ContentRatings {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface ContentRatingsResult {
|
export interface ContentRatingsResult {
|
||||||
|
descriptor: unknown[];
|
||||||
iso_3166_1: string;
|
iso_3166_1: string;
|
||||||
rating: string;
|
rating: string;
|
||||||
}
|
}
|
||||||
@@ -202,3 +203,10 @@ export interface Image {
|
|||||||
vote_count: number;
|
vote_count: number;
|
||||||
width: number;
|
width: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface Images {
|
||||||
|
id: number;
|
||||||
|
backdrops: Image[];
|
||||||
|
logos: Image[];
|
||||||
|
posters: Image[];
|
||||||
|
}
|
||||||
|
|||||||
@@ -94,24 +94,6 @@ export interface MovieLists {
|
|||||||
total_results: 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 {
|
export interface LatestMovie {
|
||||||
adult: boolean;
|
adult: boolean;
|
||||||
backdrop_path?: string;
|
backdrop_path?: string;
|
||||||
|
|||||||
@@ -1,3 +1,31 @@
|
|||||||
|
import {
|
||||||
|
AlternativeTitles,
|
||||||
|
Changes,
|
||||||
|
ContentRatings,
|
||||||
|
Credits,
|
||||||
|
EpisodeGroups,
|
||||||
|
ExternalIds,
|
||||||
|
Images,
|
||||||
|
Keywords,
|
||||||
|
MovieLists,
|
||||||
|
PeopleImages,
|
||||||
|
PersonTranslations,
|
||||||
|
PersonChanges,
|
||||||
|
PersonCombinedCredits,
|
||||||
|
PersonMovieCredit,
|
||||||
|
PersonTvShowCredit,
|
||||||
|
Recommendations,
|
||||||
|
ReleaseDates,
|
||||||
|
Reviews,
|
||||||
|
ScreenedTheatrically,
|
||||||
|
SimilarMovies,
|
||||||
|
SimilarTvShows,
|
||||||
|
TaggedImages,
|
||||||
|
Translations,
|
||||||
|
Videos,
|
||||||
|
WatchProviders,
|
||||||
|
} from '.';
|
||||||
|
|
||||||
export interface LanguageOption {
|
export interface LanguageOption {
|
||||||
language?: string;
|
language?: string;
|
||||||
}
|
}
|
||||||
@@ -9,3 +37,147 @@ export interface RegionOption {
|
|||||||
export interface PageOption {
|
export interface PageOption {
|
||||||
page?: number;
|
page?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type AppendToResponseMovieKey =
|
||||||
|
| 'images'
|
||||||
|
| 'videos'
|
||||||
|
| 'credits'
|
||||||
|
| 'recommendations'
|
||||||
|
| 'reviews'
|
||||||
|
| 'changes'
|
||||||
|
| 'similar'
|
||||||
|
| 'lists'
|
||||||
|
| 'release_dates'
|
||||||
|
| 'alternative_titles'
|
||||||
|
| 'external_ids'
|
||||||
|
| 'translations'
|
||||||
|
| 'watch/providers'
|
||||||
|
| 'keywords';
|
||||||
|
|
||||||
|
export type AppendToResponseTvKey =
|
||||||
|
| 'content_ratings'
|
||||||
|
| 'images'
|
||||||
|
| 'videos'
|
||||||
|
| 'credits'
|
||||||
|
| 'recommendations'
|
||||||
|
| 'reviews'
|
||||||
|
| 'changes'
|
||||||
|
| 'similar'
|
||||||
|
| 'alternative_titles'
|
||||||
|
| 'external_ids'
|
||||||
|
| 'translations'
|
||||||
|
| 'watch/providers'
|
||||||
|
| 'aggregate_credits'
|
||||||
|
| 'episode_groups'
|
||||||
|
| 'screened_theatrically'
|
||||||
|
| 'keywords';
|
||||||
|
|
||||||
|
export type AppendToResponsePersonKey =
|
||||||
|
| 'images'
|
||||||
|
| 'changes'
|
||||||
|
| 'movie_credits'
|
||||||
|
| 'tv_credits'
|
||||||
|
| 'combined_credits'
|
||||||
|
| 'external_ids'
|
||||||
|
| 'tagged_images'
|
||||||
|
| 'translations';
|
||||||
|
|
||||||
|
type AppendToResponseAllKeys =
|
||||||
|
| AppendToResponseTvKey
|
||||||
|
| AppendToResponseMovieKey
|
||||||
|
| AppendToResponsePersonKey;
|
||||||
|
|
||||||
|
export type AppendToResponseMediaType = 'movie' | 'tvShow' | 'person';
|
||||||
|
|
||||||
|
export type AppendToResponse<
|
||||||
|
K,
|
||||||
|
T extends AppendToResponseAllKeys[] | undefined,
|
||||||
|
Media extends AppendToResponseMediaType
|
||||||
|
> = K &
|
||||||
|
(T extends undefined
|
||||||
|
? object
|
||||||
|
: T extends Array<unknown>
|
||||||
|
? ('credits' extends T[number]
|
||||||
|
? { credits: Omit<Credits, 'id'> }
|
||||||
|
: object) &
|
||||||
|
('videos' extends T[number] ? { videos: Omit<Videos, 'id'> } : object) &
|
||||||
|
('images' extends T[number]
|
||||||
|
? {
|
||||||
|
images: Omit<
|
||||||
|
Media extends 'person' ? PeopleImages : Images,
|
||||||
|
'id'
|
||||||
|
>;
|
||||||
|
}
|
||||||
|
: object) &
|
||||||
|
('recommendations' extends T[number]
|
||||||
|
? { recommendations: Recommendations }
|
||||||
|
: object) &
|
||||||
|
('reviews' extends T[number]
|
||||||
|
? { reviews: Omit<Reviews, 'id'> }
|
||||||
|
: object) &
|
||||||
|
('reviews' extends T[number]
|
||||||
|
? { reviews: Omit<Translations, 'id'> }
|
||||||
|
: object) &
|
||||||
|
('changes' extends T[number]
|
||||||
|
? {
|
||||||
|
changes: Omit<
|
||||||
|
Media extends 'person' ? PersonChanges : Changes,
|
||||||
|
'id'
|
||||||
|
>;
|
||||||
|
}
|
||||||
|
: object) &
|
||||||
|
('keywords' extends T[number]
|
||||||
|
? { keywords: Omit<Keywords, 'id'> }
|
||||||
|
: object) &
|
||||||
|
('lists' extends T[number]
|
||||||
|
? { lists: Omit<MovieLists, 'id'> }
|
||||||
|
: object) &
|
||||||
|
('release_dates' extends T[number]
|
||||||
|
? { release_dates: Omit<ReleaseDates, 'id'> }
|
||||||
|
: object) &
|
||||||
|
('alternative_titles' extends T[number]
|
||||||
|
? { alternative_titles: Omit<AlternativeTitles, 'id'> }
|
||||||
|
: object) &
|
||||||
|
('external_ids' extends T[number]
|
||||||
|
? { external_ids: Omit<ExternalIds, 'id'> }
|
||||||
|
: object) &
|
||||||
|
('translations' extends T[number]
|
||||||
|
? { translations: Omit<Media extends 'person' ? PersonTranslations : Translations, 'id'> }
|
||||||
|
: object) &
|
||||||
|
('watch/providers' extends T[number]
|
||||||
|
? { 'watch/providers': Omit<WatchProviders, 'id'> }
|
||||||
|
: object) &
|
||||||
|
('aggregate_credits' extends T[number]
|
||||||
|
? { aggregate_credits: Omit<Credits, 'id'> }
|
||||||
|
: object) &
|
||||||
|
('episode_groups' extends T[number]
|
||||||
|
? { episode_groups: Omit<EpisodeGroups, 'id'> }
|
||||||
|
: object) &
|
||||||
|
('screened_theatrically' extends T[number]
|
||||||
|
? { screened_theatrically: Omit<ScreenedTheatrically, 'id'> }
|
||||||
|
: object) &
|
||||||
|
('similar' extends T[number]
|
||||||
|
? {
|
||||||
|
similar: Media extends 'movie'
|
||||||
|
? SimilarMovies
|
||||||
|
: Media extends 'tvShow'
|
||||||
|
? SimilarTvShows
|
||||||
|
: unknown;
|
||||||
|
}
|
||||||
|
: object) &
|
||||||
|
('content_ratings' extends T[number]
|
||||||
|
? { content_ratings: Omit<ContentRatings, 'id'> }
|
||||||
|
: object) &
|
||||||
|
('movie_credits' extends T[number]
|
||||||
|
? { movie_credits: Omit<PersonMovieCredit, 'id'> }
|
||||||
|
: object) &
|
||||||
|
('tv_credits' extends T[number]
|
||||||
|
? { tv_credits: Omit<PersonTvShowCredit, 'id'> }
|
||||||
|
: object) &
|
||||||
|
('combined_credits' extends T[number]
|
||||||
|
? { combined_credits: Omit<PersonCombinedCredits, 'id'> }
|
||||||
|
: object) &
|
||||||
|
('tagged_images' extends T[number]
|
||||||
|
? { tagged_images: TaggedImages }
|
||||||
|
: object)
|
||||||
|
: never);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Movie, Person, TV } from '.';
|
import { Image, Movie, Person, TV } from '.';
|
||||||
|
|
||||||
interface Cast {
|
interface Cast {
|
||||||
character: string;
|
character: string;
|
||||||
@@ -79,7 +79,7 @@ export interface PersonCombinedCredits {
|
|||||||
id: number;
|
id: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PersonDetail {
|
export interface PersonDetails {
|
||||||
birthday: string;
|
birthday: string;
|
||||||
known_for_department: string;
|
known_for_department: string;
|
||||||
deathday: string;
|
deathday: string;
|
||||||
@@ -120,6 +120,11 @@ export interface PopularPersons {
|
|||||||
total_pages: number;
|
total_pages: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface PeopleImages {
|
||||||
|
id: number;
|
||||||
|
profiles: Image[];
|
||||||
|
}
|
||||||
|
|
||||||
export interface TaggedImage {
|
export interface TaggedImage {
|
||||||
aspect_ratio: number;
|
aspect_ratio: number;
|
||||||
file_path: string;
|
file_path: string;
|
||||||
@@ -141,7 +146,7 @@ export interface TaggedImages {
|
|||||||
total_pages: number;
|
total_pages: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PeopleTranslations {
|
export interface PersonTranslations {
|
||||||
id: number;
|
id: number;
|
||||||
translations: {
|
translations: {
|
||||||
iso_3166_1: string;
|
iso_3166_1: string;
|
||||||
|
|||||||
@@ -134,24 +134,6 @@ export interface SeasonDetails {
|
|||||||
season_number: number;
|
season_number: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface TvShowItem {
|
|
||||||
id: string;
|
|
||||||
action: string;
|
|
||||||
time: string;
|
|
||||||
value: Array<number>;
|
|
||||||
iso_639_1: string;
|
|
||||||
original_value: Array<number>;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface TvShowChange {
|
|
||||||
key: string;
|
|
||||||
items: TvShowItem[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface TvShowChanges {
|
|
||||||
changes: TvShowChange[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Network {
|
export interface Network {
|
||||||
id: number;
|
id: number;
|
||||||
logo_path: string;
|
logo_path: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user