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!
55 lines (54 loc) • 1.89 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 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.SearchResultToJSON = exports.SearchResultFromJSONTyped = exports.SearchResultFromJSON = exports.instanceOfSearchResult = void 0;
var Show_1 = require("./Show");
/**
* Check if a given object implements the SearchResult interface.
*/
function instanceOfSearchResult(value) {
if (!('shows' in value))
return false;
if (!('hasMore' in value))
return false;
return true;
}
exports.instanceOfSearchResult = instanceOfSearchResult;
function SearchResultFromJSON(json) {
return SearchResultFromJSONTyped(json, false);
}
exports.SearchResultFromJSON = SearchResultFromJSON;
function SearchResultFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'shows': (json['shows'].map(Show_1.ShowFromJSON)),
'hasMore': json['hasMore'],
'nextCursor': json['nextCursor'] == null ? undefined : json['nextCursor'],
};
}
exports.SearchResultFromJSONTyped = SearchResultFromJSONTyped;
function SearchResultToJSON(value) {
if (value == null) {
return value;
}
return {
'shows': (value['shows'].map(Show_1.ShowToJSON)),
'hasMore': value['hasMore'],
'nextCursor': value['nextCursor'],
};
}
exports.SearchResultToJSON = SearchResultToJSON;