UNPKG

@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

33 lines (31 loc) 962 B
import { Paths } from "../../types/api"; import { Method } from "../../util/Method"; import { getResultObject, ResultObject } from "../../util/ResultObject"; import type { SkyblockAuctionsResponse } from "../../types/AugmentedTypes"; /** * @example * ```typescript * const {auctions} = await client.skyblock.auctions.page(0); * ``` * @category Client */ export class SkyBlockAuctions extends Method { /** * Returns SkyBlock auctions that are currently active in the in-game Auction House. * @example * ```typescript * const { auctions } = await client.skyblock.auctions.page(0); * ``` * @category API */ public async page( page: Paths.V2SkyblockAuctions.Get.Parameters.Page = 0 ): Promise<ResultObject<SkyblockAuctionsResponse, ["success"]>> { return getResultObject( await this.client.call<SkyblockAuctionsResponse>("skyblock/auctions", { page: page.toString(10), }), ["success"] ); } }