UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
46 lines (45 loc) 1.64 kB
/* tslint:disable */ /* eslint-disable */ /** * AskNews API * AskNews API * * The version of the OpenAPI document: 0.19.10 * Contact: contact@emergentmethods.ai * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { WebSearchResultFromJSON, WebSearchResultToJSON, } from './WebSearchResult'; import { SearchResponseDictItemFromJSON, SearchResponseDictItemToJSON, } from './SearchResponseDictItem'; /** * Check if a given object implements the DeepNewsResponseSources interface. */ export function instanceOfDeepNewsResponseSources(value) { return true; } export function DeepNewsResponseSourcesFromJSON(json) { return DeepNewsResponseSourcesFromJSONTyped(json, false); } export function DeepNewsResponseSourcesFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'news': json['news'] == null ? undefined : (json['news'].map(SearchResponseDictItemFromJSON)), 'web': json['web'] == null ? undefined : (json['web'].map(WebSearchResultFromJSON)), }; } export function DeepNewsResponseSourcesToJSON(json) { return DeepNewsResponseSourcesToJSONTyped(json, false); } export function DeepNewsResponseSourcesToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'news': value['news'] == null ? undefined : (value['news'].map(SearchResponseDictItemToJSON)), 'web': value['web'] == null ? undefined : (value['web'].map(WebSearchResultToJSON)), }; }