@emergentmethods/asknews-typescript-sdk
Version:
Typescript SDK for AskNews API
49 lines (48 loc) • 1.76 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 { TopNArticlesTimeseriesDayItemFromJSON, TopNArticlesTimeseriesDayItemToJSON, } from './TopNArticlesTimeseriesDayItem';
/**
* Check if a given object implements the TopNArticlesTimeseriesResponse interface.
*/
export function instanceOfTopNArticlesTimeseriesResponse(value) {
if (!('data' in value) || value['data'] === undefined)
return false;
if (!('totalCount' in value) || value['totalCount'] === undefined)
return false;
return true;
}
export function TopNArticlesTimeseriesResponseFromJSON(json) {
return TopNArticlesTimeseriesResponseFromJSONTyped(json, false);
}
export function TopNArticlesTimeseriesResponseFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'data': (json['data'].map(TopNArticlesTimeseriesDayItemFromJSON)),
'totalCount': json['total_count'],
};
}
export function TopNArticlesTimeseriesResponseToJSON(json) {
return TopNArticlesTimeseriesResponseToJSONTyped(json, false);
}
export function TopNArticlesTimeseriesResponseToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'data': (value['data'].map(TopNArticlesTimeseriesDayItemToJSON)),
'total_count': value['totalCount'],
};
}