diff --git a/src/API/skyblock/getFireSales.js b/src/API/skyblock/getFireSales.js index 32a79b1b..e96cdc7d 100644 --- a/src/API/skyblock/getFireSales.js +++ b/src/API/skyblock/getFireSales.js @@ -3,5 +3,5 @@ module.exports = async function () { // eslint-disable-next-line no-underscore-dangle const res = await this._makeRequest('/skyblock/firesales'); if (res.raw) return res; - return res.sales.length ? res.sales.map((a) => new FireSale(a)) : []; + return res.sales.length ? res.sales.map((sale) => new FireSale(sale)) : []; }; diff --git a/typings/index.d.ts b/typings/index.d.ts index bb9feb8a..61cf5746 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -375,13 +375,13 @@ export interface methodOptions { noCaching?: boolean; } export interface playerMethodOptions extends methodOptions { - raw?: boolean; guild?: boolean; recentGames?: boolean; } export interface skyblockMemberOptions extends methodOptions { - raw?: boolean; fetchPlayer?: boolean; + getMuseum?: boolean; + getGarden?: boolean; } export interface auctionsOptions extends methodOptions { noInfo?: boolean; @@ -1124,112 +1124,45 @@ declare module 'hypixel-api-reborn' { */ readonly cache: Map; /** - * @description Allows you to get statistics of player - * @param query - player nickname or uuid - * @param options - player search options + * @description Retrieves information about Hypixel achievements. + * @param {methodOptions} [options] - The method options. */ - getPlayer(query: string, options?: playerMethodOptions): Promise; + getAchievements(options?: methodOptions): Promise; /** - * @description Allows you to get statistics of hypixel guild - * @param searchParameter - 'name', 'player' or 'id' - * @param query - guild name, player nickname or guild id + * @description Parses the RSS feed from status.hypixel.net + * @param {methodOptions} [options] - The method options. */ - getGuild(searchParameter: 'name' | 'player' | 'id', query: string, options?: methodOptions): Promise; - /** - * @description Allows you to get statistics of watchdog anticheat - */ - getWatchdogStats(options?: methodOptions): Promise; + getAPIStatus(options?: methodOptions): Promise; /** * @description Allows you to get all active boosters + * @param {methodOptions} [options] - The method options. */ getBoosters(options?: methodOptions): Promise; /** - * @description Allows you to get a player's skyblock profiles - * @param query - player nickname or uuid - */ - getSkyblockProfiles(query: string, options?: skyblockMemberOptions): Promise; - /** - * @description Allows you to get a player's skyblock member data from all their profiles - * @param query - player nickname or uuid - */ - getSkyblockMember(query: string, options?: skyblockMemberOptions): Promise>; - /** - * Allows you to get filtered skyblock auctions - * Using auction ID will return an array of at most 1 element - * @method - * @name Client#getSkyblockAuction - * @param type - Filter to use - * @param query - uuid of profile, player, or auction. IGN can be used as well - * @param includeItemBytes - include item bytes (optional) - * @param options - Options - */ - getSkyblockAuction( - type: 'PROFILE' | 'PLAYER' | 'AUCTION', - query: string, - includeItemBytes?: boolean, - options?: methodOptions - ): Promise; /** - * @description Allows you to get all auctions of player - * @deprecated Use Client#getSkyblockAuction - * @param query - player nickname or uuid - * @param includeItemBytes - include item bytes (optional) - */ - getEndedSkyblockAuctions( - includeItemBytes?: boolean, - options?: methodOptions - ): Promise<{ info: AuctionInfo; auctions: PartialAuction[] }>; - /** - * @description Allows you to get all auctions of player - * @param query - player nickname or uuid - * @param includeItemBytes - include item bytes (optional) - */ - getSkyblockAuctionsByPlayer(query: string, includeItemBytes?: boolean, options?: methodOptions): Promise; - /** - * @description Allows you to get list of products - */ - getSkyblockBazaar(options?: methodOptions): Promise; - /** - * @description Gets bingo data - */ - getSkyblockBingo(options?: methodOptions): Promise; - /** - * @description Gets bingo data of a player - * @param query - UUID/IGN of player - */ - getSkyblockBingoByPlayer(query: string, options?: playerBingoOptions): Promise; - /** - * @description Gets data of skyblock government - */ - getSkyblockGovernment(options?: methodOptions): Promise; - /** - * @description Gets data of skyblock government - */ - getSkyblockGovernment(options?: methodOptions): Promise; - /** - * @description Allows you to get skyblock news - */ - getSkyblockNews(options?: methodOptions): Promise; - /** - * @description Get a array of active houses + * @description Allows you to get information about hypixel challenges [NO KEY REQUIRED] + * @param {methodOptions} [options] - The method options. */ - getActiveHouses(options?: methodOptions): Promise; + getChallenges(options?: methodOptions): Promise; /** - * @description Get a array of houses for a user - * @param query - UUID / IGN of player + * @description Allows you to get player count along with the player count of each public game + * @param {methodOptions} [options] - The method options. */ - getPlayerHouses(query: string, options?: methodOptions): Promise; + getGameCounts(options?: methodOptions): Promise; /** - * @description Get a house - * @param query - house uuid + * @description Allows you to get statistics of hypixel guild + * @param {"id"|"name"|"player"} searchParameter - How you want to search + * @param {string} query - guild name, player nickname or guild id + * @param {methodOptions} [options] - The method options. */ - getHouse(query: string, options?: methodOptions): Promise; + getGuild(searchParameter: 'id' | 'name' | 'player', query: string, options?: methodOptions): Promise; /** - * @description Allows you to get player's network status - * @param query - player nickname or uuid + * @description Allows you to get information about hypixel guild achievements [NO KEY REQUIRED] + * @param {methodOptions} [options] - The method options. */ - getStatus(query: string, options?: methodOptions): Promise; + getGuildAchievements(options?: methodOptions): Promise; /** * @description Allows you to get leaderboards of each mini-game + * @param {methodOptions} [options] - The method options. */ getLeaderboards(options?: methodOptions): Promise<{ ARENA: Leaderboard[]; @@ -1257,38 +1190,131 @@ declare module 'hypixel-api-reborn' { VAMPIREZ: Leaderboard[]; }>; /** - * @description Allows you to get recent games of a player + * @description Allows you to get statistics of player + * @param {string} query - player nickname or uuid + * @param {playerMethodOptions} [options] - player search options */ - getRecentGames(query: string, options?: methodOptions): Promise; + getPlayer(query: string, options?: playerMethodOptions): Promise; /** - * @description Allows you to get player count along with the player count of each public game + * @description Allows you to get information about hypixel quests [NO KEY REQUIRED] + * @param {methodOptions} [options] - Options */ - getGameCounts(options?: methodOptions): Promise; + getQuests(options?: methodOptions): Promise; + /** + * @description Allows you to get recent games of a player + * @param {string} query - player nickname or uuid + * @param {methodOptions} [options] - Options + */ + getRecentGames(query: string, options?: methodOptions): Promise; /** - * @param repeats Amount of times to ping hypixel, preferably between 1 and 10 times. * @description Parses information returned by hypixel upon a status request packet + * @param {number} repeats Amount of times to ping hypixel, preferably between 1 and 10 times. */ getServerInfo(repeats?: number): Promise; /** - * @description Parses the RSS feed from status.hypixel.net + * @description Allows you to get player's network status + * @param {string} query - player nickname or uuid + * @param {methodOptions} [options] - Options */ - getAPIStatus(): Promise; + getStatus(query: string, options?: methodOptions): Promise; /** - * @description Allows you to get information about hypixel challenges [NO KEY REQUIRED] + * @description Allows you to get statistics of watchdog anticheat + * @param {methodOptions} [options] - Options */ - getChallenges(options?: methodOptions): Promise; + getWatchdogStats(options?: methodOptions): Promise; /** - * @description Allows you to get information about hypixel quests [NO KEY REQUIRED] + * @description Allows you to get filtered skyblock auctions. Using auction ID will return an array of at most 1 element + * @name Client#getSkyblockAuction + * @param {'PROFILE' | 'PLAYER' | 'AUCTION'} type - Filter to use + * @param {string} query - uuid of profile, player, or auction. IGN can be used as well + * @param {boolean} includeItemBytes - include item bytes (optional) + * @param {methodOptions} [options] - Options */ - getQuests(options?: methodOptions): Promise; + getSkyblockAuction( + type: 'PROFILE' | 'PLAYER' | 'AUCTION', + query: string, + includeItemBytes?: boolean, + options?: methodOptions + ): Promise; /** - * Allows you to get information about hypixel achievements [NO KEY REQUIRED] + * @description Allows you to get all auctions of player + * @param {string} query - player nickname or uuid + * @param {boolean} includeItemBytes - include item bytes (optional) + * @param {methodOptions} [options] - Options */ - getAchievements(options?: methodOptions): Promise; + getSkyblockAuctionsByPlayer(query: string, includeItemBytes?: boolean, options?: methodOptions): Promise; /** - * @description Allows you to get information about hypixel guild achievements [NO KEY REQUIRED] + * @description Allows you to get list of products + * @param {methodOptions} [options] - Options */ - getGuildAchievements(options?: methodOptions): Promise; + getSkyblockBazaar(options?: methodOptions): Promise; + /** + * @description Gets bingo data + * @param {methodOptions} [options] - Options + */ + getSkyblockBingo(options?: methodOptions): Promise; + /** + * @description Gets bingo data of a player + * @param {string} query - UUID/IGN of player + * @param {methodOptions} [options] - Options + */ + getSkyblockBingoByPlayer(query: string, options?: playerBingoOptions): Promise; + /** + * @description Allows you to get list of active skyblock firesales + * @param {methodOptions} [options] - Options + */ + getSkyblockFireSales(options?: methodOptions): Promise; + /** + * @description Allows you to get a profiles skyblock garden + * @param {methodOptions} [options] - Options + */ + getSkyblockGarden(profileId: string, options?: methodOptions); + /** + * @description Gets data of skyblock government + * @param {methodOptions} [options] - Options + */ + getSkyblockGovernment(options?: methodOptions): Promise; + /** + * @description Allows you to get a player's skyblock member data from all their profiles + * @param query - player nickname or uuid + * @param {methodOptions} [options] - Options + */ + getSkyblockMember(query: string, options?: skyblockMemberOptions): Promise>; + /** + * @description Allows you to get statistics of player + * @param {string} query - player nickname or uuid + * @param {string} profileId - profile id + * @param {methodOptions} [options] - Options + */ + getSkyblockMuseum(query: string, profileId: string, options?: methodOptions); + /** + * @description Allows you to get skyblock news + * @param {methodOptions} [options] - Options + */ + getSkyblockNews(options?: methodOptions): Promise; + /** + * @description Allows you to get a player's skyblock profiles + * @param query - player nickname or uuid + * @param {methodOptions} [options] - Options + */ + getSkyblockProfiles(query: string, options?: skyblockMemberOptions): Promise; + /** + * @description Get a array of active houses + * @param {methodOptions} [options] - Options + */ + getActiveHouses(options?: methodOptions): Promise; + /** + * @description Get a array of houses for a user + * @param query - UUID / IGN of player + * @param {methodOptions} [options] - Options + */ + getPlayerHouses(query: string, options?: methodOptions): Promise; + /** + * @description Get a house + * @param query - house uuid + * @param {methodOptions} [options] - Options + */ + getHouse(query: string, options?: methodOptions): Promise; /** * @param amount - Amount of cache entries to delete * @description Allows you to clear cache