@zikeji/hypixel
Version:
With IntelliSense support & test coverage, this is an unopinionated async/await API wrapper for Hypixel's Public API. It is developed in TypeScript complete with documentation, typed interfaces for all API responses, built-in rate-limit handling, flexible
32 lines (30 loc) • 897 B
text/typescript
import { Method } from "../../util/Method";
import { getResultObject, ResultObject } from "../../util/ResultObject";
import type { ResourcesGuildsAchievementsResponse } from "../../types/AugmentedTypes";
/**
* @example
* ```typescript
* const achievements = await client.resources.guilds.achievements();
* ```
* @category Client
*/
export class GuildsResources extends Method {
/**
* Retrieve a list of achievements a Hypixel guild can accomplish.
* @example
* ```typescript
* const achievements = await client.resources.guilds.achievements();
* ```
* @category API
*/
public async achievements(): Promise<
ResultObject<ResourcesGuildsAchievementsResponse, ["achievements"]>
> {
return getResultObject(
await this.client.call<ResourcesGuildsAchievementsResponse>(
"resources/guilds/achievements"
),
["achievements"]
);
}
}