UNPKG

identify-media

Version:

Analyse file path and content to make search criteria for media APIs

47 lines (43 loc) 973 B
export interface OmdbSearchQuery { s: string; y?: string; type?: string; } export const isOmdbSearchQuery = (possible: unknown): possible is OmdbSearchQuery => !!possible && (possible as OmdbSearchQuery).s !== undefined; export interface OmdbEntry { Title: string; Year: string; Released: string; Rated: string; Runtime: string; imdbID: string; Type: string; Poster: string; Genre: string; Director: string; Writer: string; Actors: string; Plot: string; Language: string; Country: string; Awards: string; Metascore: string; imdbRating: string; imdbVotes: string; totalSeasons: string; Response: string; DVD: string; BoxOffice: string; Production: string; Website: string; Ratings: { Source: string; Value: string; }[]; } export interface OmdbSearchResponse { Error?: string; Response?: string; Search?: OmdbEntry[]; }