UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
60 lines (59 loc) 1.76 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * AskNews API * AskNews API * * The version of the OpenAPI document: 0.18.6 * 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.RedditCommentToJSON = exports.RedditCommentFromJSONTyped = exports.RedditCommentFromJSON = exports.instanceOfRedditComment = void 0; /** * Check if a given object implements the RedditComment interface. */ function instanceOfRedditComment(value) { if (!('author' in value)) return false; if (!('body' in value)) return false; if (!('date' in value)) return false; if (!('upvotes' in value)) return false; return true; } exports.instanceOfRedditComment = instanceOfRedditComment; function RedditCommentFromJSON(json) { return RedditCommentFromJSONTyped(json, false); } exports.RedditCommentFromJSON = RedditCommentFromJSON; function RedditCommentFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'author': json['author'], 'body': json['body'], 'date': (new Date(json['date'])), 'upvotes': json['upvotes'], }; } exports.RedditCommentFromJSONTyped = RedditCommentFromJSONTyped; function RedditCommentToJSON(value) { if (value == null) { return value; } return { 'author': value['author'], 'body': value['body'], 'date': ((value['date']).toISOString()), 'upvotes': value['upvotes'], }; } exports.RedditCommentToJSON = RedditCommentToJSON;