applying format
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
import { CompanyDetails, AlternativeNames, CompanyImages } from './../types/companies';
|
||||
import {
|
||||
CompanyDetails,
|
||||
AlternativeNames,
|
||||
CompanyImages,
|
||||
} from './../types/companies';
|
||||
import { BaseEndpoint } from './base';
|
||||
|
||||
export class CompaniesEndpoint extends BaseEndpoint {
|
||||
@@ -11,7 +15,9 @@ export class CompaniesEndpoint extends BaseEndpoint {
|
||||
}
|
||||
|
||||
async alternativeNames(id: number): Promise<AlternativeNames> {
|
||||
return await this.api.get<AlternativeNames>(`/company/${id}/alternative_names`);
|
||||
return await this.api.get<AlternativeNames>(
|
||||
`/company/${id}/alternative_names`
|
||||
);
|
||||
}
|
||||
|
||||
async images(id: number): Promise<CompanyImages> {
|
||||
|
||||
@@ -16,4 +16,3 @@ export * from './keywords';
|
||||
export * from './collections';
|
||||
export * from './tv-seasons';
|
||||
export * from './tv-episode';
|
||||
|
||||
|
||||
@@ -58,8 +58,14 @@ export class MoviesEndpoint extends BaseEndpoint {
|
||||
);
|
||||
}
|
||||
|
||||
async changes(id: number, options?: ChangeOption): Promise<Changes<MovieChangeValue>> {
|
||||
return await this.api.get<Changes<MovieChangeValue>>(`${BASE_MOVIE}/${id}/changes`, options);
|
||||
async changes(
|
||||
id: number,
|
||||
options?: ChangeOption
|
||||
): Promise<Changes<MovieChangeValue>> {
|
||||
return await this.api.get<Changes<MovieChangeValue>>(
|
||||
`${BASE_MOVIE}/${id}/changes`,
|
||||
options
|
||||
);
|
||||
}
|
||||
|
||||
async credits(id: number): Promise<Credits> {
|
||||
|
||||
@@ -59,8 +59,14 @@ export class TvShowsEndpoint extends BaseEndpoint {
|
||||
);
|
||||
}
|
||||
|
||||
async changes(id: number, options?: ChangeOption): Promise<Changes<TvShowChangeValue>> {
|
||||
return await this.api.get<Changes<TvShowChangeValue>>(`${BASE_TV}/${id}/changes`, options);
|
||||
async changes(
|
||||
id: number,
|
||||
options?: ChangeOption
|
||||
): Promise<Changes<TvShowChangeValue>> {
|
||||
return await this.api.get<Changes<TvShowChangeValue>>(
|
||||
`${BASE_TV}/${id}/changes`,
|
||||
options
|
||||
);
|
||||
}
|
||||
|
||||
async contentRatings(id: number): Promise<ContentRatings> {
|
||||
|
||||
@@ -94,7 +94,7 @@ export class TMDB {
|
||||
return new CollectionsEndpoint(this.accessToken);
|
||||
}
|
||||
|
||||
get tvSeasons() : TvSeasonsEndpoint {
|
||||
get tvSeasons(): TvSeasonsEndpoint {
|
||||
return new TvSeasonsEndpoint(this.accessToken);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,6 @@ export interface Name {
|
||||
}
|
||||
|
||||
export interface CompanyImages {
|
||||
id: number;
|
||||
logos: Image[];
|
||||
id: number;
|
||||
logos: Image[];
|
||||
}
|
||||
|
||||
@@ -164,9 +164,9 @@ export type AppendToResponse<
|
||||
? MovieChangeValue
|
||||
: Media extends 'tvShow'
|
||||
? TvShowChangeValue
|
||||
: Media extends 'tvSeason'
|
||||
? TvSeasonChangeValue :
|
||||
TvEpisodeChangeValue
|
||||
: Media extends 'tvSeason'
|
||||
? TvSeasonChangeValue
|
||||
: TvEpisodeChangeValue
|
||||
>;
|
||||
}
|
||||
: object) &
|
||||
|
||||
@@ -55,4 +55,4 @@ export interface TvEpisodeTranslations {
|
||||
};
|
||||
}
|
||||
|
||||
export type TvEpisodeChangeValue = string | unknown;
|
||||
export type TvEpisodeChangeValue = string | unknown;
|
||||
|
||||
Reference in New Issue
Block a user