You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
960 B
46 lines
960 B
export type RawOmdbData = {
|
|
Actors: string;
|
|
Awards?: string;
|
|
BoxOffice?: string;
|
|
Country: string;
|
|
DVD?: string;
|
|
Director: string;
|
|
Episode?: string;
|
|
Genre: string;
|
|
Language: string;
|
|
Metascore: string;
|
|
Plot: string;
|
|
Poster: string;
|
|
Production?: string;
|
|
Rated: string;
|
|
Ratings: {
|
|
Source: string;
|
|
Value: string;
|
|
}[];
|
|
Released: string;
|
|
Runtime: string;
|
|
Season?: string;
|
|
Title: string;
|
|
Type: 'movie' | 'series' | 'episode';
|
|
Website?: string;
|
|
Writer: string;
|
|
Year: string;
|
|
imdbID: string;
|
|
imdbRating: string;
|
|
imdbVotes: string;
|
|
seriesID?: string;
|
|
totalSeasons?: string;
|
|
};
|
|
|
|
export type OmdbResponse =
|
|
| {
|
|
Response: 'False';
|
|
Error: string;
|
|
}
|
|
| (RawOmdbData & {
|
|
Response: 'True';
|
|
});
|
|
|
|
export type OmdbApiClient = {
|
|
fetchMetadata(imdbId: string): Promise<RawOmdbData | undefined>;
|
|
};
|
|
|