@emergentmethods/asknews-typescript-sdk
Version:
Typescript SDK for AskNews API
51 lines (50 loc) • 1.71 kB
JavaScript
/* tslint:disable */
/* eslint-disable */
/**
* AskNews API
* AskNews API [](https://status.asknews.app/status/prod)
*
* The version of the OpenAPI document: 0.24.22
* 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 { ScrapeDataItemFromJSON, ScrapeDataItemToJSON, } from './ScrapeDataItem';
/**
* Check if a given object implements the ScrapedURLItem interface.
*/
export function instanceOfScrapedURLItem(value) {
if (!('url' in value) || value['url'] === undefined)
return false;
return true;
}
export function ScrapedURLItemFromJSON(json) {
return ScrapedURLItemFromJSONTyped(json, false);
}
export function ScrapedURLItemFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'url': json['url'],
'data': json['data'] == null ? undefined : ScrapeDataItemFromJSON(json['data']),
'metadata': json['metadata'] == null ? undefined : json['metadata'],
'enrichments': json['enrichments'] == null ? undefined : json['enrichments'],
};
}
export function ScrapedURLItemToJSON(json) {
return ScrapedURLItemToJSONTyped(json, false);
}
export function ScrapedURLItemToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'url': value['url'],
'data': ScrapeDataItemToJSON(value['data']),
'metadata': value['metadata'],
'enrichments': value['enrichments'],
};
}