UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
76 lines (65 loc) 2.07 kB
/* tslint:disable */ /* eslint-disable */ /** * AskNews API * AskNews API [![status](https://status.asknews.app/api/badge/2/status?style=for-the-badge)](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 TopNArticlesByHitsItem */ export interface TopNArticlesByHitsItem { /** * * @type {string} * @memberof TopNArticlesByHitsItem */ articleUrl: string; /** * * @type {number} * @memberof TopNArticlesByHitsItem */ hitCount: number; } /** * Check if a given object implements the TopNArticlesByHitsItem interface. */ export function instanceOfTopNArticlesByHitsItem(value: object): value is TopNArticlesByHitsItem { if (!('articleUrl' in value) || value['articleUrl'] === undefined) return false; if (!('hitCount' in value) || value['hitCount'] === undefined) return false; return true; } export function TopNArticlesByHitsItemFromJSON(json: any): TopNArticlesByHitsItem { return TopNArticlesByHitsItemFromJSONTyped(json, false); } export function TopNArticlesByHitsItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): TopNArticlesByHitsItem { if (json == null) { return json; } return { 'articleUrl': json['article_url'], 'hitCount': json['hit_count'], }; } export function TopNArticlesByHitsItemToJSON(json: any): TopNArticlesByHitsItem { return TopNArticlesByHitsItemToJSONTyped(json, false); } export function TopNArticlesByHitsItemToJSONTyped(value?: TopNArticlesByHitsItem | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'article_url': value['articleUrl'], 'hit_count': value['hitCount'], }; }