@parcl-finance/product-sdk
Version:
TypeScript SDK for interacting with Parcl's product APIs
26 lines • 852 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.CollectionsClient = void 0;
const httpClient_1 = require("./httpClient");
class CollectionsClient {
baseUrl;
client;
headers;
constructor(baseUrl, accessToken) {
const headers = {};
if (accessToken !== undefined) {
headers["Authorization"] = "Bearer " + accessToken;
}
this.headers = headers;
this.baseUrl = baseUrl;
this.client = new httpClient_1.HttpClient(this.baseUrl.toString(), this.headers);
}
async getCollection({ collection }) {
const { marketMetadata } = await this.client.get({
path: `/collections/${collection}`,
});
return marketMetadata;
}
}
exports.CollectionsClient = CollectionsClient;
//# sourceMappingURL=collections.js.map