UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
58 lines (57 loc) 2.35 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.TopNArticlesForDomainItemToJSONTyped = exports.TopNArticlesForDomainItemToJSON = exports.TopNArticlesForDomainItemFromJSONTyped = exports.TopNArticlesForDomainItemFromJSON = exports.instanceOfTopNArticlesForDomainItem = void 0; /** * Check if a given object implements the TopNArticlesForDomainItem interface. */ function instanceOfTopNArticlesForDomainItem(value) { if (!('articleUrl' in value) || value['articleUrl'] === undefined) return false; if (!('hitCount' in value) || value['hitCount'] === undefined) return false; return true; } exports.instanceOfTopNArticlesForDomainItem = instanceOfTopNArticlesForDomainItem; function TopNArticlesForDomainItemFromJSON(json) { return TopNArticlesForDomainItemFromJSONTyped(json, false); } exports.TopNArticlesForDomainItemFromJSON = TopNArticlesForDomainItemFromJSON; function TopNArticlesForDomainItemFromJSONTyped(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.TopNArticlesForDomainItemFromJSONTyped = TopNArticlesForDomainItemFromJSONTyped; function TopNArticlesForDomainItemToJSON(json) { return TopNArticlesForDomainItemToJSONTyped(json, false); } exports.TopNArticlesForDomainItemToJSON = TopNArticlesForDomainItemToJSON; function TopNArticlesForDomainItemToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'article_url': value['articleUrl'], 'article_id': value['articleId'], 'hit_count': value['hitCount'], }; } exports.TopNArticlesForDomainItemToJSONTyped = TopNArticlesForDomainItemToJSONTyped;