@emergentmethods/asknews-typescript-sdk
Version:
Typescript SDK for AskNews API
53 lines (52 loc) • 1.9 kB
JavaScript
/* tslint:disable */
/* eslint-disable */
/**
* AskNews API
* AskNews API [](https://status.asknews.app/status/prod)
*
* The version of the OpenAPI document: 0.24.66
* 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 { TopNArticlesTimeseriesItemFromJSON, TopNArticlesTimeseriesItemToJSON, } from './TopNArticlesTimeseriesItem';
/**
* Check if a given object implements the TopNArticlesTimeseriesDayItem interface.
*/
export function instanceOfTopNArticlesTimeseriesDayItem(value) {
if (!('day' in value) || value['day'] === undefined)
return false;
if (!('articles' in value) || value['articles'] === undefined)
return false;
if (!('totalCount' in value) || value['totalCount'] === undefined)
return false;
return true;
}
export function TopNArticlesTimeseriesDayItemFromJSON(json) {
return TopNArticlesTimeseriesDayItemFromJSONTyped(json, false);
}
export function TopNArticlesTimeseriesDayItemFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'day': json['day'],
'articles': (json['articles'].map(TopNArticlesTimeseriesItemFromJSON)),
'totalCount': json['total_count'],
};
}
export function TopNArticlesTimeseriesDayItemToJSON(json) {
return TopNArticlesTimeseriesDayItemToJSONTyped(json, false);
}
export function TopNArticlesTimeseriesDayItemToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'day': value['day'],
'articles': (value['articles'].map(TopNArticlesTimeseriesItemToJSON)),
'total_count': value['totalCount'],
};
}