@emergentmethods/asknews-typescript-sdk
Version:
Typescript SDK for AskNews API
106 lines (97 loc) • 2.43 kB
text/typescript
/* 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.
*/
import { mapValues } from '../runtime';
/**
*
* @export
* @interface WebSearchResult1
*/
export interface WebSearchResult1 {
/**
*
* @type {string}
* @memberof WebSearchResult1
*/
title: string;
/**
*
* @type {string}
* @memberof WebSearchResult1
*/
url: string;
/**
*
* @type {string}
* @memberof WebSearchResult1
*/
source: string;
/**
*
* @type {string}
* @memberof WebSearchResult1
*/
published: string;
/**
*
* @type {Array<string>}
* @memberof WebSearchResult1
*/
keyPoints: Array<string>;
/**
*
* @type {string}
* @memberof WebSearchResult1
*/
rawText?: string;
}
/**
* Check if a given object implements the WebSearchResult1 interface.
*/
export function instanceOfWebSearchResult1(value: object): boolean {
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;
}
export function WebSearchResult1FromJSON(json: any): WebSearchResult1 {
return WebSearchResult1FromJSONTyped(json, false);
}
export function WebSearchResult1FromJSONTyped(json: any, ignoreDiscriminator: boolean): WebSearchResult1 {
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'],
};
}
export function WebSearchResult1ToJSON(value?: WebSearchResult1 | null): any {
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'],
};
}