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.
45 lines
927 B
45 lines
927 B
export type RawOmdbData = Readonly<{
|
|
Actors: string;
|
|
Awards: string;
|
|
BoxOffice?: string;
|
|
Country: string;
|
|
DVD?: string;
|
|
Director: string;
|
|
Genre: string;
|
|
Language: string;
|
|
Metascore: string;
|
|
Plot: string;
|
|
Poster: string;
|
|
Production?: string;
|
|
Rated: string;
|
|
Ratings: Readonly<
|
|
{
|
|
Source: string;
|
|
Value: string;
|
|
}[]
|
|
>;
|
|
Released: string;
|
|
Runtime: string;
|
|
Title: string;
|
|
Type: 'movie' | 'series';
|
|
Website?: string;
|
|
Writer: string;
|
|
Year: string;
|
|
imdbID: string;
|
|
imdbRating: string;
|
|
imdbVotes: string;
|
|
totalSeasons?: string;
|
|
}>;
|
|
|
|
export type OmdbResponse =
|
|
| {
|
|
Response: 'False';
|
|
Error: string;
|
|
}
|
|
| (RawOmdbData & {
|
|
Response: 'True';
|
|
});
|
|
|
|
export type OmdbApiClient = {
|
|
fetchMetadata(imdbId: string): Promise<RawOmdbData | undefined>;
|
|
};
|
|
|