@emergentmethods/asknews-typescript-sdk
Version:
Typescript SDK for AskNews API
61 lines (60 loc) • 2.67 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.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.TopNArticlesTimeseriesDayItemToJSONTyped = exports.TopNArticlesTimeseriesDayItemToJSON = exports.TopNArticlesTimeseriesDayItemFromJSONTyped = exports.TopNArticlesTimeseriesDayItemFromJSON = exports.instanceOfTopNArticlesTimeseriesDayItem = void 0;
const TopNArticlesTimeseriesItem_1 = require("./TopNArticlesTimeseriesItem");
/**
* Check if a given object implements the TopNArticlesTimeseriesDayItem interface.
*/
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;
}
exports.instanceOfTopNArticlesTimeseriesDayItem = instanceOfTopNArticlesTimeseriesDayItem;
function TopNArticlesTimeseriesDayItemFromJSON(json) {
return TopNArticlesTimeseriesDayItemFromJSONTyped(json, false);
}
exports.TopNArticlesTimeseriesDayItemFromJSON = TopNArticlesTimeseriesDayItemFromJSON;
function TopNArticlesTimeseriesDayItemFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'day': json['day'],
'articles': (json['articles'].map(TopNArticlesTimeseriesItem_1.TopNArticlesTimeseriesItemFromJSON)),
'totalCount': json['total_count'],
};
}
exports.TopNArticlesTimeseriesDayItemFromJSONTyped = TopNArticlesTimeseriesDayItemFromJSONTyped;
function TopNArticlesTimeseriesDayItemToJSON(json) {
return TopNArticlesTimeseriesDayItemToJSONTyped(json, false);
}
exports.TopNArticlesTimeseriesDayItemToJSON = TopNArticlesTimeseriesDayItemToJSON;
function TopNArticlesTimeseriesDayItemToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'day': value['day'],
'articles': (value['articles'].map(TopNArticlesTimeseriesItem_1.TopNArticlesTimeseriesItemToJSON)),
'total_count': value['totalCount'],
};
}
exports.TopNArticlesTimeseriesDayItemToJSONTyped = TopNArticlesTimeseriesDayItemToJSONTyped;