hypixel-api-reborn 12.0.0-0 → 12.0.0-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +5 -2
- package/.editorconfig +0 -12
- package/.github/ISSUE_TEMPLATE/Bug_report.md +0 -9
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -25
- package/.github/SECURITY.md +0 -21
- package/.github/labels.yml +0 -24
- package/.github/workflows/ci-cd.yml +0 -126
- package/.prettierrc +0 -13
- package/.vscode/extensions.json +0 -10
- package/dist/package.json +0 -66
- package/dist/src/API/getAchievements.js +0 -16
- package/dist/src/API/getAchievements.test.js +0 -74
- package/dist/src/API/getActiveHouses.js +0 -16
- package/dist/src/API/getActiveHouses.test.js +0 -43
- package/dist/src/API/getBoosters.js +0 -16
- package/dist/src/API/getBoosters.test.js +0 -72
- package/dist/src/API/getChallenges.js +0 -16
- package/dist/src/API/getChallenges.test.js +0 -51
- package/dist/src/API/getGameCounts.js +0 -16
- package/dist/src/API/getGameCounts.test.js +0 -26
- package/dist/src/API/getGuild.js +0 -30
- package/dist/src/API/getGuild.test.js +0 -508
- package/dist/src/API/getGuildAchievements.js +0 -16
- package/dist/src/API/getGuildAchievements.test.js +0 -51
- package/dist/src/API/getHouse.js +0 -18
- package/dist/src/API/getHouse.test.js +0 -51
- package/dist/src/API/getLeaderboards.js +0 -23
- package/dist/src/API/getLeaderboards.test.js +0 -55
- package/dist/src/API/getPlayer.js +0 -31
- package/dist/src/API/getPlayer.test.js +0 -290
- package/dist/src/API/getPlayerHouses.js +0 -19
- package/dist/src/API/getPlayerHouses.test.js +0 -50
- package/dist/src/API/getQuests.js +0 -16
- package/dist/src/API/getQuests.test.js +0 -48
- package/dist/src/API/getRecentGames.js +0 -19
- package/dist/src/API/getRecentGames.test.js +0 -52
- package/dist/src/API/getSkyblockAuction.js +0 -32
- package/dist/src/API/getSkyblockAuction.test.js +0 -382
- package/dist/src/API/getSkyblockAuctions.js +0 -51
- package/dist/src/API/getSkyblockAuctions.test.js +0 -366
- package/dist/src/API/getSkyblockAuctionsByPlayer.js +0 -19
- package/dist/src/API/getSkyblockAuctionsByPlayer.test.js +0 -207
- package/dist/src/API/getSkyblockBazaar.js +0 -16
- package/dist/src/API/getSkyblockBazaar.test.js +0 -51
- package/dist/src/API/getSkyblockBingo.js +0 -16
- package/dist/src/API/getSkyblockBingo.test.js +0 -40
- package/dist/src/API/getSkyblockFireSales.js +0 -16
- package/dist/src/API/getSkyblockFireSales.test.js +0 -55
- package/dist/src/API/getSkyblockGarden.js +0 -18
- package/dist/src/API/getSkyblockGarden.test.js +0 -43
- package/dist/src/API/getSkyblockGovernment.js +0 -16
- package/dist/src/API/getSkyblockGovernment.test.js +0 -60
- package/dist/src/API/getSkyblockMember.js +0 -40
- package/dist/src/API/getSkyblockMember.test.js +0 -648
- package/dist/src/API/getSkyblockMuseum.js +0 -19
- package/dist/src/API/getSkyblockMuseum.test.js +0 -78
- package/dist/src/API/getSkyblockNews.js +0 -16
- package/dist/src/API/getSkyblockNews.test.js +0 -35
- package/dist/src/API/getSkyblockProfiles.js +0 -41
- package/dist/src/API/getSkyblockProfiles.test.js +0 -121
- package/dist/src/API/getStatus.js +0 -17
- package/dist/src/API/getStatus.test.js +0 -57
- package/dist/src/API/getWatchdogStats.js +0 -16
- package/dist/src/API/getWatchdogStats.test.js +0 -37
- package/dist/src/API/index.js +0 -56
- package/dist/src/Client.js +0 -70
- package/dist/src/Client.test.js +0 -115
- package/dist/src/Errors.js +0 -28
- package/dist/src/Private/CacheHandler.js +0 -31
- package/dist/src/Private/CacheHandler.test.js +0 -37
- package/dist/src/Private/Endpoint.js +0 -10
- package/dist/src/Private/Endpoint.test.js +0 -17
- package/dist/src/Private/RateLimit.js +0 -30
- package/dist/src/Private/RateLimit.test.js +0 -73
- package/dist/src/Private/Requests.js +0 -106
- package/dist/src/Private/Requests.test.js +0 -48
- package/dist/src/Private/Updater.js +0 -41
- package/dist/src/Private/Updater.test.js +0 -52
- package/dist/src/index.js +0 -34
- package/dist/src/structures/Boosters/Booster.js +0 -38
- package/dist/src/structures/Boosters/Booster.test.js +0 -7
- package/dist/src/structures/Color.js +0 -73
- package/dist/src/structures/Color.test.js +0 -23
- package/dist/src/structures/Game.js +0 -31
- package/dist/src/structures/GameCounts.js +0 -23
- package/dist/src/structures/Guild/Guild.js +0 -61
- package/dist/src/structures/Guild/GuildMember.js +0 -30
- package/dist/src/structures/Guild/GuildRank.js +0 -20
- package/dist/src/structures/House.js +0 -22
- package/dist/src/structures/House.test.js +0 -24
- package/dist/src/structures/ItemBytes.js +0 -10
- package/dist/src/structures/Leaderboard.js +0 -17
- package/dist/src/structures/Leaderboard.test.js +0 -25
- package/dist/src/structures/MiniGames/Arcade.js +0 -437
- package/dist/src/structures/MiniGames/Arcade.test.js +0 -643
- package/dist/src/structures/MiniGames/ArenaBrawl.js +0 -48
- package/dist/src/structures/MiniGames/ArenaBrawl.test.js +0 -120
- package/dist/src/structures/MiniGames/BedWars.js +0 -299
- package/dist/src/structures/MiniGames/BedWars.test.js +0 -936
- package/dist/src/structures/MiniGames/BlitzSurvivalGames.js +0 -170
- package/dist/src/structures/MiniGames/BlitzSurvivalGames.test.js +0 -2238
- package/dist/src/structures/MiniGames/BuildBattle.js +0 -27
- package/dist/src/structures/MiniGames/BuildBattle.test.js +0 -42
- package/dist/src/structures/MiniGames/CopsAndCrims.js +0 -126
- package/dist/src/structures/MiniGames/CopsAndCrims.test.js +0 -162
- package/dist/src/structures/MiniGames/Duels.js +0 -466
- package/dist/src/structures/MiniGames/Duels.test.js +0 -1853
- package/dist/src/structures/MiniGames/MegaWalls.js +0 -194
- package/dist/src/structures/MiniGames/MegaWalls.test.js +0 -4790
- package/dist/src/structures/MiniGames/MurderMystery.js +0 -84
- package/dist/src/structures/MiniGames/MurderMystery.test.js +0 -241
- package/dist/src/structures/MiniGames/Paintball.js +0 -36
- package/dist/src/structures/MiniGames/Paintball.test.js +0 -51
- package/dist/src/structures/MiniGames/Pit.js +0 -124
- package/dist/src/structures/MiniGames/Pit.test.js +0 -218
- package/dist/src/structures/MiniGames/PitInventoryItem.js +0 -19
- package/dist/src/structures/MiniGames/Quakecraft.js +0 -68
- package/dist/src/structures/MiniGames/Quakecraft.test.js +0 -105
- package/dist/src/structures/MiniGames/SkyWars.js +0 -264
- package/dist/src/structures/MiniGames/Skywars.test.js +0 -413
- package/dist/src/structures/MiniGames/SmashHeroes.js +0 -110
- package/dist/src/structures/MiniGames/SmashHeroes.test.js +0 -647
- package/dist/src/structures/MiniGames/SpeedUHC.js +0 -72
- package/dist/src/structures/MiniGames/SpeedUHC.test.js +0 -245
- package/dist/src/structures/MiniGames/TNTGames.js +0 -120
- package/dist/src/structures/MiniGames/TNTGames.test.js +0 -139
- package/dist/src/structures/MiniGames/TurboKartRacers.js +0 -57
- package/dist/src/structures/MiniGames/TurboKartRacers.test.js +0 -140
- package/dist/src/structures/MiniGames/UHC.js +0 -109
- package/dist/src/structures/MiniGames/UHC.test.js +0 -180
- package/dist/src/structures/MiniGames/VampireZ.js +0 -38
- package/dist/src/structures/MiniGames/VampireZ.test.js +0 -59
- package/dist/src/structures/MiniGames/Walls.js +0 -22
- package/dist/src/structures/MiniGames/Walls.test.js +0 -32
- package/dist/src/structures/MiniGames/Warlords.js +0 -76
- package/dist/src/structures/MiniGames/Warlords.test.js +0 -405
- package/dist/src/structures/MiniGames/WoolWars.js +0 -81
- package/dist/src/structures/MiniGames/WoolWars.test.js +0 -251
- package/dist/src/structures/Pet.js +0 -38
- package/dist/src/structures/Pets.js +0 -14
- package/dist/src/structures/Player.js +0 -147
- package/dist/src/structures/Player.test.js +0 -96
- package/dist/src/structures/PlayerCosmetics.js +0 -53
- package/dist/src/structures/RecentGame.js +0 -25
- package/dist/src/structures/SkyBlock/Auctions/Auction.js +0 -39
- package/dist/src/structures/SkyBlock/Auctions/AuctionInfo.js +0 -15
- package/dist/src/structures/SkyBlock/Auctions/BaseAuction.js +0 -19
- package/dist/src/structures/SkyBlock/Auctions/BaseAuction.test.js +0 -20
- package/dist/src/structures/SkyBlock/Auctions/Bid.js +0 -20
- package/dist/src/structures/SkyBlock/Bazaar/Order.js +0 -16
- package/dist/src/structures/SkyBlock/Bazaar/Order.test.js +0 -23
- package/dist/src/structures/SkyBlock/Bazaar/Product.js +0 -23
- package/dist/src/structures/SkyBlock/Bazaar/Product.test.js +0 -46
- package/dist/src/structures/SkyBlock/News/SkyblockNews.js +0 -32
- package/dist/src/structures/SkyBlock/SkyblockGarden.js +0 -62
- package/dist/src/structures/SkyBlock/SkyblockGarden.test.js +0 -22
- package/dist/src/structures/SkyBlock/SkyblockInventoryItem.js +0 -78
- package/dist/src/structures/SkyBlock/SkyblockMember.js +0 -406
- package/dist/src/structures/SkyBlock/SkyblockMember.test.js +0 -71
- package/dist/src/structures/SkyBlock/SkyblockMuseum.js +0 -29
- package/dist/src/structures/SkyBlock/SkyblockMuseumItem.js +0 -24
- package/dist/src/structures/SkyBlock/SkyblockPet.js +0 -27
- package/dist/src/structures/SkyBlock/SkyblockProfile.js +0 -36
- package/dist/src/structures/SkyBlock/Static/Bingo.js +0 -49
- package/dist/src/structures/SkyBlock/Static/BingoData.js +0 -19
- package/dist/src/structures/SkyBlock/Static/Candidate.js +0 -19
- package/dist/src/structures/SkyBlock/Static/FireSale.js +0 -22
- package/dist/src/structures/SkyBlock/Static/Government.js +0 -33
- package/dist/src/structures/SkyBlock/Static/Perk.js +0 -9
- package/dist/src/structures/Static/Achievement.js +0 -44
- package/dist/src/structures/Static/AchievementTier.js +0 -14
- package/dist/src/structures/Static/Achievements.js +0 -15
- package/dist/src/structures/Static/Challenges.js +0 -15
- package/dist/src/structures/Static/GameAchievements.js +0 -14
- package/dist/src/structures/Static/GameChallenges.js +0 -18
- package/dist/src/structures/Static/GameQuests.js +0 -10
- package/dist/src/structures/Static/GuildAchievements.js +0 -15
- package/dist/src/structures/Static/Quest.js +0 -24
- package/dist/src/structures/Static/Quests.js +0 -15
- package/dist/src/structures/Status.js +0 -17
- package/dist/src/structures/Status.test.js +0 -18
- package/dist/src/structures/WatchdogStats.js +0 -15
- package/dist/src/structures/WatchdogStats.test.js +0 -23
- package/dist/src/utils/Constants.js +0 -2170
- package/dist/src/utils/Guild.js +0 -71
- package/dist/src/utils/Player.js +0 -88
- package/dist/src/utils/Player.test.js +0 -82
- package/dist/src/utils/SkyblockUtils.js +0 -342
- package/dist/src/utils/SkyblockUtils.test.js +0 -8
- package/dist/src/utils/divide.js +0 -6
- package/dist/src/utils/divide.test.js +0 -12
- package/dist/src/utils/isGuildID.js +0 -3
- package/dist/src/utils/isGuildID.test.js +0 -16
- package/dist/src/utils/isUUID.js +0 -5
- package/dist/src/utils/isUUID.test.js +0 -31
- package/dist/src/utils/oscillation.js +0 -13
- package/dist/src/utils/oscillation.test.js +0 -17
- package/dist/src/utils/removeSnakeCase.js +0 -14
- package/dist/src/utils/romanize.js +0 -41
- package/dist/src/utils/romanize.test.js +0 -8
- package/eslint.config.js +0 -73
- package/renovate.json +0 -21
- package/src/API/API.d.ts +0 -16
- package/src/API/getAchievements.test.ts +0 -81
- package/src/API/getAchievements.ts +0 -20
- package/src/API/getActiveHouses.test.ts +0 -45
- package/src/API/getActiveHouses.ts +0 -20
- package/src/API/getBoosters.test.ts +0 -53
- package/src/API/getBoosters.ts +0 -20
- package/src/API/getChallenges.test.ts +0 -54
- package/src/API/getChallenges.ts +0 -19
- package/src/API/getGameCounts.test.ts +0 -28
- package/src/API/getGameCounts.ts +0 -20
- package/src/API/getGuild.test.ts +0 -478
- package/src/API/getGuild.ts +0 -35
- package/src/API/getGuildAchievements.test.ts +0 -59
- package/src/API/getGuildAchievements.ts +0 -20
- package/src/API/getHouse.test.ts +0 -55
- package/src/API/getHouse.ts +0 -21
- package/src/API/getLeaderboards.test.ts +0 -41
- package/src/API/getLeaderboards.ts +0 -30
- package/src/API/getPlayer.test.ts +0 -494
- package/src/API/getPlayer.ts +0 -33
- package/src/API/getPlayerHouses.test.ts +0 -53
- package/src/API/getPlayerHouses.ts +0 -22
- package/src/API/getQuests.test.ts +0 -51
- package/src/API/getQuests.ts +0 -20
- package/src/API/getRecentGames.test.ts +0 -51
- package/src/API/getRecentGames.ts +0 -22
- package/src/API/getSkyblockAuction.test.ts +0 -293
- package/src/API/getSkyblockAuction.ts +0 -36
- package/src/API/getSkyblockAuctions.test.ts +0 -346
- package/src/API/getSkyblockAuctions.ts +0 -59
- package/src/API/getSkyblockAuctionsByPlayer.test.ts +0 -249
- package/src/API/getSkyblockAuctionsByPlayer.ts +0 -22
- package/src/API/getSkyblockBazaar.test.ts +0 -52
- package/src/API/getSkyblockBazaar.ts +0 -20
- package/src/API/getSkyblockBingo.test.ts +0 -42
- package/src/API/getSkyblockBingo.ts +0 -20
- package/src/API/getSkyblockFireSales.test.ts +0 -43
- package/src/API/getSkyblockFireSales.ts +0 -20
- package/src/API/getSkyblockGarden.test.ts +0 -60
- package/src/API/getSkyblockGarden.ts +0 -21
- package/src/API/getSkyblockGovernment.test.ts +0 -78
- package/src/API/getSkyblockGovernment.ts +0 -20
- package/src/API/getSkyblockMember.test.ts +0 -308
- package/src/API/getSkyblockMember.ts +0 -45
- package/src/API/getSkyblockMuseum.test.ts +0 -91
- package/src/API/getSkyblockMuseum.ts +0 -22
- package/src/API/getSkyblockNews.test.ts +0 -45
- package/src/API/getSkyblockNews.ts +0 -20
- package/src/API/getSkyblockProfiles.test.ts +0 -164
- package/src/API/getSkyblockProfiles.ts +0 -43
- package/src/API/getStatus.test.ts +0 -42
- package/src/API/getStatus.ts +0 -21
- package/src/API/getWatchdogStats.test.ts +0 -44
- package/src/API/getWatchdogStats.ts +0 -20
- package/src/API/index.ts +0 -56
- package/src/Client.test.ts +0 -148
- package/src/Client.ts +0 -91
- package/src/Errors.ts +0 -42
- package/src/Private/CacheHandler.test.ts +0 -49
- package/src/Private/CacheHandler.ts +0 -41
- package/src/Private/Endpoint.test.ts +0 -23
- package/src/Private/Endpoint.ts +0 -14
- package/src/Private/RateLimit.test.ts +0 -99
- package/src/Private/RateLimit.ts +0 -38
- package/src/Private/Requests.test.ts +0 -59
- package/src/Private/Requests.ts +0 -128
- package/src/Private/Updater.test.ts +0 -68
- package/src/Private/Updater.ts +0 -48
- package/src/index.ts +0 -119
- package/src/structures/Boosters/Booster.ts +0 -40
- package/src/structures/Color.ts +0 -79
- package/src/structures/Game.ts +0 -147
- package/src/structures/GameCounts.ts +0 -26
- package/src/structures/Guild/Guild.ts +0 -67
- package/src/structures/Guild/GuildMember.ts +0 -33
- package/src/structures/Guild/GuildRank.ts +0 -22
- package/src/structures/House.ts +0 -24
- package/src/structures/ItemBytes.ts +0 -18
- package/src/structures/Leaderboard.ts +0 -14
- package/src/structures/MiniGames/Arcade.ts +0 -460
- package/src/structures/MiniGames/ArenaBrawl.ts +0 -51
- package/src/structures/MiniGames/BedWars.ts +0 -454
- package/src/structures/MiniGames/BlitzSurvivalGames.ts +0 -173
- package/src/structures/MiniGames/BuildBattle.ts +0 -36
- package/src/structures/MiniGames/CopsAndCrims.ts +0 -131
- package/src/structures/MiniGames/Duels.ts +0 -476
- package/src/structures/MiniGames/MegaWalls.ts +0 -197
- package/src/structures/MiniGames/MurderMystery.ts +0 -87
- package/src/structures/MiniGames/Paintball.ts +0 -38
- package/src/structures/MiniGames/Pit.ts +0 -139
- package/src/structures/MiniGames/PitInventoryItem.ts +0 -18
- package/src/structures/MiniGames/Quakecraft.ts +0 -70
- package/src/structures/MiniGames/SkyWars.ts +0 -288
- package/src/structures/MiniGames/SmashHeroes.ts +0 -114
- package/src/structures/MiniGames/SpeedUHC.ts +0 -71
- package/src/structures/MiniGames/TNTGames.ts +0 -126
- package/src/structures/MiniGames/TurboKartRacers.ts +0 -59
- package/src/structures/MiniGames/UHC.ts +0 -112
- package/src/structures/MiniGames/VampireZ.ts +0 -41
- package/src/structures/MiniGames/Walls.ts +0 -24
- package/src/structures/MiniGames/Warlords.ts +0 -79
- package/src/structures/MiniGames/WoolWars.ts +0 -106
- package/src/structures/Pet.ts +0 -40
- package/src/structures/Pets.ts +0 -46
- package/src/structures/Player.ts +0 -199
- package/src/structures/PlayerCosmetics.ts +0 -128
- package/src/structures/RecentGame.ts +0 -27
- package/src/structures/ServerInfo.ts +0 -40
- package/src/structures/SkyBlock/Auctions/Auction.ts +0 -43
- package/src/structures/SkyBlock/Auctions/AuctionInfo.ts +0 -20
- package/src/structures/SkyBlock/Auctions/BaseAuction.ts +0 -22
- package/src/structures/SkyBlock/Auctions/Bid.ts +0 -22
- package/src/structures/SkyBlock/Bazzar/Order.ts +0 -18
- package/src/structures/SkyBlock/Bazzar/Product.ts +0 -40
- package/src/structures/SkyBlock/News/SkyblockNews.ts +0 -35
- package/src/structures/SkyBlock/SkyblockGarden.ts +0 -118
- package/src/structures/SkyBlock/SkyblockInventoryItem.ts +0 -83
- package/src/structures/SkyBlock/SkyblockMember.ts +0 -317
- package/src/structures/SkyBlock/SkyblockMuseum.ts +0 -43
- package/src/structures/SkyBlock/SkyblockMuseumItem.ts +0 -26
- package/src/structures/SkyBlock/SkyblockPet.ts +0 -30
- package/src/structures/SkyBlock/SkyblockProfile.ts +0 -42
- package/src/structures/SkyBlock/Static/Bingo.ts +0 -50
- package/src/structures/SkyBlock/Static/BingoData.ts +0 -21
- package/src/structures/SkyBlock/Static/Candidate.ts +0 -22
- package/src/structures/SkyBlock/Static/FireSale.ts +0 -24
- package/src/structures/SkyBlock/Static/Government.ts +0 -42
- package/src/structures/SkyBlock/Static/Perk.ts +0 -10
- package/src/structures/Static/Achievement.ts +0 -49
- package/src/structures/Static/AchievementTier.ts +0 -18
- package/src/structures/Static/Achievements.ts +0 -20
- package/src/structures/Static/Challenges.ts +0 -20
- package/src/structures/Static/GameAchievements.ts +0 -19
- package/src/structures/Static/GameChallenges.ts +0 -28
- package/src/structures/Static/GameQuests.ts +0 -13
- package/src/structures/Static/GuildAchievements.ts +0 -19
- package/src/structures/Static/Quest.ts +0 -37
- package/src/structures/Static/Quests.ts +0 -20
- package/src/structures/Status.ts +0 -20
- package/src/structures/Watchdog/Stats.ts +0 -16
- package/src/typings/index.d.ts +0 -24
- package/src/utils/Constants.ts +0 -2194
- package/src/utils/Guild.ts +0 -90
- package/src/utils/Player.ts +0 -93
- package/src/utils/SkyblockUtils.test.ts +0 -9
- package/src/utils/SkyblockUtils.ts +0 -516
- package/src/utils/divide.test.ts +0 -13
- package/src/utils/divide.ts +0 -5
- package/src/utils/isGuildID.test.ts +0 -19
- package/src/utils/isGuildID.ts +0 -3
- package/src/utils/isUUID.test.ts +0 -35
- package/src/utils/isUUID.ts +0 -5
- package/src/utils/oscillation.ts +0 -11
- package/src/utils/removeSnakeCase.ts +0 -18
- package/src/utils/romanize.test.ts +0 -9
- package/src/utils/romanize.ts +0 -41
- package/tsconfig.json +0 -25
- package/vitest.config.ts +0 -8
- package/vitest.setup.ts +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hypixel-api-reborn",
|
|
3
|
-
"version": "12.0.0-
|
|
3
|
+
"version": "12.0.0-1",
|
|
4
4
|
"description": "Feature-rich Hypixel API wrapper for Node.js",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/src/typings/index.d.ts",
|
|
@@ -43,6 +43,9 @@
|
|
|
43
43
|
"repository": {
|
|
44
44
|
"url": "git+https://github.com/Hypixel-API-Reborn/hypixel-api-reborn.git"
|
|
45
45
|
},
|
|
46
|
+
"files": [
|
|
47
|
+
"dist/**/*"
|
|
48
|
+
],
|
|
46
49
|
"publisher": "Kathund",
|
|
47
50
|
"devDependencies": {
|
|
48
51
|
"@eslint/js": "^9.9.1",
|
|
@@ -57,7 +60,7 @@
|
|
|
57
60
|
"globals": "^15.9.0",
|
|
58
61
|
"prettier": "^3.3.3",
|
|
59
62
|
"typescript": "^5.5.4",
|
|
60
|
-
"typescript-eslint": "^8.
|
|
63
|
+
"typescript-eslint": "^8.4.0",
|
|
61
64
|
"vitest": "^2.0.5"
|
|
62
65
|
}
|
|
63
66
|
}
|
package/.editorconfig
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
## Changes
|
|
2
|
-
|
|
3
|
-
<!-- A clear and detailed description of the changes that you have done -->
|
|
4
|
-
|
|
5
|
-
<details>
|
|
6
|
-
<summary>Screenshots</summary>
|
|
7
|
-
<!--
|
|
8
|
-
Screenshots of the code running (if applicable)
|
|
9
|
-
Including these screenshots will assist the reviewing and speeding up the process
|
|
10
|
-
-->
|
|
11
|
-
|
|
12
|
-
</details>
|
|
13
|
-
|
|
14
|
-
<details>
|
|
15
|
-
<summary>Checkboxes</summary>
|
|
16
|
-
|
|
17
|
-
- [x] I've added new features. (methods or parameters)
|
|
18
|
-
- [ ] I've added jsdoc and typings.
|
|
19
|
-
- [ ] I've fixed bug. (_optional_ you can mention a issue if there is one)
|
|
20
|
-
- [ ] I've corrected the spelling in README, documentation, etc.
|
|
21
|
-
- [ ] I've tested my code. (`npm run tests`)
|
|
22
|
-
- [ ] I've check for issues. (`npm run eslint`)
|
|
23
|
-
- [ ] I've fixed my formatting. (`npm run prettier`)
|
|
24
|
-
|
|
25
|
-
</details>
|
package/.github/SECURITY.md
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# Security Policy
|
|
2
|
-
|
|
3
|
-
## Supported Versions
|
|
4
|
-
|
|
5
|
-
| Version | Supported |
|
|
6
|
-
| ------- | ------------------ |
|
|
7
|
-
| 8.2.x | :white_check_mark: |
|
|
8
|
-
| 9.x.x | :white_check_mark: |
|
|
9
|
-
| 10.x.x | :white_check_mark: |
|
|
10
|
-
| 11.x.x | :white_check_mark: |
|
|
11
|
-
|
|
12
|
-
## Reporting a Vulnerability
|
|
13
|
-
|
|
14
|
-
If a vulnerability is found within this project, as long as you follow the steps for responsible disclosure, there will
|
|
15
|
-
be no issue and the team will be greatful for your actions.
|
|
16
|
-
|
|
17
|
-
To report a vulnerability you can do so in the [Discord Server](https://discord.gg/NSEBNMM) by openeing a support ticket
|
|
18
|
-
or you can contact the primary contributor of this repository using the following contact methods:
|
|
19
|
-
|
|
20
|
-
- @kathund. on Discord
|
|
21
|
-
- @kathundd on Telegram
|
package/.github/labels.yml
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
XS:
|
|
2
|
-
name: size/XS
|
|
3
|
-
lines: 0
|
|
4
|
-
color: 3CBF00
|
|
5
|
-
S:
|
|
6
|
-
name: size/S
|
|
7
|
-
lines: 50
|
|
8
|
-
color: 5D9801
|
|
9
|
-
M:
|
|
10
|
-
name: size/M
|
|
11
|
-
lines: 200
|
|
12
|
-
color: 7F7203
|
|
13
|
-
L:
|
|
14
|
-
name: size/L
|
|
15
|
-
lines: 1000
|
|
16
|
-
color: A14C05
|
|
17
|
-
XL:
|
|
18
|
-
name: size/XL
|
|
19
|
-
lines: 3000
|
|
20
|
-
color: C32607
|
|
21
|
-
XXL:
|
|
22
|
-
name: size/XXL
|
|
23
|
-
lines: 7500
|
|
24
|
-
color: E50009
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
name: 'CI/CD'
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
paths:
|
|
5
|
-
- src/**
|
|
6
|
-
branches:
|
|
7
|
-
- master
|
|
8
|
-
workflow_dispatch:
|
|
9
|
-
pull_request:
|
|
10
|
-
|
|
11
|
-
env:
|
|
12
|
-
NODE_VERSION: '20'
|
|
13
|
-
|
|
14
|
-
jobs:
|
|
15
|
-
pnpm:
|
|
16
|
-
name: install dependencies (pnpm)
|
|
17
|
-
runs-on: ubuntu-latest
|
|
18
|
-
steps:
|
|
19
|
-
- name: Git checkout
|
|
20
|
-
uses: actions/checkout@v4
|
|
21
|
-
|
|
22
|
-
- name: Setup pnpm
|
|
23
|
-
uses: pnpm/action-setup@v2
|
|
24
|
-
|
|
25
|
-
- name: Use Node.js ${{ env.NODE_VERSION }}
|
|
26
|
-
uses: actions/setup-node@v4
|
|
27
|
-
with:
|
|
28
|
-
node-version: ${{ env.NODE_VERSION }}
|
|
29
|
-
cache: 'pnpm'
|
|
30
|
-
|
|
31
|
-
- name: Install node dependencies
|
|
32
|
-
run: pnpm i
|
|
33
|
-
|
|
34
|
-
prettier:
|
|
35
|
-
name: check linting (prettier)
|
|
36
|
-
needs: [pnpm]
|
|
37
|
-
runs-on: ubuntu-latest
|
|
38
|
-
steps:
|
|
39
|
-
- name: Git checkout
|
|
40
|
-
uses: actions/checkout@v4
|
|
41
|
-
|
|
42
|
-
- name: Setup pnpm
|
|
43
|
-
uses: pnpm/action-setup@v2
|
|
44
|
-
|
|
45
|
-
- name: Use Node.js ${{ env.NODE_VERSION }}
|
|
46
|
-
uses: actions/setup-node@v4
|
|
47
|
-
with:
|
|
48
|
-
node-version: ${{ env.NODE_VERSION }}
|
|
49
|
-
cache: 'pnpm'
|
|
50
|
-
|
|
51
|
-
- name: Install node dependencies
|
|
52
|
-
run: pnpm i
|
|
53
|
-
|
|
54
|
-
- name: Check prettier
|
|
55
|
-
run: pnpm prettier:check
|
|
56
|
-
|
|
57
|
-
eslint:
|
|
58
|
-
name: check linting (eslint)
|
|
59
|
-
needs: [pnpm]
|
|
60
|
-
runs-on: ubuntu-latest
|
|
61
|
-
steps:
|
|
62
|
-
- name: Git checkout
|
|
63
|
-
uses: actions/checkout@v4
|
|
64
|
-
|
|
65
|
-
- name: Setup pnpm
|
|
66
|
-
uses: pnpm/action-setup@v2
|
|
67
|
-
|
|
68
|
-
- name: Use Node.js ${{ env.NODE_VERSION }}
|
|
69
|
-
uses: actions/setup-node@v4
|
|
70
|
-
with:
|
|
71
|
-
node-version: ${{ env.NODE_VERSION }}
|
|
72
|
-
cache: 'pnpm'
|
|
73
|
-
|
|
74
|
-
- name: Install node dependencies
|
|
75
|
-
run: pnpm i
|
|
76
|
-
|
|
77
|
-
- name: Check eslint
|
|
78
|
-
run: pnpm lint:check
|
|
79
|
-
|
|
80
|
-
build:
|
|
81
|
-
name: build
|
|
82
|
-
needs: [pnpm, eslint]
|
|
83
|
-
runs-on: ubuntu-latest
|
|
84
|
-
steps:
|
|
85
|
-
- name: Git checkout
|
|
86
|
-
uses: actions/checkout@v4
|
|
87
|
-
|
|
88
|
-
- name: Setup pnpm
|
|
89
|
-
uses: pnpm/action-setup@v2
|
|
90
|
-
|
|
91
|
-
- name: Use Node.js ${{ env.NODE_VERSION }}
|
|
92
|
-
uses: actions/setup-node@v4
|
|
93
|
-
with:
|
|
94
|
-
node-version: ${{ env.NODE_VERSION }}
|
|
95
|
-
cache: 'pnpm'
|
|
96
|
-
|
|
97
|
-
- name: Install node dependencies
|
|
98
|
-
run: pnpm i
|
|
99
|
-
|
|
100
|
-
- name: Check build
|
|
101
|
-
run: pnpm build
|
|
102
|
-
|
|
103
|
-
tests:
|
|
104
|
-
name: tests
|
|
105
|
-
needs: [pnpm, eslint, build]
|
|
106
|
-
runs-on: ubuntu-latest
|
|
107
|
-
steps:
|
|
108
|
-
- name: Git checkout
|
|
109
|
-
uses: actions/checkout@v4
|
|
110
|
-
|
|
111
|
-
- name: Setup pnpm
|
|
112
|
-
uses: pnpm/action-setup@v2
|
|
113
|
-
|
|
114
|
-
- name: Use Node.js ${{ env.NODE_VERSION }}
|
|
115
|
-
uses: actions/setup-node@v4
|
|
116
|
-
with:
|
|
117
|
-
node-version: ${{ env.NODE_VERSION }}
|
|
118
|
-
cache: 'pnpm'
|
|
119
|
-
|
|
120
|
-
- name: Install node dependencies
|
|
121
|
-
run: pnpm i
|
|
122
|
-
|
|
123
|
-
- name: Check tests
|
|
124
|
-
env:
|
|
125
|
-
HYPIXEL_KEY: ${{ secrets.HYPIXEL_KEY }}
|
|
126
|
-
run: pnpm test
|
package/.prettierrc
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"bracketSameLine": true,
|
|
3
|
-
"trailingComma": "none",
|
|
4
|
-
"arrowParens": "always",
|
|
5
|
-
"bracketSpacing": true,
|
|
6
|
-
"proseWrap": "always",
|
|
7
|
-
"singleQuote": true,
|
|
8
|
-
"printWidth": 120,
|
|
9
|
-
"endOfLine": "lf",
|
|
10
|
-
"useTabs": false,
|
|
11
|
-
"tabWidth": 2,
|
|
12
|
-
"semi": true
|
|
13
|
-
}
|
package/.vscode/extensions.json
DELETED
package/dist/package.json
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "hypixel-api-reborn",
|
|
3
|
-
"version": "12.0.0",
|
|
4
|
-
"description": "Feature-rich Hypixel API wrapper for Node.js",
|
|
5
|
-
"main": "./src/index.ts",
|
|
6
|
-
"types": "./src/typings/index.d.ts",
|
|
7
|
-
"keywords": [
|
|
8
|
-
"minecraft",
|
|
9
|
-
"client",
|
|
10
|
-
"hypixel",
|
|
11
|
-
"api",
|
|
12
|
-
"hypixel-api",
|
|
13
|
-
"intellisense"
|
|
14
|
-
],
|
|
15
|
-
"bugs": {
|
|
16
|
-
"url": "https://github.com/Hypixel-API-Reborn/hypixel-api-reborn/issues"
|
|
17
|
-
},
|
|
18
|
-
"scripts": {
|
|
19
|
-
"lint:check": "npx eslint src/",
|
|
20
|
-
"lint": "npx eslint src/ --fix",
|
|
21
|
-
"prettier:check": "npx prettier --check src/",
|
|
22
|
-
"prettier": "npx prettier --write src/",
|
|
23
|
-
"build": "npx tsc",
|
|
24
|
-
"test": "npx vitest run",
|
|
25
|
-
"test:coverage": "npx vitest run --coverage",
|
|
26
|
-
"test:ui": "npx vitest --ui --coverage"
|
|
27
|
-
},
|
|
28
|
-
"engines": {
|
|
29
|
-
"node": ">=20.17.0"
|
|
30
|
-
},
|
|
31
|
-
"type": "module",
|
|
32
|
-
"packageManager": "pnpm@9.7.1",
|
|
33
|
-
"author": "Kathund",
|
|
34
|
-
"dependencies": {
|
|
35
|
-
"axios": "^1.7.5",
|
|
36
|
-
"farming-weight": "^0.4.12",
|
|
37
|
-
"node-cache": "^5.1.2",
|
|
38
|
-
"prismarine-nbt": "^2.5.0",
|
|
39
|
-
"rss-parser": "^3.13.0",
|
|
40
|
-
"skyhelper-networth": "^1.24.0"
|
|
41
|
-
},
|
|
42
|
-
"license": "MIT",
|
|
43
|
-
"readme": "https://github.com/Hypixel-API-Reborn/hypixel-api-reborn?tab=readme-ov-file#hypixel-api--reborn",
|
|
44
|
-
"repository": {
|
|
45
|
-
"url": "https://github.com/Hypixel-API-Reborn/hypixel-api-reborn"
|
|
46
|
-
},
|
|
47
|
-
"publisher": "Kathund",
|
|
48
|
-
"devDependencies": {
|
|
49
|
-
"@eslint/js": "^9.9.1",
|
|
50
|
-
"@j4cobi/eslint-plugin-sort-imports": "^1.0.2",
|
|
51
|
-
"@types/eslint": "^9.6.1",
|
|
52
|
-
"@types/node": "^20.16.2",
|
|
53
|
-
"@types/xml2js": "^0.4.14",
|
|
54
|
-
"@vitest/coverage-v8": "^2.0.5",
|
|
55
|
-
"@vitest/ui": "^2.0.5",
|
|
56
|
-
"dotenv": "^16.4.5",
|
|
57
|
-
"eslint": "^9.9.1",
|
|
58
|
-
"eslint-config-prettier": "^9.1.0",
|
|
59
|
-
"globals": "^15.9.0",
|
|
60
|
-
"prettier": "^3.3.3",
|
|
61
|
-
"typescript": "^5.5.4",
|
|
62
|
-
"typescript-eslint": "^8.3.0",
|
|
63
|
-
"vitest": "^2.0.5",
|
|
64
|
-
"xml2js": "^0.6.2"
|
|
65
|
-
}
|
|
66
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import Achievements from '../structures/Static/Achievements';
|
|
2
|
-
import Endpoint from '../Private/Endpoint';
|
|
3
|
-
class getAchievements extends Endpoint {
|
|
4
|
-
client;
|
|
5
|
-
constructor(client) {
|
|
6
|
-
super(client);
|
|
7
|
-
this.client = client;
|
|
8
|
-
}
|
|
9
|
-
async execute(options) {
|
|
10
|
-
const res = await this.client.requests.request('/resources/achievements', options);
|
|
11
|
-
if (res.options.raw)
|
|
12
|
-
return res.data;
|
|
13
|
-
return new Achievements(res.data);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
export default getAchievements;
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import Achievement from '../structures/Static/Achievement';
|
|
2
|
-
import Achievements from '../structures/Static/Achievements';
|
|
3
|
-
import Client from '../Client';
|
|
4
|
-
import GameAchievements from '../structures/Static/GameAchievements';
|
|
5
|
-
import { expect, expectTypeOf, test } from 'vitest';
|
|
6
|
-
test('getAchievements (raw)', async () => {
|
|
7
|
-
const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false, rateLimit: 'NONE' });
|
|
8
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
9
|
-
// @ts-expect-error
|
|
10
|
-
const data = await client.getAchievements({ raw: true });
|
|
11
|
-
expect(data).toBeDefined();
|
|
12
|
-
expectTypeOf(data).toEqualTypeOf();
|
|
13
|
-
client.destroy();
|
|
14
|
-
});
|
|
15
|
-
test('getAchievements', async () => {
|
|
16
|
-
const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false, rateLimit: 'NONE' });
|
|
17
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
18
|
-
// @ts-expect-error
|
|
19
|
-
const data = await client.getAchievements();
|
|
20
|
-
expect(data).toBeDefined();
|
|
21
|
-
expect(data).toBeInstanceOf(Achievements);
|
|
22
|
-
expectTypeOf(data).toEqualTypeOf();
|
|
23
|
-
expect(data.lastUpdatedTimestamp).toBeDefined();
|
|
24
|
-
expectTypeOf(data.lastUpdatedTimestamp).toEqualTypeOf();
|
|
25
|
-
expect(data.lastUpdatedTimestamp).toBeGreaterThan(0);
|
|
26
|
-
expect(data.lastUpdatedAt).toBeDefined();
|
|
27
|
-
expectTypeOf(data.lastUpdatedAt).toEqualTypeOf();
|
|
28
|
-
expect(data.achievementsPerGame).toBeDefined();
|
|
29
|
-
expectTypeOf(data.achievementsPerGame).toEqualTypeOf();
|
|
30
|
-
Object.keys(data.achievementsPerGame).forEach((game) => {
|
|
31
|
-
expect(data.achievementsPerGame[game]).toBeDefined();
|
|
32
|
-
expect(data.achievementsPerGame[game]).toBeInstanceOf(GameAchievements);
|
|
33
|
-
expectTypeOf(data.achievementsPerGame[game]).toEqualTypeOf();
|
|
34
|
-
expect(data.achievementsPerGame[game].category).toBeDefined();
|
|
35
|
-
expect(data.achievementsPerGame[game].category).toBe(game);
|
|
36
|
-
expectTypeOf(data.achievementsPerGame[game].totalPoints).toEqualTypeOf();
|
|
37
|
-
expect(data.achievementsPerGame[game].totalPoints).toBeDefined();
|
|
38
|
-
expect(data.achievementsPerGame[game].totalPoints).toBeGreaterThanOrEqual(0);
|
|
39
|
-
expectTypeOf(data.achievementsPerGame[game].totalPoints).toEqualTypeOf();
|
|
40
|
-
expect(data.achievementsPerGame[game].totalLegacyPoints).toBeDefined();
|
|
41
|
-
expect(data.achievementsPerGame[game].totalLegacyPoints).toBeGreaterThanOrEqual(0);
|
|
42
|
-
expect(data.achievementsPerGame[game].totalLegacyPoints).toBeDefined();
|
|
43
|
-
expectTypeOf(data.achievementsPerGame[game].totalLegacyPoints).toEqualTypeOf();
|
|
44
|
-
expect(data.achievementsPerGame[game].achievements).toBeDefined();
|
|
45
|
-
expectTypeOf(data.achievementsPerGame[game].achievements).toEqualTypeOf();
|
|
46
|
-
data.achievementsPerGame[game].achievements.forEach((gameAchievement) => {
|
|
47
|
-
expect(gameAchievement).toBeDefined();
|
|
48
|
-
expect(gameAchievement).toBeInstanceOf(Achievement);
|
|
49
|
-
expectTypeOf(gameAchievement).toEqualTypeOf();
|
|
50
|
-
expect(gameAchievement.name).toBeDefined();
|
|
51
|
-
expectTypeOf(gameAchievement.name).toEqualTypeOf();
|
|
52
|
-
expect(gameAchievement.codeName).toBeDefined();
|
|
53
|
-
expectTypeOf(gameAchievement.codeName).toEqualTypeOf();
|
|
54
|
-
expect(gameAchievement.description).toBeDefined();
|
|
55
|
-
expectTypeOf(gameAchievement.description).toEqualTypeOf();
|
|
56
|
-
expect(gameAchievement.type).toBeDefined();
|
|
57
|
-
expectTypeOf(gameAchievement.type).toEqualTypeOf();
|
|
58
|
-
expect(['ONE_TIME', 'TIERED']).toContain(gameAchievement.type);
|
|
59
|
-
expect(gameAchievement.rarity).toBeDefined();
|
|
60
|
-
expectTypeOf(gameAchievement.rarity).toEqualTypeOf();
|
|
61
|
-
expect(gameAchievement.tierInformation).toBeDefined();
|
|
62
|
-
expectTypeOf(gameAchievement.tierInformation).toEqualTypeOf();
|
|
63
|
-
expect(gameAchievement.points).toBeDefined();
|
|
64
|
-
expectTypeOf(gameAchievement.points).toEqualTypeOf();
|
|
65
|
-
if ('TIERED' === gameAchievement.type) {
|
|
66
|
-
expect(gameAchievement.totalAmountRequired).toBeDefined();
|
|
67
|
-
expectTypeOf(gameAchievement.totalAmountRequired).toEqualTypeOf();
|
|
68
|
-
}
|
|
69
|
-
expect(gameAchievement.toString()).toBeDefined();
|
|
70
|
-
expectTypeOf(gameAchievement.toString()).toEqualTypeOf();
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
client.destroy();
|
|
74
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import Endpoint from '../Private/Endpoint';
|
|
2
|
-
import House from '../structures/House';
|
|
3
|
-
class getActiveHouses extends Endpoint {
|
|
4
|
-
client;
|
|
5
|
-
constructor(client) {
|
|
6
|
-
super(client);
|
|
7
|
-
this.client = client;
|
|
8
|
-
}
|
|
9
|
-
async execute(options) {
|
|
10
|
-
const res = await this.client.requests.request('/housing/active', options);
|
|
11
|
-
if (res.options.raw)
|
|
12
|
-
return res.data;
|
|
13
|
-
return res.data.map((b) => new House(b));
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
export default getActiveHouses;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import Client from '../Client';
|
|
2
|
-
import House from '../structures/House';
|
|
3
|
-
import { expect, expectTypeOf, test } from 'vitest';
|
|
4
|
-
test('getActiveHouses (raw)', async () => {
|
|
5
|
-
const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false, rateLimit: 'NONE' });
|
|
6
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
7
|
-
// @ts-expect-error
|
|
8
|
-
const data = await client.getActiveHouses({ raw: true });
|
|
9
|
-
expect(data).toBeDefined();
|
|
10
|
-
expectTypeOf(data).toEqualTypeOf();
|
|
11
|
-
client.destroy();
|
|
12
|
-
});
|
|
13
|
-
test('getActiveHouses', async () => {
|
|
14
|
-
const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false, rateLimit: 'NONE' });
|
|
15
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
16
|
-
// @ts-expect-error
|
|
17
|
-
const data = await client.getActiveHouses();
|
|
18
|
-
expect(data).toBeDefined();
|
|
19
|
-
expectTypeOf(data).toEqualTypeOf();
|
|
20
|
-
data.forEach((house) => {
|
|
21
|
-
expect(house).toBeDefined();
|
|
22
|
-
expect(house).toBeInstanceOf(House);
|
|
23
|
-
expectTypeOf(house).toEqualTypeOf();
|
|
24
|
-
expect(house.name).toBeDefined();
|
|
25
|
-
expectTypeOf(house.name).toEqualTypeOf();
|
|
26
|
-
expect(house.uuid).toBeDefined();
|
|
27
|
-
expectTypeOf(house.uuid).toEqualTypeOf();
|
|
28
|
-
expect(house.owner).toBeDefined();
|
|
29
|
-
expectTypeOf(house.owner).toEqualTypeOf();
|
|
30
|
-
expect(house.createdAtTimestamp).toBeDefined();
|
|
31
|
-
expectTypeOf(house.createdAtTimestamp).toEqualTypeOf();
|
|
32
|
-
expect(house.createdAt).toBeDefined();
|
|
33
|
-
expectTypeOf(house.createdAt).toEqualTypeOf();
|
|
34
|
-
expect(house.players).toBeDefined();
|
|
35
|
-
expectTypeOf(house.players).toEqualTypeOf();
|
|
36
|
-
expect(house.cookies).toBeDefined();
|
|
37
|
-
expectTypeOf(house.cookies).toEqualTypeOf();
|
|
38
|
-
expect(house.toString()).toBeDefined();
|
|
39
|
-
expectTypeOf(house.toString()).toEqualTypeOf();
|
|
40
|
-
expect(house.toString()).toBe(house.name);
|
|
41
|
-
});
|
|
42
|
-
client.destroy();
|
|
43
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import Booster from '../structures/Boosters/Booster';
|
|
2
|
-
import Endpoint from '../Private/Endpoint';
|
|
3
|
-
class getBoosters extends Endpoint {
|
|
4
|
-
client;
|
|
5
|
-
constructor(client) {
|
|
6
|
-
super(client);
|
|
7
|
-
this.client = client;
|
|
8
|
-
}
|
|
9
|
-
async execute(options) {
|
|
10
|
-
const res = await this.client.requests.request('/boosters', options);
|
|
11
|
-
if (res.options.raw)
|
|
12
|
-
return res.data;
|
|
13
|
-
return res.data.boosters.map((b) => new Booster(b)).reverse();
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
export default getBoosters;
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import Booster from '../structures/Boosters/Booster';
|
|
2
|
-
import Client from '../Client';
|
|
3
|
-
import Game from '../structures/Game';
|
|
4
|
-
import { expect, expectTypeOf, test } from 'vitest';
|
|
5
|
-
test('getBoosters (raw)', async () => {
|
|
6
|
-
const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false, rateLimit: 'NONE' });
|
|
7
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
8
|
-
// @ts-expect-error
|
|
9
|
-
const data = await client.getBoosters({ raw: true });
|
|
10
|
-
expect(data).toBeDefined();
|
|
11
|
-
expectTypeOf(data).toEqualTypeOf();
|
|
12
|
-
client.destroy();
|
|
13
|
-
});
|
|
14
|
-
test('getBoosters', async () => {
|
|
15
|
-
const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false, rateLimit: 'NONE' });
|
|
16
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
17
|
-
// @ts-expect-error
|
|
18
|
-
const data = await client.getBoosters();
|
|
19
|
-
expect(data).toBeDefined();
|
|
20
|
-
expectTypeOf(data).toEqualTypeOf();
|
|
21
|
-
data.forEach((booster) => {
|
|
22
|
-
expect(booster).toBeDefined();
|
|
23
|
-
expect(booster).toBeInstanceOf(Booster);
|
|
24
|
-
expectTypeOf(booster).toEqualTypeOf();
|
|
25
|
-
expect(booster.purchaser).toBeDefined();
|
|
26
|
-
expectTypeOf(booster.purchaser).toEqualTypeOf();
|
|
27
|
-
expect(booster.amount).toBeDefined();
|
|
28
|
-
expectTypeOf(booster.amount).toEqualTypeOf();
|
|
29
|
-
expect(booster.originalLength).toBeDefined();
|
|
30
|
-
expectTypeOf(booster.originalLength).toEqualTypeOf();
|
|
31
|
-
expect(booster.remaining).toBeDefined();
|
|
32
|
-
expectTypeOf(booster.remaining).toEqualTypeOf();
|
|
33
|
-
expect(booster.activatedTimestamp).toBeDefined();
|
|
34
|
-
expectTypeOf(booster.activatedTimestamp).toEqualTypeOf();
|
|
35
|
-
expect(booster.activated).toBeDefined();
|
|
36
|
-
expectTypeOf(booster.activated).toEqualTypeOf();
|
|
37
|
-
expect(booster.game).toBeDefined();
|
|
38
|
-
expectTypeOf(booster.game).toEqualTypeOf();
|
|
39
|
-
expect(booster.game).toBeDefined();
|
|
40
|
-
expectTypeOf(booster.game).toEqualTypeOf();
|
|
41
|
-
expect(booster.game.game).toBeDefined();
|
|
42
|
-
expectTypeOf(booster.game.game).toEqualTypeOf();
|
|
43
|
-
expect(booster.game.id).toBeDefined();
|
|
44
|
-
expectTypeOf(booster.game.id).toEqualTypeOf();
|
|
45
|
-
expect(booster.game.code).toBeDefined();
|
|
46
|
-
expectTypeOf(booster.game.code).toEqualTypeOf();
|
|
47
|
-
expect(booster.game.name).toBeDefined();
|
|
48
|
-
expectTypeOf(booster.game.name).toEqualTypeOf();
|
|
49
|
-
expect(booster.game.found).toBeDefined();
|
|
50
|
-
expectTypeOf(booster.game.found).toEqualTypeOf();
|
|
51
|
-
expect(booster.game.toString()).toBeDefined();
|
|
52
|
-
expect(booster.game.toString()).toBe(booster.game.name);
|
|
53
|
-
expectTypeOf(booster.game.toString()).toEqualTypeOf();
|
|
54
|
-
expect(Game.IDS).toBeDefined();
|
|
55
|
-
expectTypeOf(Game.IDS).toEqualTypeOf();
|
|
56
|
-
expect(Game.CODES).toBeDefined();
|
|
57
|
-
expectTypeOf(Game.CODES).toEqualTypeOf();
|
|
58
|
-
expect(Game.NAMES).toBeDefined();
|
|
59
|
-
expectTypeOf(Game.NAMES).toEqualTypeOf();
|
|
60
|
-
expect(booster.isActive).toBeDefined();
|
|
61
|
-
expectTypeOf(booster.isActive).toEqualTypeOf();
|
|
62
|
-
expect(booster.type).toBeDefined();
|
|
63
|
-
expectTypeOf(booster.type).toEqualTypeOf();
|
|
64
|
-
expect(booster.stackers).toBeDefined();
|
|
65
|
-
expectTypeOf(booster.stackers).toEqualTypeOf();
|
|
66
|
-
expect(booster.expired).toBeDefined();
|
|
67
|
-
expectTypeOf(booster.expired).toEqualTypeOf();
|
|
68
|
-
expect(booster.toString()).toBeDefined();
|
|
69
|
-
expectTypeOf(booster.toString()).toEqualTypeOf();
|
|
70
|
-
});
|
|
71
|
-
client.destroy();
|
|
72
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import Challenges from '../structures/Static/Challenges';
|
|
2
|
-
import Endpoint from '../Private/Endpoint';
|
|
3
|
-
class getChallenges extends Endpoint {
|
|
4
|
-
client;
|
|
5
|
-
constructor(client) {
|
|
6
|
-
super(client);
|
|
7
|
-
this.client = client;
|
|
8
|
-
}
|
|
9
|
-
async execute(options) {
|
|
10
|
-
const res = await this.client.requests.request('/resources/challenges', options);
|
|
11
|
-
if (res.options.raw)
|
|
12
|
-
return res.data;
|
|
13
|
-
return new Challenges(res.data);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
export default getChallenges;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import Challenges from '../structures/Static/Challenges';
|
|
2
|
-
import Client from '../Client';
|
|
3
|
-
import GameChallenges from '../structures/Static/GameChallenges';
|
|
4
|
-
import { expect, expectTypeOf, test } from 'vitest';
|
|
5
|
-
test('getChallenges (raw)', async () => {
|
|
6
|
-
const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false, rateLimit: 'NONE' });
|
|
7
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
8
|
-
// @ts-expect-error
|
|
9
|
-
const data = await client.getChallenges({ raw: true });
|
|
10
|
-
expect(data).toBeDefined();
|
|
11
|
-
expectTypeOf(data).toEqualTypeOf();
|
|
12
|
-
client.destroy();
|
|
13
|
-
});
|
|
14
|
-
test('getChallenges', async () => {
|
|
15
|
-
const client = new Client(process.env.HYPIXEL_KEY ?? '', { cache: false, checkForUpdates: false, rateLimit: 'NONE' });
|
|
16
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
17
|
-
// @ts-expect-error
|
|
18
|
-
const data = await client.getChallenges();
|
|
19
|
-
expect(data).toBeDefined();
|
|
20
|
-
expect(data).toBeInstanceOf(Challenges);
|
|
21
|
-
expectTypeOf(data).toEqualTypeOf();
|
|
22
|
-
expect(data.lastUpdatedTimestamp).toBeDefined();
|
|
23
|
-
expect(data.lastUpdatedTimestamp).toBeGreaterThan(0);
|
|
24
|
-
expectTypeOf(data.lastUpdatedTimestamp).toEqualTypeOf();
|
|
25
|
-
expect(data.lastUpdatedAt).toBeDefined();
|
|
26
|
-
expectTypeOf(data.lastUpdatedAt).toEqualTypeOf();
|
|
27
|
-
expect(data.challengesPerGame).toBeDefined();
|
|
28
|
-
expectTypeOf(data.challengesPerGame).toEqualTypeOf();
|
|
29
|
-
Object.keys(data.challengesPerGame).forEach((game) => {
|
|
30
|
-
expect(data.challengesPerGame[game]).toBeDefined();
|
|
31
|
-
expect(data.challengesPerGame[game]).toBeInstanceOf(GameChallenges);
|
|
32
|
-
expectTypeOf(data.challengesPerGame[game]).toEqualTypeOf();
|
|
33
|
-
expect(data.challengesPerGame[game].category).toBeDefined();
|
|
34
|
-
expect(data.challengesPerGame[game].category).toEqual(game);
|
|
35
|
-
expect(data.challengesPerGame[game].challenges).toBeDefined();
|
|
36
|
-
expectTypeOf(data.challengesPerGame[game].challenges).toEqualTypeOf();
|
|
37
|
-
data.challengesPerGame[game].challenges.forEach((challenge) => {
|
|
38
|
-
expect(challenge).toBeDefined();
|
|
39
|
-
expectTypeOf(challenge).toEqualTypeOf();
|
|
40
|
-
expect(challenge.id).toBeDefined();
|
|
41
|
-
expectTypeOf(challenge.id).toEqualTypeOf();
|
|
42
|
-
expect(challenge.name).toBeDefined();
|
|
43
|
-
expectTypeOf(challenge.name).toEqualTypeOf();
|
|
44
|
-
expect(challenge.reward).toBeDefined();
|
|
45
|
-
expectTypeOf(challenge.reward).toEqualTypeOf();
|
|
46
|
-
expect(challenge.rewardType).toBeDefined();
|
|
47
|
-
expectTypeOf(challenge.rewardType).toEqualTypeOf();
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
client.destroy();
|
|
51
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import Endpoint from '../Private/Endpoint';
|
|
2
|
-
import GameCounts from '../structures/GameCounts';
|
|
3
|
-
class getGameCounts extends Endpoint {
|
|
4
|
-
client;
|
|
5
|
-
constructor(client) {
|
|
6
|
-
super(client);
|
|
7
|
-
this.client = client;
|
|
8
|
-
}
|
|
9
|
-
async execute(options) {
|
|
10
|
-
const res = await this.client.requests.request('/counts', options);
|
|
11
|
-
if (res.options.raw)
|
|
12
|
-
return res.data;
|
|
13
|
-
return new GameCounts(res.data);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
export default getGameCounts;
|