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!
73 lines (72 loc) • 2.87 kB
JavaScript
;
/* 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.ServiceToJSON = exports.ServiceFromJSONTyped = exports.ServiceFromJSON = exports.instanceOfService = void 0;
var runtime_1 = require("../runtime");
var Addon_1 = require("./Addon");
var ImageSet_1 = require("./ImageSet");
var SupportedStreamingTypes_1 = require("./SupportedStreamingTypes");
/**
* Check if a given object implements the Service interface.
*/
function instanceOfService(value) {
var isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "name" in value;
isInstance = isInstance && "homePage" in value;
isInstance = isInstance && "themeColorCode" in value;
isInstance = isInstance && "images" in value;
isInstance = isInstance && "supportedStreamingTypes" in value;
isInstance = isInstance && "addons" in value;
return isInstance;
}
exports.instanceOfService = instanceOfService;
function ServiceFromJSON(json) {
return ServiceFromJSONTyped(json, false);
}
exports.ServiceFromJSON = ServiceFromJSON;
function ServiceFromJSONTyped(json, ignoreDiscriminator) {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': json['id'],
'name': json['name'],
'homePage': json['homePage'],
'themeColorCode': json['themeColorCode'],
'images': (0, ImageSet_1.ImageSetFromJSON)(json['images']),
'supportedStreamingTypes': (0, SupportedStreamingTypes_1.SupportedStreamingTypesFromJSON)(json['supportedStreamingTypes']),
'addons': ((0, runtime_1.mapValues)(json['addons'], Addon_1.AddonFromJSON)),
};
}
exports.ServiceFromJSONTyped = ServiceFromJSONTyped;
function ServiceToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'id': value.id,
'name': value.name,
'homePage': value.homePage,
'themeColorCode': value.themeColorCode,
'images': (0, ImageSet_1.ImageSetToJSON)(value.images),
'supportedStreamingTypes': (0, SupportedStreamingTypes_1.SupportedStreamingTypesToJSON)(value.supportedStreamingTypes),
'addons': ((0, runtime_1.mapValues)(value.addons, Addon_1.AddonToJSON)),
};
}
exports.ServiceToJSON = ServiceToJSON;