UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
84 lines (72 loc) 2.61 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'; import type { TopNArticlesForDomainItem } from './TopNArticlesForDomainItem'; import { TopNArticlesForDomainItemFromJSON, TopNArticlesForDomainItemFromJSONTyped, TopNArticlesForDomainItemToJSON, TopNArticlesForDomainItemToJSONTyped, } from './TopNArticlesForDomainItem'; /** * * @export * @interface TopNArticlesForDomainResponse */ export interface TopNArticlesForDomainResponse { /** * * @type {Array<TopNArticlesForDomainItem>} * @memberof TopNArticlesForDomainResponse */ data: Array<TopNArticlesForDomainItem>; /** * * @type {number} * @memberof TopNArticlesForDomainResponse */ totalCount: number; } /** * Check if a given object implements the TopNArticlesForDomainResponse interface. */ export function instanceOfTopNArticlesForDomainResponse(value: object): value is TopNArticlesForDomainResponse { if (!('data' in value) || value['data'] === undefined) return false; if (!('totalCount' in value) || value['totalCount'] === undefined) return false; return true; } export function TopNArticlesForDomainResponseFromJSON(json: any): TopNArticlesForDomainResponse { return TopNArticlesForDomainResponseFromJSONTyped(json, false); } export function TopNArticlesForDomainResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): TopNArticlesForDomainResponse { if (json == null) { return json; } return { 'data': ((json['data'] as Array<any>).map(TopNArticlesForDomainItemFromJSON)), 'totalCount': json['total_count'], }; } export function TopNArticlesForDomainResponseToJSON(json: any): TopNArticlesForDomainResponse { return TopNArticlesForDomainResponseToJSONTyped(json, false); } export function TopNArticlesForDomainResponseToJSONTyped(value?: TopNArticlesForDomainResponse | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'data': ((value['data'] as Array<any>).map(TopNArticlesForDomainItemToJSON)), 'total_count': value['totalCount'], }; }