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!

104 lines (94 loc) 2.78 kB
/* 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. */ import { mapValues } from '../runtime'; import type { StreamingOption } from './StreamingOption'; import { StreamingOptionFromJSON, StreamingOptionFromJSONTyped, StreamingOptionToJSON, } from './StreamingOption'; /** * Details of an episode. * @export * @interface Episode */ export interface Episode { /** * Type of the item. Always episode. * @type {string} * @memberof Episode */ itemType: string; /** * Title of the episode. * @type {string} * @memberof Episode */ title: string; /** * A brief overview of the plot of the episode. * @type {string} * @memberof Episode */ overview?: string; /** * The year that the episode aired. * @type {number} * @memberof Episode */ airYear: number; /** * Map of the streaming options by the country code. * @type {{ [key: string]: Array<StreamingOption>; }} * @memberof Episode */ streamingOptions: { [key: string]: Array<StreamingOption>; }; } /** * Check if a given object implements the Episode interface. */ export function instanceOfEpisode(value: object): boolean { if (!('itemType' in value)) return false; if (!('title' in value)) return false; if (!('airYear' in value)) return false; if (!('streamingOptions' in value)) return false; return true; } export function EpisodeFromJSON(json: any): Episode { return EpisodeFromJSONTyped(json, false); } export function EpisodeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Episode { if (json == null) { return json; } return { 'itemType': json['itemType'], 'title': json['title'], 'overview': json['overview'] == null ? undefined : json['overview'], 'airYear': json['airYear'], 'streamingOptions': json['streamingOptions'], }; } export function EpisodeToJSON(value?: Episode | null): any { if (value == null) { return value; } return { 'itemType': value['itemType'], 'title': value['title'], 'overview': value['overview'], 'airYear': value['airYear'], 'streamingOptions': value['streamingOptions'], }; }