@emergentmethods/asknews-typescript-sdk
Version:
Typescript SDK for AskNews API
48 lines (47 loc) • 1.51 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.
*/
/**
* Check if a given object implements the TopNArticlesByHitsItem interface.
*/
export function instanceOfTopNArticlesByHitsItem(value) {
if (!('articleUrl' in value) || value['articleUrl'] === undefined)
return false;
if (!('hitCount' in value) || value['hitCount'] === undefined)
return false;
return true;
}
export function TopNArticlesByHitsItemFromJSON(json) {
return TopNArticlesByHitsItemFromJSONTyped(json, false);
}
export function TopNArticlesByHitsItemFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'articleUrl': json['article_url'],
'hitCount': json['hit_count'],
};
}
export function TopNArticlesByHitsItemToJSON(json) {
return TopNArticlesByHitsItemToJSONTyped(json, false);
}
export function TopNArticlesByHitsItemToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'article_url': value['articleUrl'],
'hit_count': value['hitCount'],
};
}