UNPKG

cmc-api

Version:

CoinMarketCap RESTful API Wrapper. Supports endpoints cryptocurrency, exchanges (CEX), decentralized exchange (DEX), global metrics, community content and trends, tools and others.

35 lines 1.63 kB
"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.Repository = void 0; const decorators_util_1 = require("../utils/decorators.util"); /** * Abstract base class for repositories that interact with the CoinMarketCap API. * * @decorator `@Enumerable(false)` - Marks the `cmc` property as non-enumerable. * @category Core */ class Repository { /** * Creates an instance of the repository with the provided {@link CoinMarketCapApi | `CoinMarketCapApi`}. * * @param cmc - An instance of the CoinMarketCapApi to interact with the CoinMarketCap service. */ constructor(cmc) { this.cmc = cmc; } } exports.Repository = Repository; __decorate([ (0, decorators_util_1.Enumerable)(false), __metadata("design:type", Function) ], Repository.prototype, "cmc", void 0); //# sourceMappingURL=repository.js.map