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!

65 lines (64 loc) 2.37 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 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;