@emergentmethods/asknews-typescript-sdk
Version:
Typescript SDK for AskNews API
93 lines (81 loc) • 2.88 kB
text/typescript
/* 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 { mapValues } from '../runtime';
import type { TopNArticlesTimeseriesItem } from './TopNArticlesTimeseriesItem';
import {
TopNArticlesTimeseriesItemFromJSON,
TopNArticlesTimeseriesItemFromJSONTyped,
TopNArticlesTimeseriesItemToJSON,
TopNArticlesTimeseriesItemToJSONTyped,
} from './TopNArticlesTimeseriesItem';
/**
*
* @export
* @interface TopNArticlesTimeseriesDayItem
*/
export interface TopNArticlesTimeseriesDayItem {
/**
*
* @type {string}
* @memberof TopNArticlesTimeseriesDayItem
*/
day: string;
/**
*
* @type {Array<TopNArticlesTimeseriesItem>}
* @memberof TopNArticlesTimeseriesDayItem
*/
articles: Array<TopNArticlesTimeseriesItem>;
/**
*
* @type {number}
* @memberof TopNArticlesTimeseriesDayItem
*/
totalCount: number;
}
/**
* Check if a given object implements the TopNArticlesTimeseriesDayItem interface.
*/
export function instanceOfTopNArticlesTimeseriesDayItem(value: object): value is TopNArticlesTimeseriesDayItem {
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: any): TopNArticlesTimeseriesDayItem {
return TopNArticlesTimeseriesDayItemFromJSONTyped(json, false);
}
export function TopNArticlesTimeseriesDayItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): TopNArticlesTimeseriesDayItem {
if (json == null) {
return json;
}
return {
'day': json['day'],
'articles': ((json['articles'] as Array<any>).map(TopNArticlesTimeseriesItemFromJSON)),
'totalCount': json['total_count'],
};
}
export function TopNArticlesTimeseriesDayItemToJSON(json: any): TopNArticlesTimeseriesDayItem {
return TopNArticlesTimeseriesDayItemToJSONTyped(json, false);
}
export function TopNArticlesTimeseriesDayItemToJSONTyped(value?: TopNArticlesTimeseriesDayItem | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'day': value['day'],
'articles': ((value['articles'] as Array<any>).map(TopNArticlesTimeseriesItemToJSON)),
'total_count': value['totalCount'],
};
}