|
|
|
@ -262,3 +262,52 @@ export interface TMDBMediaStatic {
@@ -262,3 +262,52 @@ export interface TMDBMediaStatic {
|
|
|
|
|
getMediaDetails(id: string, type: MWMediaType.MOVIE): TMDBMediaDetailsPromise; |
|
|
|
|
getMediaDetails(id: string, type: MWMediaType): TMDBMediaDetailsPromise; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export type JWContentTypes = "movie" | "show"; |
|
|
|
|
|
|
|
|
|
export type JWSearchQuery = { |
|
|
|
|
content_types: JWContentTypes[]; |
|
|
|
|
page: number; |
|
|
|
|
page_size: number; |
|
|
|
|
query: string; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
export type JWPage<T> = { |
|
|
|
|
items: T[]; |
|
|
|
|
page: number; |
|
|
|
|
page_size: number; |
|
|
|
|
total_pages: number; |
|
|
|
|
total_results: number; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
export const JW_API_BASE = "https://apis.justwatch.com"; |
|
|
|
|
export const JW_IMAGE_BASE = "https://images.justwatch.com"; |
|
|
|
|
|
|
|
|
|
export type JWSeasonShort = { |
|
|
|
|
title: string; |
|
|
|
|
id: number; |
|
|
|
|
season_number: number; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
export type JWEpisodeShort = { |
|
|
|
|
title: string; |
|
|
|
|
id: number; |
|
|
|
|
episode_number: number; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
export type JWMediaResult = { |
|
|
|
|
title: string; |
|
|
|
|
poster?: string; |
|
|
|
|
id: number; |
|
|
|
|
original_release_year?: number; |
|
|
|
|
jw_entity_id: string; |
|
|
|
|
object_type: JWContentTypes; |
|
|
|
|
seasons?: JWSeasonShort[]; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
export type JWSeasonMetaResult = { |
|
|
|
|
title: string; |
|
|
|
|
id: string; |
|
|
|
|
season_number: number; |
|
|
|
|
episodes: JWEpisodeShort[]; |
|
|
|
|
}; |
|
|
|
|