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 60 countries!

67 lines (66 loc) 2.31 kB
"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 60 countries! * * The version of the OpenAPI document: 4.1.0 * * * 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.SeasonToJSON = exports.SeasonFromJSONTyped = exports.SeasonFromJSON = exports.instanceOfSeason = void 0; var Episode_1 = require("./Episode"); /** * Check if a given object implements the Season interface. */ function instanceOfSeason(value) { if (!('itemType' in value)) return false; if (!('title' in value)) return false; if (!('firstAirYear' in value)) return false; if (!('lastAirYear' in value)) return false; if (!('streamingOptions' in value)) return false; return true; } exports.instanceOfSeason = instanceOfSeason; function SeasonFromJSON(json) { return SeasonFromJSONTyped(json, false); } exports.SeasonFromJSON = SeasonFromJSON; function SeasonFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'itemType': json['itemType'], 'title': json['title'], 'firstAirYear': json['firstAirYear'], 'lastAirYear': json['lastAirYear'], 'streamingOptions': json['streamingOptions'], 'episodes': json['episodes'] == null ? undefined : (json['episodes'].map(Episode_1.EpisodeFromJSON)), }; } exports.SeasonFromJSONTyped = SeasonFromJSONTyped; function SeasonToJSON(value) { if (value == null) { return value; } return { 'itemType': value['itemType'], 'title': value['title'], 'firstAirYear': value['firstAirYear'], 'lastAirYear': value['lastAirYear'], 'streamingOptions': value['streamingOptions'], 'episodes': value['episodes'] == null ? undefined : (value['episodes'].map(Episode_1.EpisodeToJSON)), }; } exports.SeasonToJSON = SeasonToJSON;