Formatting with eslint
Should probably be configured to run for every commit in the future
This commit is contained in:
@@ -10,7 +10,7 @@ import {
|
|||||||
PersonMovieCredit,
|
PersonMovieCredit,
|
||||||
PersonTvShowCredit,
|
PersonTvShowCredit,
|
||||||
PopularPersons,
|
PopularPersons,
|
||||||
TaggedImages
|
TaggedImages,
|
||||||
} from '../types';
|
} from '../types';
|
||||||
import { parseOptions } from '../utils';
|
import { parseOptions } from '../utils';
|
||||||
import { BaseEndpoint } from './base';
|
import { BaseEndpoint } from './base';
|
||||||
@@ -40,15 +40,15 @@ export class PeopleEndpoint extends BaseEndpoint {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async combinedCredits(id: number) : Promise<PersonCombinedCredits> {
|
async combinedCredits(id: number) : Promise<PersonCombinedCredits> {
|
||||||
return await this.api.get<PersonCombinedCredits>(`${BASE_PERSON}/${id}/combined_credits`)
|
return await this.api.get<PersonCombinedCredits>(`${BASE_PERSON}/${id}/combined_credits`);
|
||||||
}
|
}
|
||||||
|
|
||||||
async externalId(id: number): Promise<ExternalIds>{
|
async externalId(id: number): Promise<ExternalIds>{
|
||||||
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<{id: number, profiles: Image[]}>{
|
||||||
return await this.api.get<{id: number, profiles: Image[]}>(`${BASE_PERSON}/${id}/images`)
|
return await this.api.get<{id: number, profiles: Image[]}>(`${BASE_PERSON}/${id}/images`);
|
||||||
}
|
}
|
||||||
|
|
||||||
async taggedImages(id: number, options?: PageOption): Promise<TaggedImages>{
|
async taggedImages(id: number, options?: PageOption): Promise<TaggedImages>{
|
||||||
@@ -57,7 +57,7 @@ export class PeopleEndpoint extends BaseEndpoint {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async translation(id: number) : Promise<PeopleTranslations>{
|
async translation(id: number) : Promise<PeopleTranslations>{
|
||||||
return await this.api.get<PeopleTranslations>(`${BASE_PERSON}/${id}/translations`)
|
return await this.api.get<PeopleTranslations>(`${BASE_PERSON}/${id}/translations`);
|
||||||
}
|
}
|
||||||
|
|
||||||
async latest(): Promise<PersonDetail>{
|
async latest(): Promise<PersonDetail>{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { MediaType, TimeWindow, TrendingResults, } from '../types';
|
import { MediaType, TimeWindow, TrendingResults } from '../types';
|
||||||
import { BaseEndpoint } from './base';
|
import { BaseEndpoint } from './base';
|
||||||
|
|
||||||
export class TrendingEndpoint extends BaseEndpoint {
|
export class TrendingEndpoint extends BaseEndpoint {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Movie } from ".";
|
import { Movie } from '.';
|
||||||
|
|
||||||
export interface Collection {
|
export interface Collection {
|
||||||
id: number;
|
id: number;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Movie, TV } from ".";
|
import { Movie, TV } from '.';
|
||||||
|
|
||||||
export type SortOption =
|
export type SortOption =
|
||||||
| 'popularity.asc'
|
| 'popularity.asc'
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Episode, Media, MediaType, Movie, Person, Season, TV } from '.';
|
import { Episode, MediaType, Movie, Person, Season, TV } from '.';
|
||||||
|
|
||||||
export type ExternalSource =
|
export type ExternalSource =
|
||||||
| 'imdb_id'
|
| 'imdb_id'
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Movie, Person, TV, TvShowItem } from ".";
|
import { Movie, Person, TV } from '.';
|
||||||
|
|
||||||
interface Cast {
|
interface Cast {
|
||||||
character: string;
|
character: string;
|
||||||
@@ -80,30 +80,30 @@ export interface PersonCombinedCredits {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface PersonDetail {
|
export interface PersonDetail {
|
||||||
birthday: string,
|
birthday: string;
|
||||||
known_for_department: string,
|
known_for_department: string;
|
||||||
deathday: string,
|
deathday: string;
|
||||||
id: number,
|
id: number;
|
||||||
name: string,
|
name: string;
|
||||||
also_known_as: string[]
|
also_known_as: string[];
|
||||||
gender: number,
|
gender: number;
|
||||||
biography: string,
|
biography: string;
|
||||||
popularity: number,
|
popularity: number;
|
||||||
place_of_birth: string,
|
place_of_birth: string;
|
||||||
profile_path: string,
|
profile_path: string;
|
||||||
adult: boolean,
|
adult: boolean;
|
||||||
imdb_id: string,
|
imdb_id: string;
|
||||||
homepage: string
|
homepage: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PersonChange{
|
export interface PersonChange {
|
||||||
id: string;
|
id: string;
|
||||||
action: string;
|
action: string;
|
||||||
time: string;
|
time: string;
|
||||||
iso_639_1: string;
|
iso_639_1: string;
|
||||||
iso_3166_1: string;
|
iso_3166_1: string;
|
||||||
value: string | { profile: { file_path: string;} };
|
value: string | { profile: { file_path: string } };
|
||||||
original_value: string | { profile: { file_path: string; } };
|
original_value: string | { profile: { file_path: string } };
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PersonChanges {
|
export interface PersonChanges {
|
||||||
@@ -113,14 +113,14 @@ export interface PersonChanges {
|
|||||||
}[];
|
}[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PopularPersons{
|
export interface PopularPersons {
|
||||||
page: number;
|
page: number;
|
||||||
results: Person[];
|
results: Person[];
|
||||||
total_results: number;
|
total_results: number;
|
||||||
total_pages: number;
|
total_pages: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface TaggedImage{
|
export interface TaggedImage {
|
||||||
aspect_ratio: number;
|
aspect_ratio: number;
|
||||||
file_path: string;
|
file_path: string;
|
||||||
height: number;
|
height: number;
|
||||||
@@ -131,17 +131,17 @@ export interface TaggedImage{
|
|||||||
width: number;
|
width: number;
|
||||||
image_type: string;
|
image_type: string;
|
||||||
media_type: string;
|
media_type: string;
|
||||||
media: Movie | TV
|
media: Movie | TV;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface TaggedImages{
|
export interface TaggedImages {
|
||||||
page: number;
|
page: number;
|
||||||
results: TaggedImage[];
|
results: TaggedImage[];
|
||||||
total_results: number;
|
total_results: number;
|
||||||
total_pages: number;
|
total_pages: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PeopleTranslations{
|
export interface PeopleTranslations {
|
||||||
id: number;
|
id: number;
|
||||||
translations: {
|
translations: {
|
||||||
iso_3166_1: string;
|
iso_3166_1: string;
|
||||||
@@ -149,7 +149,7 @@ export interface PeopleTranslations{
|
|||||||
name: string;
|
name: string;
|
||||||
english_name: string;
|
english_name: string;
|
||||||
data: {
|
data: {
|
||||||
biography: string
|
biography: string;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -4,12 +4,12 @@ export type MediaType = 'all' | 'movie' | 'tv' | 'person';
|
|||||||
export type TimeWindow = 'day' | 'week';
|
export type TimeWindow = 'day' | 'week';
|
||||||
|
|
||||||
type TrendingResult<T extends MediaType> = T extends 'tv'
|
type TrendingResult<T extends MediaType> = T extends 'tv'
|
||||||
? TV
|
? TV
|
||||||
: T extends 'movie'
|
: T extends 'movie'
|
||||||
? Movie
|
? Movie
|
||||||
: T extends 'person'
|
: T extends 'person'
|
||||||
? Person
|
? Person
|
||||||
: TV | Movie | Person;
|
: TV | Movie | Person;
|
||||||
|
|
||||||
export interface TrendingResults<T extends MediaType> {
|
export interface TrendingResults<T extends MediaType> {
|
||||||
page: number;
|
page: number;
|
||||||
|
|||||||
Reference in New Issue
Block a user