UNPKG

justwatch-api-client

Version:

A client library to interact with the unofficial JustWatch GraphQL API for searching movies/shows and getting streaming information.

56 lines (55 loc) 1.66 kB
export interface SearchResult { title: string | null; originalReleaseYear: number | null; posterUrl: string; fullPath: string | null; } export interface StreamProvider { Resolution: string; Type: string; Price: string; Provider: string; Link: string; Name: string; Audio: string[]; Subtitle: string[]; Icon: string; } export interface StreamingInfo { ID: string; originalTitle?: string; isReleased?: boolean; releastyear?: string; genres?: string[]; imdbScore?: string | Number; imdbCount?: string | Number; tmdbRating?: string | Number; tomatoMeter?: string | Number; productionCountries?: string[]; shortDescription?: string; Streams: StreamProvider[]; } export interface SimilarTitle { type: string; title: string; poster: string | null; fullPath: string; genres: string[]; scoring: { imdbVotes?: number | null; imdbScore?: number | null; tomatoMeter?: number | null; }; } declare class JustWatchAPI { private timeout; private fetchWithProxy; constructor(timeout?: number); searchByQuery(searchQuery: string, country?: string): Promise<SearchResult[]>; search(query: string, country?: string): Promise<SearchResult[]>; getDataByPath(itemFullPath: string, country?: string): Promise<StreamingInfo>; getData(itemFullPath: string, country?: string): Promise<StreamingInfo>; getSimiliarTitlesByShowID(showid: string, country: string): Promise<SimilarTitle[]>; getSimiliarTitles(showid: string, country?: string): Promise<SimilarTitle[]>; } export default JustWatchAPI;