@emergentmethods/asknews-typescript-sdk
Version:
Typescript SDK for AskNews API
84 lines (72 loc) • 2.67 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 { TopNArticlesTimeseriesDayItem } from './TopNArticlesTimeseriesDayItem';
import {
TopNArticlesTimeseriesDayItemFromJSON,
TopNArticlesTimeseriesDayItemFromJSONTyped,
TopNArticlesTimeseriesDayItemToJSON,
TopNArticlesTimeseriesDayItemToJSONTyped,
} from './TopNArticlesTimeseriesDayItem';
/**
*
* @export
* @interface TopNArticlesTimeseriesResponse
*/
export interface TopNArticlesTimeseriesResponse {
/**
*
* @type {Array<TopNArticlesTimeseriesDayItem>}
* @memberof TopNArticlesTimeseriesResponse
*/
data: Array<TopNArticlesTimeseriesDayItem>;
/**
*
* @type {number}
* @memberof TopNArticlesTimeseriesResponse
*/
totalCount: number;
}
/**
* Check if a given object implements the TopNArticlesTimeseriesResponse interface.
*/
export function instanceOfTopNArticlesTimeseriesResponse(value: object): value is TopNArticlesTimeseriesResponse {
if (!('data' in value) || value['data'] === undefined) return false;
if (!('totalCount' in value) || value['totalCount'] === undefined) return false;
return true;
}
export function TopNArticlesTimeseriesResponseFromJSON(json: any): TopNArticlesTimeseriesResponse {
return TopNArticlesTimeseriesResponseFromJSONTyped(json, false);
}
export function TopNArticlesTimeseriesResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): TopNArticlesTimeseriesResponse {
if (json == null) {
return json;
}
return {
'data': ((json['data'] as Array<any>).map(TopNArticlesTimeseriesDayItemFromJSON)),
'totalCount': json['total_count'],
};
}
export function TopNArticlesTimeseriesResponseToJSON(json: any): TopNArticlesTimeseriesResponse {
return TopNArticlesTimeseriesResponseToJSONTyped(json, false);
}
export function TopNArticlesTimeseriesResponseToJSONTyped(value?: TopNArticlesTimeseriesResponse | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'data': ((value['data'] as Array<any>).map(TopNArticlesTimeseriesDayItemToJSON)),
'total_count': value['totalCount'],
};
}