-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add Skyblock Government API and related structures * feat(bingo) * fix tests * fix tests * fix tests * final fix tests * final final fix tests * feat(Quest, Guild & normal Achivements and Challengs) * styles(Prettier) * feat(types) * Update Skyblock Auctions * styles(prettier) * Remove Testing Code * fix(tests)
- Loading branch information
Showing
55 changed files
with
1,540 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,4 +45,5 @@ testing/ | |
.circleci/ | ||
changelog.md | ||
master.json | ||
.env | ||
.env | ||
.vscode/settings.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = async function () { | ||
const Achievements = require('../structures/Static/Achievements'); | ||
const res = await this._makeRequest('/resources/achievements'); | ||
if (res.raw) return res; | ||
return new Achievements(res); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = async function () { | ||
const Challenges = require('../structures/Static/Challenges'); | ||
const res = await this._makeRequest('/resources/challenges'); | ||
if (res.raw) return res; | ||
return new Challenges(res); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = async function () { | ||
const GuildAchievements = require('../structures/Static/GuildAchievements'); | ||
const res = await this._makeRequest('/resources/guilds/achievements'); | ||
if (res.raw) return res; | ||
return new GuildAchievements(res); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = async function () { | ||
const Quests = require('../structures/Static/Quests'); | ||
const res = await this._makeRequest('/resources/quests'); | ||
if (res.raw) return res; | ||
return new Quests(res); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,32 @@ | ||
module.exports = { | ||
getAPIStatus: require('./getAPIStatus'), | ||
getBoosters: require('./getBoosters'), | ||
getGameCounts: require('./getGameCounts'), | ||
getGuild: require('./getGuild'), | ||
getLeaderboards: require('./getLeaderboards'), | ||
getPlayer: require('./getPlayer'), | ||
getRecentGames: require('./getRecentGames'), | ||
getServerInfo: require('./getServerInfo'), | ||
getStatus: require('./getStatus'), | ||
getWatchdogStats: require('./getWatchdogStats'), | ||
getEndedSkyblockAuctions: require('./skyblock/getEndedSkyblockAuctions'), | ||
getSkyblockAuctions: require('./skyblock/getSkyblockAuctions'), | ||
getSkyblockAuctionsByPlayer: require('./skyblock/getSkyblockAuctionsByPlayer'), | ||
getSkyblockBazaar: require('./skyblock/getSkyblockBazaar'), | ||
getSkyblockMember: require('./skyblock/getSkyblockMember'), | ||
getSkyblockNews: require('./skyblock/getSkyblockNews'), | ||
getSkyblockProfiles: require('./skyblock/getSkyblockProfiles'), | ||
getSkyblockMuseum: require('./skyblock/getSkyblockMuseum') | ||
getAchievements: require('./getAchievements.js'), | ||
getAPIStatus: require('./getAPIStatus.js'), | ||
getBoosters: require('./getBoosters.js'), | ||
getChallenges: require('./getChallenges.js'), | ||
getGameCounts: require('./getGameCounts.js'), | ||
getGuild: require('./getGuild.js'), | ||
getGuildAchievements: require('./getGuildAchievements.js'), | ||
getLeaderboards: require('./getLeaderboards.js'), | ||
getPlayer: require('./getPlayer.js'), | ||
getQuests: require('./getQuests.js'), | ||
getRecentGames: require('./getRecentGames.js'), | ||
getServerInfo: require('./getServerInfo.js'), | ||
getStatus: require('./getStatus.js'), | ||
getWatchdogStats: require('./getWatchdogStats.js'), | ||
|
||
skyblock: { | ||
getAuction: require('./skyblock/getAuction.js'), | ||
getAuctions: require('./skyblock/getAuctions.js'), | ||
getAuctionsByPlayer: require('./skyblock/getAuctionsByPlayer.js'), | ||
getBazaar: require('./skyblock/getBazaar.js'), | ||
getBingo: require('./skyblock/getBingo.js'), | ||
getBingoByPlayer: require('./skyblock/getBingoByPlayer.js'), | ||
getEndedAuctions: require('./skyblock/getEndedAuctions.js'), | ||
getFireSales: require('./skyblock/getFireSales.js'), | ||
getGovernment: require('./skyblock/getGovernment.js'), | ||
getMember: require('./skyblock/getMember.js'), | ||
getMuseum: require('./skyblock/getMuseum.js'), | ||
getNews: require('./skyblock/getNews.js'), | ||
getProfiles: require('./skyblock/getProfiles.js') | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const Errors = require('../../Errors'); | ||
const toUuid = require('../../utils/toUuid'); | ||
module.exports = async function (type, query, includeItemBytes = false) { | ||
if (!query) throw new Error(Errors.NO_NICKNAME_UUID); | ||
const Auction = require('../../structures/SkyBlock/Auctions/Auction'); | ||
let filter = ''; | ||
if (type === 'PROFILE') { | ||
filter = 'profile'; | ||
} else if (type === 'PLAYER') { | ||
query = await toUuid(query); | ||
filter = 'player'; | ||
} else if (type === 'AUCTION') { | ||
filter = 'uuid'; | ||
} else throw new Error(Errors.BAD_AUCTION_FILTER); | ||
const res = await this._makeRequest(`/skyblock/auction?${filter}=${query}`); | ||
if (res.raw) return res; | ||
|
||
return res.auctions.length ? res.auctions.map((a) => new Auction(a, includeItemBytes)) : []; | ||
}; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = async function () { | ||
const BingoData = require('../../structures/SkyBlock/Static/BingoData'); | ||
|
||
const res = await this._makeRequest('/resources/skyblock/bingo'); | ||
if (res.raw) return res; | ||
|
||
return new BingoData(res); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const getBingo = require('./getBingo'); | ||
const toUuid = require('../../utils/toUuid'); | ||
const Errors = require('../../Errors'); | ||
module.exports = async function (query, { fetchBingoData = false }) { | ||
if (!query) throw new Error(Errors.NO_NICKNAME_UUID); | ||
const PlayerBingo = require('../../structures/SkyBlock/PlayerBingo'); | ||
query = await toUuid(query); | ||
const res = await this._makeRequest(`/skyblock/uuid?player=${query}`); | ||
if (res.raw) return res; | ||
let bingoData = null; | ||
if (fetchBingoData) bingoData = await getBingo.call(this); | ||
|
||
return new PlayerBingo(data, bingoData); | ||
}; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = async function () { | ||
const FireSale = require('../../structures/SkyBlock/Static/FireSale'); | ||
const res = await this._makeRequest('/skyblock/firesales'); | ||
if (res.raw) return res; | ||
|
||
return res.sales.length ? res.sales.map((a) => new FireSale(a)) : []; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = async function () { | ||
const GovernmentData = require('../../structures/SkyBlock/Static/Government.js'); | ||
|
||
const res = await this._makeRequest('/resources/skyblock/election'); | ||
if (res.raw) return res; | ||
|
||
return new GovernmentData(res); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.