Compare commits

..

5 Commits

Author SHA1 Message Date
14c12c2cdb Add WoW Connected Realm APIs and update Examples 2025-03-21 15:34:12 -05:00
a0fce7bac8 Move generics to their own file 2025-03-21 15:23:11 -05:00
8a99c6c184 Update example filename 2025-03-21 09:23:26 -05:00
f773677bcf Merge branch 'main' of github.com:Milhound/battlenetapi 2025-03-20 23:50:50 -05:00
Daniel Milholland
47f4e2f783 Initial commit 2025-03-20 23:43:48 -05:00

View File

@@ -15,7 +15,8 @@ func GetLeaderboard(params battlenet.BattleNetAPIParams, bracket string) {
var pvpIndex gamedata.PvpSeasonIndexAPI var pvpIndex gamedata.PvpSeasonIndexAPI
json.Unmarshal(response, &pvpIndex) json.Unmarshal(response, &pvpIndex)
// Get the leaderboards for the current PVP season and desired Bracket // Get the leaderboards for the current PVP season and Bracket
params.UrlOrEndpoint = fmt.Sprintf(gamedata.PvpLeaderboardEndpoint, pvpIndex.CurrentSeason.ID, bracket) params.UrlOrEndpoint = fmt.Sprintf(gamedata.PvpLeaderboardEndpoint, pvpIndex.CurrentSeason.ID, bracket)
response = battlenet.BattleNetAPI(params, nil) response = battlenet.BattleNetAPI(params, nil)
file, err := os.Create(fmt.Sprintf("pvp_season_%d_leaderboard-bracket_%s.json", pvpIndex.CurrentSeason.ID, bracket)) file, err := os.Create(fmt.Sprintf("pvp_season_%d_leaderboard-bracket_%s.json", pvpIndex.CurrentSeason.ID, bracket))