@emergentmethods/asknews-typescript-sdk
Version:
Typescript SDK for AskNews API
84 lines (73 loc) • 2.36 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';
/**
*
* @export
* @interface TopNArticlesForDomainItem
*/
export interface TopNArticlesForDomainItem {
/**
*
* @type {string}
* @memberof TopNArticlesForDomainItem
*/
articleUrl: string;
/**
*
* @type {string}
* @memberof TopNArticlesForDomainItem
*/
articleId?: string | null;
/**
*
* @type {number}
* @memberof TopNArticlesForDomainItem
*/
hitCount: number;
}
/**
* Check if a given object implements the TopNArticlesForDomainItem interface.
*/
export function instanceOfTopNArticlesForDomainItem(value: object): value is TopNArticlesForDomainItem {
if (!('articleUrl' in value) || value['articleUrl'] === undefined) return false;
if (!('hitCount' in value) || value['hitCount'] === undefined) return false;
return true;
}
export function TopNArticlesForDomainItemFromJSON(json: any): TopNArticlesForDomainItem {
return TopNArticlesForDomainItemFromJSONTyped(json, false);
}
export function TopNArticlesForDomainItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): TopNArticlesForDomainItem {
if (json == null) {
return json;
}
return {
'articleUrl': json['article_url'],
'articleId': json['article_id'] == null ? undefined : json['article_id'],
'hitCount': json['hit_count'],
};
}
export function TopNArticlesForDomainItemToJSON(json: any): TopNArticlesForDomainItem {
return TopNArticlesForDomainItemToJSONTyped(json, false);
}
export function TopNArticlesForDomainItemToJSONTyped(value?: TopNArticlesForDomainItem | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'article_url': value['articleUrl'],
'article_id': value['articleId'],
'hit_count': value['hitCount'],
};
}