@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
40 lines • 1.68 kB
JavaScript
;
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.SkyBlockAuctions = void 0;
const Method_1 = require("../../util/Method");
const ResultObject_1 = require("../../util/ResultObject");
/**
* @example
* ```typescript
* const {auctions} = await client.skyblock.auctions.page(0);
* ```
* @category Client
*/
class SkyBlockAuctions extends Method_1.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
*/
page() {
return __awaiter(this, arguments, void 0, function* (page = 0) {
return (0, ResultObject_1.getResultObject)(yield this.client.call("skyblock/auctions", {
page: page.toString(10),
}), ["success"]);
});
}
}
exports.SkyBlockAuctions = SkyBlockAuctions;
//# sourceMappingURL=auctions.js.map