UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
58 lines (57 loc) 2.37 kB
"use strict"; /* 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. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.TopNArticlesTimeseriesItemToJSONTyped = exports.TopNArticlesTimeseriesItemToJSON = exports.TopNArticlesTimeseriesItemFromJSONTyped = exports.TopNArticlesTimeseriesItemFromJSON = exports.instanceOfTopNArticlesTimeseriesItem = void 0; /** * Check if a given object implements the TopNArticlesTimeseriesItem interface. */ function instanceOfTopNArticlesTimeseriesItem(value) { if (!('articleUrl' in value) || value['articleUrl'] === undefined) return false; if (!('hitCount' in value) || value['hitCount'] === undefined) return false; return true; } exports.instanceOfTopNArticlesTimeseriesItem = instanceOfTopNArticlesTimeseriesItem; function TopNArticlesTimeseriesItemFromJSON(json) { return TopNArticlesTimeseriesItemFromJSONTyped(json, false); } exports.TopNArticlesTimeseriesItemFromJSON = TopNArticlesTimeseriesItemFromJSON; function TopNArticlesTimeseriesItemFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'articleUrl': json['article_url'], 'articleId': json['article_id'] == null ? undefined : json['article_id'], 'hitCount': json['hit_count'], }; } exports.TopNArticlesTimeseriesItemFromJSONTyped = TopNArticlesTimeseriesItemFromJSONTyped; function TopNArticlesTimeseriesItemToJSON(json) { return TopNArticlesTimeseriesItemToJSONTyped(json, false); } exports.TopNArticlesTimeseriesItemToJSON = TopNArticlesTimeseriesItemToJSON; function TopNArticlesTimeseriesItemToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'article_url': value['articleUrl'], 'article_id': value['articleId'], 'hit_count': value['hitCount'], }; } exports.TopNArticlesTimeseriesItemToJSONTyped = TopNArticlesTimeseriesItemToJSONTyped;