myanimelist-wrapper
Version:
A comprehensive TypeScript wrapper for the Jikan API v4 (unofficial MyAnimeList API)
51 lines • 1.33 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ClubsEndpoint = void 0;
class ClubsEndpoint {
constructor(client) {
this.client = client;
}
/**
* Get club by ID
* @param id Club ID
* @returns Promise with club data
*/
async getById(id) {
return this.client.request(`/clubs/${id}`);
}
/**
* Get club members
* @param id Club ID
* @param page Page number
* @returns Promise with club members data
*/
async getMembers(id, page) {
return this.client.request(`/clubs/${id}/members`, { page });
}
/**
* Get club staff
* @param id Club ID
* @returns Promise with club staff data
*/
async getStaff(id) {
return this.client.request(`/clubs/${id}/staff`);
}
/**
* Get club relations
* @param id Club ID
* @returns Promise with club relations data
*/
async getRelations(id) {
return this.client.request(`/clubs/${id}/relations`);
}
/**
* Search for clubs
* @param params Search parameters
* @returns Promise with club search results
*/
async search(params) {
return this.client.request("/clubs", params);
}
}
exports.ClubsEndpoint = ClubsEndpoint;
//# sourceMappingURL=clubs.js.map