UNPKG

streaming-availability

Version:

Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries!

291 lines (290 loc) 16.1 kB
/** * Streaming Availability API * Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries! * * The version of the OpenAPI document: 3.3.1 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import * as runtime from '../runtime'; import type { ChangesResponseSchema, CountriesResponseSchema, GenresResponseSchema, GetResponseSchema, SearchFiltersResponseSchema, SearchTitleResponseSchema, ServicesResponseSchema, UpcomingChangesResponseSchema } from '../models/index'; export interface ChangesRequest { country: string; services: string; changeType: ChangesChangeTypeEnum; targetType: ChangesTargetTypeEnum; since?: number; cursor?: string; desc?: boolean; outputLanguage?: ChangesOutputLanguageEnum; } export interface GetByIdRequest { imdbId?: string; tmdbId?: string; seriesGranularity?: GetByIdSeriesGranularityEnum; outputLanguage?: GetByIdOutputLanguageEnum; } export interface LeavingRequest { country: string; services: string; targetType: LeavingTargetTypeEnum; cursor?: string; outputLanguage?: LeavingOutputLanguageEnum; } export interface SearchByFiltersRequest { country: string; services: string; outputLanguage?: SearchByFiltersOutputLanguageEnum; showType?: SearchByFiltersShowTypeEnum; seriesGranularity?: SearchByFiltersSeriesGranularityEnum; genres?: string; genresRelation?: SearchByFiltersGenresRelationEnum; showOriginalLanguage?: string; yearMin?: number; yearMax?: number; keyword?: string; orderBy?: SearchByFiltersOrderByEnum; desc?: boolean; cursor?: string; } export interface SearchByTitleRequest { title: string; country: string; showType?: SearchByTitleShowTypeEnum; seriesGranularity?: SearchByTitleSeriesGranularityEnum; outputLanguage?: SearchByTitleOutputLanguageEnum; } /** * */ export declare class DefaultApi extends runtime.BaseAPI { /** * Query the new, removed or updated movies/series/seasons/episodes in a given list of streaming services. Results are ordered by the date of the changes. Changes listed per page is \"25\" when \"target_type\" is \"show\", \"movie\" or \"series\"; \"50\" when it is \"season\"; and \"100\" when it is \"episode\". Note that changes for the same show are aggregated together into a single \"changes\" array for that show. Which means there might be cases where the count of the items in the result array might be fewer than the maximum changes listed per page. (i.e. When \"target_type\" is \"season\", there might be 10 items in the result array, but the overall total number of changes listed across the \"changes\" arrays will be still 50, given that there are at least 50 changes matches with the given query.) * Changes */ changesRaw(requestParameters: ChangesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChangesResponseSchema>>; /** * Query the new, removed or updated movies/series/seasons/episodes in a given list of streaming services. Results are ordered by the date of the changes. Changes listed per page is \"25\" when \"target_type\" is \"show\", \"movie\" or \"series\"; \"50\" when it is \"season\"; and \"100\" when it is \"episode\". Note that changes for the same show are aggregated together into a single \"changes\" array for that show. Which means there might be cases where the count of the items in the result array might be fewer than the maximum changes listed per page. (i.e. When \"target_type\" is \"season\", there might be 10 items in the result array, but the overall total number of changes listed across the \"changes\" arrays will be still 50, given that there are at least 50 changes matches with the given query.) * Changes */ changes(requestParameters: ChangesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChangesResponseSchema>; /** * Get all the supported countries and the list of the supported services and their details for each country. Details of services include names, logos, supported streaming types (subscription, rent, buy, free etc.) and list of available addons/channels. * Countries */ countriesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CountriesResponseSchema>>; /** * Get all the supported countries and the list of the supported services and their details for each country. Details of services include names, logos, supported streaming types (subscription, rent, buy, free etc.) and list of available addons/channels. * Countries */ countries(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CountriesResponseSchema>; /** * Get the ids and names of the supported genres. * Genres */ genresRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GenresResponseSchema>>; /** * Get the ids and names of the supported genres. * Genres */ genres(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenresResponseSchema>; /** * Get the details of a show via IMDb or TMDb id, including the global streaming availability info. * Get by Id */ getByIdRaw(requestParameters: GetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetResponseSchema>>; /** * Get the details of a show via IMDb or TMDb id, including the global streaming availability info. * Get by Id */ getById(requestParameters?: GetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetResponseSchema>; /** * Query for the leaving movies/series/seasons/episodes in a given list of streaming services. Results are ordered by the last day to watch. Changes listed per page is \"25\" when \"target_type\" is \"show\", \"movie\" or \"series\"; \"50\" when it is \"season\"; and \"100\" when it is \"episode\". Note that upcoming changes for the same show are aggregated together into a single \"upcomingChanges\" array for that show. Which means there might be cases where the count of the items in the result array might be fewer than the maximum upcoming changes listed per page. (i.e. When \"target_type\" is \"season\", there might be 10 items in the result array, but the overall total number of upcoming changes listed across the \"upcomingChanges\" arrays will be still 50, given that there are at least 50 upcoming changes matches with the given query.) * Leaving */ leavingRaw(requestParameters: LeavingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UpcomingChangesResponseSchema>>; /** * Query for the leaving movies/series/seasons/episodes in a given list of streaming services. Results are ordered by the last day to watch. Changes listed per page is \"25\" when \"target_type\" is \"show\", \"movie\" or \"series\"; \"50\" when it is \"season\"; and \"100\" when it is \"episode\". Note that upcoming changes for the same show are aggregated together into a single \"upcomingChanges\" array for that show. Which means there might be cases where the count of the items in the result array might be fewer than the maximum upcoming changes listed per page. (i.e. When \"target_type\" is \"season\", there might be 10 items in the result array, but the overall total number of upcoming changes listed across the \"upcomingChanges\" arrays will be still 50, given that there are at least 50 upcoming changes matches with the given query.) * Leaving */ leaving(requestParameters: LeavingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpcomingChangesResponseSchema>; /** * Search through the catalog of the given streaming services in the given country. Provides filters such as show language, genre, keyword and release year. Items per page is \"25\". Can pass up to \"16\" services in the \"services\" parameter Output includes all the information about the shows, such as title, IMDb ID, TMDb ID, release year, link to shows\' pages in streaming services (including individual season/episode links), available subtitles, audios, available video quality and many more! Apart from the info about the given country-service combinations, output also includes information about streaming availability in the other services for the given country. * Search by Filters */ searchByFiltersRaw(requestParameters: SearchByFiltersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SearchFiltersResponseSchema>>; /** * Search through the catalog of the given streaming services in the given country. Provides filters such as show language, genre, keyword and release year. Items per page is \"25\". Can pass up to \"16\" services in the \"services\" parameter Output includes all the information about the shows, such as title, IMDb ID, TMDb ID, release year, link to shows\' pages in streaming services (including individual season/episode links), available subtitles, audios, available video quality and many more! Apart from the info about the given country-service combinations, output also includes information about streaming availability in the other services for the given country. * Search by Filters */ searchByFilters(requestParameters: SearchByFiltersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SearchFiltersResponseSchema>; /** * Search for movies and series by a title. Maximum amount of items returned are \"25\" unless there are more than 25 shows with the exact given title input. In that case all the items have 100% match with the title will be returned. No pagination is supported. * Search by Title */ searchByTitleRaw(requestParameters: SearchByTitleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SearchTitleResponseSchema>>; /** * Search for movies and series by a title. Maximum amount of items returned are \"25\" unless there are more than 25 shows with the exact given title input. In that case all the items have 100% match with the title will be returned. No pagination is supported. * Search by Title */ searchByTitle(requestParameters: SearchByTitleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SearchTitleResponseSchema>; /** * Get all the supported streaming services, list of the supported countries for each service and other related details. Note: This endpoint is deprecated. Please use the \"/countries\" endpoint instead. * Services */ servicesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ServicesResponseSchema>>; /** * Get all the supported streaming services, list of the supported countries for each service and other related details. Note: This endpoint is deprecated. Please use the \"/countries\" endpoint instead. * Services */ services(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ServicesResponseSchema>; } /** * @export */ export declare const ChangesChangeTypeEnum: { readonly New: "new"; readonly Removed: "removed"; readonly Updated: "updated"; }; export type ChangesChangeTypeEnum = typeof ChangesChangeTypeEnum[keyof typeof ChangesChangeTypeEnum]; /** * @export */ export declare const ChangesTargetTypeEnum: { readonly Show: "show"; readonly Movie: "movie"; readonly Series: "series"; readonly Season: "season"; readonly Episode: "episode"; }; export type ChangesTargetTypeEnum = typeof ChangesTargetTypeEnum[keyof typeof ChangesTargetTypeEnum]; /** * @export */ export declare const ChangesOutputLanguageEnum: { readonly En: "en"; readonly Es: "es"; readonly Tr: "tr"; readonly Fr: "fr"; }; export type ChangesOutputLanguageEnum = typeof ChangesOutputLanguageEnum[keyof typeof ChangesOutputLanguageEnum]; /** * @export */ export declare const GetByIdSeriesGranularityEnum: { readonly Show: "show"; readonly Season: "season"; readonly Episode: "episode"; }; export type GetByIdSeriesGranularityEnum = typeof GetByIdSeriesGranularityEnum[keyof typeof GetByIdSeriesGranularityEnum]; /** * @export */ export declare const GetByIdOutputLanguageEnum: { readonly En: "en"; readonly Es: "es"; readonly Tr: "tr"; readonly Fr: "fr"; }; export type GetByIdOutputLanguageEnum = typeof GetByIdOutputLanguageEnum[keyof typeof GetByIdOutputLanguageEnum]; /** * @export */ export declare const LeavingTargetTypeEnum: { readonly Show: "show"; readonly Movie: "movie"; readonly Series: "series"; readonly Season: "season"; readonly Episode: "episode"; }; export type LeavingTargetTypeEnum = typeof LeavingTargetTypeEnum[keyof typeof LeavingTargetTypeEnum]; /** * @export */ export declare const LeavingOutputLanguageEnum: { readonly En: "en"; readonly Es: "es"; readonly Tr: "tr"; readonly Fr: "fr"; }; export type LeavingOutputLanguageEnum = typeof LeavingOutputLanguageEnum[keyof typeof LeavingOutputLanguageEnum]; /** * @export */ export declare const SearchByFiltersOutputLanguageEnum: { readonly En: "en"; readonly Es: "es"; readonly Tr: "tr"; readonly Fr: "fr"; }; export type SearchByFiltersOutputLanguageEnum = typeof SearchByFiltersOutputLanguageEnum[keyof typeof SearchByFiltersOutputLanguageEnum]; /** * @export */ export declare const SearchByFiltersShowTypeEnum: { readonly Movie: "movie"; readonly Series: "series"; readonly All: "all"; }; export type SearchByFiltersShowTypeEnum = typeof SearchByFiltersShowTypeEnum[keyof typeof SearchByFiltersShowTypeEnum]; /** * @export */ export declare const SearchByFiltersSeriesGranularityEnum: { readonly Show: "show"; readonly Season: "season"; readonly Episode: "episode"; }; export type SearchByFiltersSeriesGranularityEnum = typeof SearchByFiltersSeriesGranularityEnum[keyof typeof SearchByFiltersSeriesGranularityEnum]; /** * @export */ export declare const SearchByFiltersGenresRelationEnum: { readonly And: "and"; readonly Or: "or"; }; export type SearchByFiltersGenresRelationEnum = typeof SearchByFiltersGenresRelationEnum[keyof typeof SearchByFiltersGenresRelationEnum]; /** * @export */ export declare const SearchByFiltersOrderByEnum: { readonly OriginalTitle: "original_title"; readonly Year: "year"; readonly PopularityAlltime: "popularity_alltime"; readonly Popularity1year: "popularity_1year"; readonly Popularity1month: "popularity_1month"; readonly Popularity1week: "popularity_1week"; }; export type SearchByFiltersOrderByEnum = typeof SearchByFiltersOrderByEnum[keyof typeof SearchByFiltersOrderByEnum]; /** * @export */ export declare const SearchByTitleShowTypeEnum: { readonly Movie: "movie"; readonly Series: "series"; readonly All: "all"; }; export type SearchByTitleShowTypeEnum = typeof SearchByTitleShowTypeEnum[keyof typeof SearchByTitleShowTypeEnum]; /** * @export */ export declare const SearchByTitleSeriesGranularityEnum: { readonly Show: "show"; readonly Season: "season"; readonly Episode: "episode"; }; export type SearchByTitleSeriesGranularityEnum = typeof SearchByTitleSeriesGranularityEnum[keyof typeof SearchByTitleSeriesGranularityEnum]; /** * @export */ export declare const SearchByTitleOutputLanguageEnum: { readonly En: "en"; readonly Es: "es"; readonly Tr: "tr"; readonly Fr: "fr"; }; export type SearchByTitleOutputLanguageEnum = typeof SearchByTitleOutputLanguageEnum[keyof typeof SearchByTitleOutputLanguageEnum];