UNPKG

fastcomments-sdk

Version:

FastComments API Client - A SDK for interacting with the FastComments API

77 lines 2.71 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * fastcomments * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.0 * * * 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.instanceOfAPIPage = instanceOfAPIPage; exports.APIPageFromJSON = APIPageFromJSON; exports.APIPageFromJSONTyped = APIPageFromJSONTyped; exports.APIPageToJSON = APIPageToJSON; exports.APIPageToJSONTyped = APIPageToJSONTyped; /** * Check if a given object implements the APIPage interface. */ function instanceOfAPIPage(value) { if (!('rootCommentCount' in value) || value['rootCommentCount'] === undefined) return false; if (!('commentCount' in value) || value['commentCount'] === undefined) return false; if (!('createdAt' in value) || value['createdAt'] === undefined) return false; if (!('title' in value) || value['title'] === undefined) return false; if (!('urlId' in value) || value['urlId'] === undefined) return false; if (!('id' in value) || value['id'] === undefined) return false; return true; } function APIPageFromJSON(json) { return APIPageFromJSONTyped(json, false); } function APIPageFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'isClosed': json['isClosed'] == null ? undefined : json['isClosed'], 'accessibleByGroupIds': json['accessibleByGroupIds'] == null ? undefined : json['accessibleByGroupIds'], 'rootCommentCount': json['rootCommentCount'], 'commentCount': json['commentCount'], 'createdAt': (new Date(json['createdAt'])), 'title': json['title'], 'url': json['url'] == null ? undefined : json['url'], 'urlId': json['urlId'], 'id': json['id'], }; } function APIPageToJSON(json) { return APIPageToJSONTyped(json, false); } function APIPageToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'isClosed': value['isClosed'], 'accessibleByGroupIds': value['accessibleByGroupIds'], 'rootCommentCount': value['rootCommentCount'], 'commentCount': value['commentCount'], 'createdAt': ((value['createdAt']).toISOString()), 'title': value['title'], 'url': value['url'], 'urlId': value['urlId'], 'id': value['id'], }; } //# sourceMappingURL=APIPage.js.map