UNPKG

coinmarketcap-js

Version:
37 lines (36 loc) 1.72 kB
"use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.restClient = void 0; const crypto_1 = require("./crypto"); const exchange_1 = require("./exchange"); const fiat_1 = require("./fiat"); const global_1 = require("./global"); const tools_1 = require("./tools"); __exportStar(require("./crypto"), exports); __exportStar(require("./exchange"), exports); __exportStar(require("./fiat"), exports); __exportStar(require("./global"), exports); __exportStar(require("./interfaces"), exports); const restClient = (apiKey, apiVersion = "v1", apiBase = "https://pro-api.coinmarketcap.com") => ({ crypto: (0, crypto_1.cryptoClient)(apiKey, apiVersion, apiBase), fiat: (0, fiat_1.fiatClient)(apiKey, apiVersion, apiBase), exchange: (0, exchange_1.exchangeClient)(apiKey, apiVersion, apiBase), global: (0, global_1.globalClient)(apiKey, apiVersion, apiBase), tools: (0, tools_1.toolsClient)(apiKey, apiVersion, apiBase), }); exports.restClient = restClient; exports.default = exports.restClient;