@emergentmethods/asknews-typescript-sdk
Version:
Typescript SDK for AskNews API
45 lines (44 loc) • 1.38 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.
*/
import { RedditThreadFromJSON, RedditThreadToJSON, } from './RedditThread';
/**
* Check if a given object implements the RedditResponse interface.
*/
export function instanceOfRedditResponse(value) {
return true;
}
export function RedditResponseFromJSON(json) {
return RedditResponseFromJSONTyped(json, false);
}
export function RedditResponseFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'asDicts': json['as_dicts'] == null ? undefined : (json['as_dicts'].map(RedditThreadFromJSON)),
'asString': json['as_string'] == null ? undefined : json['as_string'],
};
}
export function RedditResponseToJSON(json) {
return RedditResponseToJSONTyped(json, false);
}
export function RedditResponseToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'as_dicts': value['asDicts'] == null ? undefined : (value['asDicts'].map(RedditThreadToJSON)),
'as_string': value['asString'],
};
}