-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.ts
124 lines (117 loc) · 2.11 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
export type MediaType = 'movie' | 'tv'
export interface Media {
adult: boolean
backdrop_path: string
genre_ids: number[]
id: string
original_language: string
original_title: string
overview: string
popularity: number
poster_path: string
release_date?: string
first_air_date?: string
title: string
name?: string
video: boolean
vote_average: number
vote_count: number
media_type?: MediaType
// details
homepage?: string
runtime?: number
budget?: number
revenue?: number
status?: string
genres?: Genre[]
production_companies?: any[]
credits?: {
cast: Person[]
crew: Person[]
}
videos?: {
results: Video[]
}
images?: {
backdrops: Image[]
posters: Image[]
}
external_ids?: ExternalIds
// cast
character?: string
}
export interface Person {
adult: boolean
gender: number
id: number
known_for_department: string
name: string
original_name: string
profile_path: string
popularity: number
cast_id?: number
job?: string
character?: string
credit_id: string
order: number
// details
also_known_as?: string[]
birthday?: string
place_of_birth?: string
homepage?: string
biography?: string
external_ids?: ExternalIds
combined_credits?: {
cast?: Media[]
crew?: Media[]
}
images?: {
profiles: Image[]
}
}
export interface Video {
iso_639_1: string
iso_3166_1: string
name: string
key: string
site: string
size: number
type: string
official: boolean
published_at: string
id: string
}
export interface Image {
aspect_ratio: number
height: number
iso_639_1: string
file_path: string
vote_average: number
vote_count: number
width: number
}
export interface ExternalIds {
imdb_id?: string
facebook_id?: string
instagram_id?: string
twitter_id?: string
linkedin_id?: string
github_id?: string
email?: string
homepage?: string
}
export interface Genre {
id: number
name: string
}
export interface QueryItem {
type: MediaType
title: string
category: string
}
export interface ListType {
page: number
results: Media[]
total_pages: number
total_results: number
}