UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
57 lines (56 loc) 2.55 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.TopNArticlesTimeseriesResponseToJSONTyped = exports.TopNArticlesTimeseriesResponseToJSON = exports.TopNArticlesTimeseriesResponseFromJSONTyped = exports.TopNArticlesTimeseriesResponseFromJSON = exports.instanceOfTopNArticlesTimeseriesResponse = void 0; const TopNArticlesTimeseriesDayItem_1 = require("./TopNArticlesTimeseriesDayItem"); /** * Check if a given object implements the TopNArticlesTimeseriesResponse interface. */ function instanceOfTopNArticlesTimeseriesResponse(value) { if (!('data' in value) || value['data'] === undefined) return false; if (!('totalCount' in value) || value['totalCount'] === undefined) return false; return true; } exports.instanceOfTopNArticlesTimeseriesResponse = instanceOfTopNArticlesTimeseriesResponse; function TopNArticlesTimeseriesResponseFromJSON(json) { return TopNArticlesTimeseriesResponseFromJSONTyped(json, false); } exports.TopNArticlesTimeseriesResponseFromJSON = TopNArticlesTimeseriesResponseFromJSON; function TopNArticlesTimeseriesResponseFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'data': (json['data'].map(TopNArticlesTimeseriesDayItem_1.TopNArticlesTimeseriesDayItemFromJSON)), 'totalCount': json['total_count'], }; } exports.TopNArticlesTimeseriesResponseFromJSONTyped = TopNArticlesTimeseriesResponseFromJSONTyped; function TopNArticlesTimeseriesResponseToJSON(json) { return TopNArticlesTimeseriesResponseToJSONTyped(json, false); } exports.TopNArticlesTimeseriesResponseToJSON = TopNArticlesTimeseriesResponseToJSON; function TopNArticlesTimeseriesResponseToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'data': (value['data'].map(TopNArticlesTimeseriesDayItem_1.TopNArticlesTimeseriesDayItemToJSON)), 'total_count': value['totalCount'], }; } exports.TopNArticlesTimeseriesResponseToJSONTyped = TopNArticlesTimeseriesResponseToJSONTyped;