@emergentmethods/asknews-typescript-sdk
Version:
Typescript SDK for AskNews API
54 lines (53 loc) • 1.68 kB
JavaScript
/* 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.
*/
/**
* Check if a given object implements the RedditEntities interface.
*/
export function instanceOfRedditEntities(value) {
return true;
}
export function RedditEntitiesFromJSON(json) {
return RedditEntitiesFromJSONTyped(json, false);
}
export function RedditEntitiesFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'dATE': json['DATE'] == null ? undefined : json['DATE'],
'eVENT': json['EVENT'] == null ? undefined : json['EVENT'],
'gPE': json['GPE'] == null ? undefined : json['GPE'],
'oRG': json['ORG'] == null ? undefined : json['ORG'],
'pERSON': json['PERSON'] == null ? undefined : json['PERSON'],
'nORP': json['NORP'] == null ? undefined : json['NORP'],
'cARDINAL': json['CARDINAL'] == null ? undefined : json['CARDINAL'],
};
}
export function RedditEntitiesToJSON(json) {
return RedditEntitiesToJSONTyped(json, false);
}
export function RedditEntitiesToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'DATE': value['dATE'],
'EVENT': value['eVENT'],
'GPE': value['gPE'],
'ORG': value['oRG'],
'PERSON': value['pERSON'],
'NORP': value['nORP'],
'CARDINAL': value['cARDINAL'],
};
}