opensea-js
Version:
TypeScript SDK for the OpenSea marketplace helps developers build new experiences using NFTs and our marketplace data
42 lines • 1.37 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.EventsAPI = void 0;
const apiPaths_1 = require("./apiPaths");
/**
* Events-related API operations
*/
class EventsAPI {
constructor(fetcher) {
this.fetcher = fetcher;
}
/**
* Gets a list of events based on query parameters.
*/
async getEvents(args) {
const response = await this.fetcher.get((0, apiPaths_1.getEventsAPIPath)(), args);
return response;
}
/**
* Gets a list of events for a specific account.
*/
async getEventsByAccount(address, args) {
const response = await this.fetcher.get((0, apiPaths_1.getEventsByAccountAPIPath)(address), args);
return response;
}
/**
* Gets a list of events for a specific collection.
*/
async getEventsByCollection(collectionSlug, args) {
const response = await this.fetcher.get((0, apiPaths_1.getEventsByCollectionAPIPath)(collectionSlug), args);
return response;
}
/**
* Gets a list of events for a specific NFT.
*/
async getEventsByNFT(chain, address, identifier, args) {
const response = await this.fetcher.get((0, apiPaths_1.getEventsByNFTAPIPath)(chain, address, identifier), args);
return response;
}
}
exports.EventsAPI = EventsAPI;
//# sourceMappingURL=events.js.map