UNPKG

cmc-api

Version:

CoinMarketCap RESTful API Wrapper

18 lines 610 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CmcError = void 0; class CmcError extends Error { constructor(response, data) { super(response.error_message); this.data = data; this.errorCode = response.error_code; this.errorMessage = response.error_message; this.creditCount = response.credit_count; this.elapsed = response.elapsed; this.timestamp = response.timestamp; if (this.notice) this.notice = response.notice; } } exports.CmcError = CmcError; //# sourceMappingURL=cmc.error.js.map