@standard-crypto/farcaster-js-neynar
Version:
A tool for interacting with Farcaster via Neynar APIs.
26 lines • 947 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.NeynarAPIClient = void 0;
const index_js_1 = require("./v1/index.js");
const index_js_2 = require("./v2/index.js");
const logger_js_1 = require("./logger.js");
class NeynarAPIClient {
logger;
v1;
v2;
/**
* Instantiates a NeynarAPIClient
*
* Creates NeynarV1APIClient and NeynarV2APIClients
*/
constructor(apiKey, { logger = logger_js_1.silentLogger, axiosInstance, } = {}) {
this.logger = logger;
if (apiKey === '') {
throw new Error('Attempt to use an authenticated API method without first providing an api key');
}
this.v1 = new index_js_1.NeynarV1APIClient(apiKey, { logger, axiosInstance });
this.v2 = new index_js_2.NeynarV2APIClient(apiKey, { logger, axiosInstance });
}
}
exports.NeynarAPIClient = NeynarAPIClient;
//# sourceMappingURL=NeynarAPIClient.js.map