UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
50 lines (49 loc) 1.68 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 { ReferralItemFromJSON, ReferralItemToJSON, } from './ReferralItem'; import { ScrapeItemFromJSON, ScrapeItemToJSON, } from './ScrapeItem'; /** * Check if a given object implements the ScrapeDataItem interface. */ export function instanceOfScrapeDataItem(value) { if (!('scrapes' in value) || value['scrapes'] === undefined) return false; if (!('referrals' in value) || value['referrals'] === undefined) return false; return true; } export function ScrapeDataItemFromJSON(json) { return ScrapeDataItemFromJSONTyped(json, false); } export function ScrapeDataItemFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'scrapes': (json['scrapes'].map(ScrapeItemFromJSON)), 'referrals': (json['referrals'].map(ReferralItemFromJSON)), }; } export function ScrapeDataItemToJSON(json) { return ScrapeDataItemToJSONTyped(json, false); } export function ScrapeDataItemToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'scrapes': (value['scrapes'].map(ScrapeItemToJSON)), 'referrals': (value['referrals'].map(ReferralItemToJSON)), }; }