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!
984 lines (978 loc) • 135 kB
JavaScript
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.streamingAvailability = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* 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.
*/
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (g && (g = 0, op[0] && (_ = 0)), _) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.SearchByTitleOutputLanguageEnum = exports.SearchByTitleSeriesGranularityEnum = exports.SearchByTitleShowTypeEnum = exports.SearchByFiltersOrderByEnum = exports.SearchByFiltersGenresRelationEnum = exports.SearchByFiltersSeriesGranularityEnum = exports.SearchByFiltersShowTypeEnum = exports.SearchByFiltersOutputLanguageEnum = exports.LeavingOutputLanguageEnum = exports.LeavingTargetTypeEnum = exports.GetByIdOutputLanguageEnum = exports.GetByIdSeriesGranularityEnum = exports.ChangesOutputLanguageEnum = exports.ChangesTargetTypeEnum = exports.ChangesChangeTypeEnum = exports.DefaultApi = void 0;
var runtime = require("../runtime");
var index_1 = require("../models/index");
/**
*
*/
var DefaultApi = /** @class */ (function (_super) {
__extends(DefaultApi, _super);
function DefaultApi() {
return _super !== null && _super.apply(this, arguments) || this;
}
/**
* 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
*/
DefaultApi.prototype.changesRaw = function (requestParameters, initOverrides) {
return __awaiter(this, void 0, void 0, function () {
var queryParameters, headerParameters, response;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
if (requestParameters.country === null || requestParameters.country === undefined) {
throw new runtime.RequiredError('country', 'Required parameter requestParameters.country was null or undefined when calling changes.');
}
if (requestParameters.services === null || requestParameters.services === undefined) {
throw new runtime.RequiredError('services', 'Required parameter requestParameters.services was null or undefined when calling changes.');
}
if (requestParameters.changeType === null || requestParameters.changeType === undefined) {
throw new runtime.RequiredError('changeType', 'Required parameter requestParameters.changeType was null or undefined when calling changes.');
}
if (requestParameters.targetType === null || requestParameters.targetType === undefined) {
throw new runtime.RequiredError('targetType', 'Required parameter requestParameters.targetType was null or undefined when calling changes.');
}
queryParameters = {};
if (requestParameters.country !== undefined) {
queryParameters['country'] = requestParameters.country;
}
if (requestParameters.services !== undefined) {
queryParameters['services'] = requestParameters.services;
}
if (requestParameters.changeType !== undefined) {
queryParameters['change_type'] = requestParameters.changeType;
}
if (requestParameters.targetType !== undefined) {
queryParameters['target_type'] = requestParameters.targetType;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = requestParameters.since;
}
if (requestParameters.cursor !== undefined) {
queryParameters['cursor'] = requestParameters.cursor;
}
if (requestParameters.desc !== undefined) {
queryParameters['desc'] = requestParameters.desc;
}
if (requestParameters.outputLanguage !== undefined) {
queryParameters['output_language'] = requestParameters.outputLanguage;
}
headerParameters = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-RapidAPI-Key"] = this.configuration.apiKey("X-RapidAPI-Key"); // X-Rapid-API-Key authentication
}
return [4 /*yield*/, this.request({
path: "/changes",
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides)];
case 1:
response = _a.sent();
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ChangesResponseSchemaFromJSON)(jsonValue); })];
}
});
});
};
/**
* 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
*/
DefaultApi.prototype.changes = function (requestParameters, initOverrides) {
return __awaiter(this, void 0, void 0, function () {
var response;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, this.changesRaw(requestParameters, initOverrides)];
case 1:
response = _a.sent();
return [4 /*yield*/, response.value()];
case 2: return [2 /*return*/, _a.sent()];
}
});
});
};
/**
* 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
*/
DefaultApi.prototype.countriesRaw = function (initOverrides) {
return __awaiter(this, void 0, void 0, function () {
var queryParameters, headerParameters, response;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
queryParameters = {};
headerParameters = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-RapidAPI-Key"] = this.configuration.apiKey("X-RapidAPI-Key"); // X-Rapid-API-Key authentication
}
return [4 /*yield*/, this.request({
path: "/countries",
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides)];
case 1:
response = _a.sent();
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.CountriesResponseSchemaFromJSON)(jsonValue); })];
}
});
});
};
/**
* 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
*/
DefaultApi.prototype.countries = function (initOverrides) {
return __awaiter(this, void 0, void 0, function () {
var response;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, this.countriesRaw(initOverrides)];
case 1:
response = _a.sent();
return [4 /*yield*/, response.value()];
case 2: return [2 /*return*/, _a.sent()];
}
});
});
};
/**
* Get the ids and names of the supported genres.
* Genres
*/
DefaultApi.prototype.genresRaw = function (initOverrides) {
return __awaiter(this, void 0, void 0, function () {
var queryParameters, headerParameters, response;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
queryParameters = {};
headerParameters = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-RapidAPI-Key"] = this.configuration.apiKey("X-RapidAPI-Key"); // X-Rapid-API-Key authentication
}
return [4 /*yield*/, this.request({
path: "/genres",
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides)];
case 1:
response = _a.sent();
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GenresResponseSchemaFromJSON)(jsonValue); })];
}
});
});
};
/**
* Get the ids and names of the supported genres.
* Genres
*/
DefaultApi.prototype.genres = function (initOverrides) {
return __awaiter(this, void 0, void 0, function () {
var response;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, this.genresRaw(initOverrides)];
case 1:
response = _a.sent();
return [4 /*yield*/, response.value()];
case 2: return [2 /*return*/, _a.sent()];
}
});
});
};
/**
* Get the details of a show via IMDb or TMDb id, including the global streaming availability info.
* Get by Id
*/
DefaultApi.prototype.getByIdRaw = function (requestParameters, initOverrides) {
return __awaiter(this, void 0, void 0, function () {
var queryParameters, headerParameters, response;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
queryParameters = {};
if (requestParameters.imdbId !== undefined) {
queryParameters['imdb_id'] = requestParameters.imdbId;
}
if (requestParameters.tmdbId !== undefined) {
queryParameters['tmdb_id'] = requestParameters.tmdbId;
}
if (requestParameters.seriesGranularity !== undefined) {
queryParameters['series_granularity'] = requestParameters.seriesGranularity;
}
if (requestParameters.outputLanguage !== undefined) {
queryParameters['output_language'] = requestParameters.outputLanguage;
}
headerParameters = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-RapidAPI-Key"] = this.configuration.apiKey("X-RapidAPI-Key"); // X-Rapid-API-Key authentication
}
return [4 /*yield*/, this.request({
path: "/get",
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides)];
case 1:
response = _a.sent();
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GetResponseSchemaFromJSON)(jsonValue); })];
}
});
});
};
/**
* Get the details of a show via IMDb or TMDb id, including the global streaming availability info.
* Get by Id
*/
DefaultApi.prototype.getById = function (requestParameters, initOverrides) {
if (requestParameters === void 0) { requestParameters = {}; }
return __awaiter(this, void 0, void 0, function () {
var response;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, this.getByIdRaw(requestParameters, initOverrides)];
case 1:
response = _a.sent();
return [4 /*yield*/, response.value()];
case 2: return [2 /*return*/, _a.sent()];
}
});
});
};
/**
* 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
*/
DefaultApi.prototype.leavingRaw = function (requestParameters, initOverrides) {
return __awaiter(this, void 0, void 0, function () {
var queryParameters, headerParameters, response;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
if (requestParameters.country === null || requestParameters.country === undefined) {
throw new runtime.RequiredError('country', 'Required parameter requestParameters.country was null or undefined when calling leaving.');
}
if (requestParameters.services === null || requestParameters.services === undefined) {
throw new runtime.RequiredError('services', 'Required parameter requestParameters.services was null or undefined when calling leaving.');
}
if (requestParameters.targetType === null || requestParameters.targetType === undefined) {
throw new runtime.RequiredError('targetType', 'Required parameter requestParameters.targetType was null or undefined when calling leaving.');
}
queryParameters = {};
if (requestParameters.country !== undefined) {
queryParameters['country'] = requestParameters.country;
}
if (requestParameters.services !== undefined) {
queryParameters['services'] = requestParameters.services;
}
if (requestParameters.targetType !== undefined) {
queryParameters['target_type'] = requestParameters.targetType;
}
if (requestParameters.cursor !== undefined) {
queryParameters['cursor'] = requestParameters.cursor;
}
if (requestParameters.outputLanguage !== undefined) {
queryParameters['output_language'] = requestParameters.outputLanguage;
}
headerParameters = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-RapidAPI-Key"] = this.configuration.apiKey("X-RapidAPI-Key"); // X-Rapid-API-Key authentication
}
return [4 /*yield*/, this.request({
path: "/leaving",
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides)];
case 1:
response = _a.sent();
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.UpcomingChangesResponseSchemaFromJSON)(jsonValue); })];
}
});
});
};
/**
* 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
*/
DefaultApi.prototype.leaving = function (requestParameters, initOverrides) {
return __awaiter(this, void 0, void 0, function () {
var response;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, this.leavingRaw(requestParameters, initOverrides)];
case 1:
response = _a.sent();
return [4 /*yield*/, response.value()];
case 2: return [2 /*return*/, _a.sent()];
}
});
});
};
/**
* 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
*/
DefaultApi.prototype.searchByFiltersRaw = function (requestParameters, initOverrides) {
return __awaiter(this, void 0, void 0, function () {
var queryParameters, headerParameters, response;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
if (requestParameters.country === null || requestParameters.country === undefined) {
throw new runtime.RequiredError('country', 'Required parameter requestParameters.country was null or undefined when calling searchByFilters.');
}
if (requestParameters.services === null || requestParameters.services === undefined) {
throw new runtime.RequiredError('services', 'Required parameter requestParameters.services was null or undefined when calling searchByFilters.');
}
queryParameters = {};
if (requestParameters.country !== undefined) {
queryParameters['country'] = requestParameters.country;
}
if (requestParameters.services !== undefined) {
queryParameters['services'] = requestParameters.services;
}
if (requestParameters.outputLanguage !== undefined) {
queryParameters['output_language'] = requestParameters.outputLanguage;
}
if (requestParameters.showType !== undefined) {
queryParameters['show_type'] = requestParameters.showType;
}
if (requestParameters.seriesGranularity !== undefined) {
queryParameters['series_granularity'] = requestParameters.seriesGranularity;
}
if (requestParameters.genres !== undefined) {
queryParameters['genres'] = requestParameters.genres;
}
if (requestParameters.genresRelation !== undefined) {
queryParameters['genres_relation'] = requestParameters.genresRelation;
}
if (requestParameters.showOriginalLanguage !== undefined) {
queryParameters['show_original_language'] = requestParameters.showOriginalLanguage;
}
if (requestParameters.yearMin !== undefined) {
queryParameters['year_min'] = requestParameters.yearMin;
}
if (requestParameters.yearMax !== undefined) {
queryParameters['year_max'] = requestParameters.yearMax;
}
if (requestParameters.keyword !== undefined) {
queryParameters['keyword'] = requestParameters.keyword;
}
if (requestParameters.orderBy !== undefined) {
queryParameters['order_by'] = requestParameters.orderBy;
}
if (requestParameters.desc !== undefined) {
queryParameters['desc'] = requestParameters.desc;
}
if (requestParameters.cursor !== undefined) {
queryParameters['cursor'] = requestParameters.cursor;
}
headerParameters = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-RapidAPI-Key"] = this.configuration.apiKey("X-RapidAPI-Key"); // X-Rapid-API-Key authentication
}
return [4 /*yield*/, this.request({
path: "/search/filters",
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides)];
case 1:
response = _a.sent();
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.SearchFiltersResponseSchemaFromJSON)(jsonValue); })];
}
});
});
};
/**
* 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
*/
DefaultApi.prototype.searchByFilters = function (requestParameters, initOverrides) {
return __awaiter(this, void 0, void 0, function () {
var response;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, this.searchByFiltersRaw(requestParameters, initOverrides)];
case 1:
response = _a.sent();
return [4 /*yield*/, response.value()];
case 2: return [2 /*return*/, _a.sent()];
}
});
});
};
/**
* 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
*/
DefaultApi.prototype.searchByTitleRaw = function (requestParameters, initOverrides) {
return __awaiter(this, void 0, void 0, function () {
var queryParameters, headerParameters, response;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
if (requestParameters.title === null || requestParameters.title === undefined) {
throw new runtime.RequiredError('title', 'Required parameter requestParameters.title was null or undefined when calling searchByTitle.');
}
if (requestParameters.country === null || requestParameters.country === undefined) {
throw new runtime.RequiredError('country', 'Required parameter requestParameters.country was null or undefined when calling searchByTitle.');
}
queryParameters = {};
if (requestParameters.title !== undefined) {
queryParameters['title'] = requestParameters.title;
}
if (requestParameters.showType !== undefined) {
queryParameters['show_type'] = requestParameters.showType;
}
if (requestParameters.country !== undefined) {
queryParameters['country'] = requestParameters.country;
}
if (requestParameters.seriesGranularity !== undefined) {
queryParameters['series_granularity'] = requestParameters.seriesGranularity;
}
if (requestParameters.outputLanguage !== undefined) {
queryParameters['output_language'] = requestParameters.outputLanguage;
}
headerParameters = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-RapidAPI-Key"] = this.configuration.apiKey("X-RapidAPI-Key"); // X-Rapid-API-Key authentication
}
return [4 /*yield*/, this.request({
path: "/search/title",
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides)];
case 1:
response = _a.sent();
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.SearchTitleResponseSchemaFromJSON)(jsonValue); })];
}
});
});
};
/**
* 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
*/
DefaultApi.prototype.searchByTitle = function (requestParameters, initOverrides) {
return __awaiter(this, void 0, void 0, function () {
var response;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, this.searchByTitleRaw(requestParameters, initOverrides)];
case 1:
response = _a.sent();
return [4 /*yield*/, response.value()];
case 2: return [2 /*return*/, _a.sent()];
}
});
});
};
/**
* 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
*/
DefaultApi.prototype.servicesRaw = function (initOverrides) {
return __awaiter(this, void 0, void 0, function () {
var queryParameters, headerParameters, response;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
queryParameters = {};
headerParameters = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["X-RapidAPI-Key"] = this.configuration.apiKey("X-RapidAPI-Key"); // X-Rapid-API-Key authentication
}
return [4 /*yield*/, this.request({
path: "/services",
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides)];
case 1:
response = _a.sent();
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ServicesResponseSchemaFromJSON)(jsonValue); })];
}
});
});
};
/**
* 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
*/
DefaultApi.prototype.services = function (initOverrides) {
return __awaiter(this, void 0, void 0, function () {
var response;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, this.servicesRaw(initOverrides)];
case 1:
response = _a.sent();
return [4 /*yield*/, response.value()];
case 2: return [2 /*return*/, _a.sent()];
}
});
});
};
return DefaultApi;
}(runtime.BaseAPI));
exports.DefaultApi = DefaultApi;
/**
* @export
*/
exports.ChangesChangeTypeEnum = {
New: 'new',
Removed: 'removed',
Updated: 'updated'
};
/**
* @export
*/
exports.ChangesTargetTypeEnum = {
Show: 'show',
Movie: 'movie',
Series: 'series',
Season: 'season',
Episode: 'episode'
};
/**
* @export
*/
exports.ChangesOutputLanguageEnum = {
En: 'en',
Es: 'es',
Tr: 'tr',
Fr: 'fr'
};
/**
* @export
*/
exports.GetByIdSeriesGranularityEnum = {
Show: 'show',
Season: 'season',
Episode: 'episode'
};
/**
* @export
*/
exports.GetByIdOutputLanguageEnum = {
En: 'en',
Es: 'es',
Tr: 'tr',
Fr: 'fr'
};
/**
* @export
*/
exports.LeavingTargetTypeEnum = {
Show: 'show',
Movie: 'movie',
Series: 'series',
Season: 'season',
Episode: 'episode'
};
/**
* @export
*/
exports.LeavingOutputLanguageEnum = {
En: 'en',
Es: 'es',
Tr: 'tr',
Fr: 'fr'
};
/**
* @export
*/
exports.SearchByFiltersOutputLanguageEnum = {
En: 'en',
Es: 'es',
Tr: 'tr',
Fr: 'fr'
};
/**
* @export
*/
exports.SearchByFiltersShowTypeEnum = {
Movie: 'movie',
Series: 'series',
All: 'all'
};
/**
* @export
*/
exports.SearchByFiltersSeriesGranularityEnum = {
Show: 'show',
Season: 'season',
Episode: 'episode'
};
/**
* @export
*/
exports.SearchByFiltersGenresRelationEnum = {
And: 'and',
Or: 'or'
};
/**
* @export
*/
exports.SearchByFiltersOrderByEnum = {
OriginalTitle: 'original_title',
Year: 'year',
PopularityAlltime: 'popularity_alltime',
Popularity1year: 'popularity_1year',
Popularity1month: 'popularity_1month',
Popularity1week: 'popularity_1week'
};
/**
* @export
*/
exports.SearchByTitleShowTypeEnum = {
Movie: 'movie',
Series: 'series',
All: 'all'
};
/**
* @export
*/
exports.SearchByTitleSeriesGranularityEnum = {
Show: 'show',
Season: 'season',
Episode: 'episode'
};
/**
* @export
*/
exports.SearchByTitleOutputLanguageEnum = {
En: 'en',
Es: 'es',
Tr: 'tr',
Fr: 'fr'
};
},{"../models/index":33,"../runtime":34}],2:[function(require,module,exports){
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
/* tslint:disable */
/* eslint-disable */
__exportStar(require("./DefaultApi"), exports);
},{"./DefaultApi":1}],3:[function(require,module,exports){
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
/* tslint:disable */
/* eslint-disable */
__exportStar(require("./runtime"), exports);
__exportStar(require("./apis/index"), exports);
__exportStar(require("./models/index"), exports);
},{"./apis/index":2,"./models/index":33,"./runtime":34}],4:[function(require,module,exports){
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* 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.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.AddonToJSON = exports.AddonFromJSONTyped = exports.AddonFromJSON = exports.instanceOfAddon = void 0;
var ImageSet_1 = require("./ImageSet");
/**
* Check if a given object implements the Addon interface.
*/
function instanceOfAddon(value) {
var isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "displayName" in value;
isInstance = isInstance && "homePage" in value;
isInstance = isInstance && "themeColorCode" in value;
isInstance = isInstance && "image" in value;
isInstance = isInstance && "images" in value;
return isInstance;
}
exports.instanceOfAddon = instanceOfAddon;
function AddonFromJSON(json) {
return AddonFromJSONTyped(json, false);
}
exports.AddonFromJSON = AddonFromJSON;
function AddonFromJSONTyped(json, ignoreDiscriminator) {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': json['id'],
'displayName': json['displayName'],
'homePage': json['homePage'],
'themeColorCode': json['themeColorCode'],
'image': json['image'],
'images': (0, ImageSet_1.ImageSetFromJSON)(json['images']),
};
}
exports.AddonFromJSONTyped = AddonFromJSONTyped;
function AddonToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'id': value.id,
'displayName': value.displayName,
'homePage': value.homePage,
'themeColorCode': value.themeColorCode,
'image': value.image,
'images': (0, ImageSet_1.ImageSetToJSON)(value.images),
};
}
exports.AddonToJSON = AddonToJSON;
},{"./ImageSet":15}],5:[function(require,module,exports){
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* 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.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.ChangeToJSON = exports.ChangeFromJSONTyped = exports.ChangeFromJSON = exports.instanceOfChange = void 0;
var runtime_1 = require("../runtime");
var StreamingType_1 = require("./StreamingType");
/**
* Check if a given object implements the Change interface.
*/
function instanceOfChange(value) {
var isInstance = true;
isInstance = isInstance && "service" in value;
isInstance = isInstance && "streamingType" in value;
isInstance = isInstance && "time" in value;
return isInstance;
}
exports.instanceOfChange = instanceOfChange;
function ChangeFromJSON(json) {
return ChangeFromJSONTyped(json, false);
}
exports.ChangeFromJSON = ChangeFromJSON;
function ChangeFromJSONTyped(json, ignoreDiscriminator) {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'season': !(0, runtime_1.exists)(json, 'season') ? undefined : json['season'],
'episode': !(0, runtime_1.exists)(json, 'episode') ? undefined : json['episode'],
'service': json['service'],
'streamingType': (0, StreamingType_1.StreamingTypeFromJSON)(json['streamingType']),
'addon': !(0, runtime_1.exists)(json, 'addon') ? undefined : json['addon'],
'time': json['time'],
};
}
exports.ChangeFromJSONTyped = ChangeFromJSONTyped;
function ChangeToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'season': value.season,
'episode': value.episode,
'service': value.service,
'streamingType': (0, StreamingType_1.StreamingTypeToJSON)(value.streamingType),
'addon': value.addon,
'time': value.time,
};
}
exports.ChangeToJSON = ChangeToJSON;
},{"../runtime":34,"./StreamingType":28}],6:[function(require,module,exports){
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* 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.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.ChangeSetToJSON = exports.ChangeSetFromJSONTyped = exports.ChangeSetFromJSON = exports.instanceOfChangeSet = void 0;
var Change_1 = require("./Change");
var Show_1 = require("./Show");
/**
* Check if a given object implements the ChangeSet interface.
*/
function instanceOfChangeSet(value) {
var isInstance = true;
isInstance = isInstance && "changes" in value;
isInstance = isInstance && "show" in value;
return isInstance;
}
exports.instanceOfChangeSet = instanceOfChangeSet;
function ChangeSetFromJSON(json) {
return ChangeSetFromJSONTyped(json, false);
}
exports.ChangeSetFromJSON = ChangeSetFromJSON;
function ChangeSetFromJSONTyped(json, ignoreDiscriminator) {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'changes': (json['changes'].map(Change_1.ChangeFromJSON)),
'show': (0, Show_1.ShowFromJSON)(json['show']),
};
}
exports.ChangeSetFromJSONTyped = ChangeSetFromJSONTyped;
function ChangeSetToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'changes': (value.changes.map(Change_1.ChangeToJSON)),
'show': (0, Show_1.ShowToJSON)(value.show),
};
}
exports.ChangeSetToJSON = ChangeSetToJSON;
},{"./Change":5,"./Show":26}],7:[function(require,module,exports){
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* 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.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.ChangesResponseSchemaToJSON = exports.ChangesResponseSchemaFromJSONTyped = exports.ChangesResponseSchemaFromJSON = exports.instanceOfChangesResponseSchema = void 0;
var ChangeSet_1 = require("./ChangeSet");
/**
* Check if a given object implements the ChangesResponseSchema interface.
*/
function instanceOfChangesResponseSchema(value) {
var isInstance = true;
isInstance = isInstance && "result" in value;
isInstance = isInstance && "hasMore" in value;
isInstance = isInstance && "n