UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
66 lines (65 loc) 2.03 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * AskNews API * AskNews API * * The version of the OpenAPI document: 0.18.6 * 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. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.WebSearchResultToJSON = exports.WebSearchResultFromJSONTyped = exports.WebSearchResultFromJSON = exports.instanceOfWebSearchResult = void 0; /** * Check if a given object implements the WebSearchResult interface. */ function instanceOfWebSearchResult(value) { if (!('title' in value)) return false; if (!('url' in value)) return false; if (!('source' in value)) return false; if (!('published' in value)) return false; if (!('keyPoints' in value)) return false; return true; } exports.instanceOfWebSearchResult = instanceOfWebSearchResult; function WebSearchResultFromJSON(json) { return WebSearchResultFromJSONTyped(json, false); } exports.WebSearchResultFromJSON = WebSearchResultFromJSON; function WebSearchResultFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'title': json['title'], 'url': json['url'], 'source': json['source'], 'published': json['published'], 'keyPoints': json['key_points'], 'rawText': json['raw_text'] == null ? undefined : json['raw_text'], }; } exports.WebSearchResultFromJSONTyped = WebSearchResultFromJSONTyped; function WebSearchResultToJSON(value) { if (value == null) { return value; } return { 'title': value['title'], 'url': value['url'], 'source': value['source'], 'published': value['published'], 'key_points': value['keyPoints'], 'raw_text': value['rawText'], }; } exports.WebSearchResultToJSON = WebSearchResultToJSON;