UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
56 lines (55 loc) 1.85 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.ScrapeItemToJSONTyped = exports.ScrapeItemToJSON = exports.ScrapeItemFromJSONTyped = exports.ScrapeItemFromJSON = exports.instanceOfScrapeItem = void 0; /** * Check if a given object implements the ScrapeItem interface. */ function instanceOfScrapeItem(value) { if (!('userAgent' in value) || value['userAgent'] === undefined) return false; if (!('count' in value) || value['count'] === undefined) return false; return true; } exports.instanceOfScrapeItem = instanceOfScrapeItem; function ScrapeItemFromJSON(json) { return ScrapeItemFromJSONTyped(json, false); } exports.ScrapeItemFromJSON = ScrapeItemFromJSON; function ScrapeItemFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'userAgent': json['user_agent'], 'count': json['count'], }; } exports.ScrapeItemFromJSONTyped = ScrapeItemFromJSONTyped; function ScrapeItemToJSON(json) { return ScrapeItemToJSONTyped(json, false); } exports.ScrapeItemToJSON = ScrapeItemToJSON; function ScrapeItemToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'user_agent': value['userAgent'], 'count': value['count'], }; } exports.ScrapeItemToJSONTyped = ScrapeItemToJSONTyped;