@standard-crypto/farcaster-js-neynar
Version:
A tool for interacting with Farcaster via Neynar APIs.
22 lines • 778 B
JavaScript
import { NeynarV1APIClient } from './v1/index.js';
import { NeynarV2APIClient } from './v2/index.js';
import { silentLogger } from './logger.js';
export class NeynarAPIClient {
logger;
v1;
v2;
/**
* Instantiates a NeynarAPIClient
*
* Creates NeynarV1APIClient and NeynarV2APIClients
*/
constructor(apiKey, { logger = 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 NeynarV1APIClient(apiKey, { logger, axiosInstance });
this.v2 = new NeynarV2APIClient(apiKey, { logger, axiosInstance });
}
}
//# sourceMappingURL=NeynarAPIClient.js.map