Skip to content

Commit cb8d320

Browse files
author
Kyagara
committed
update specs
1 parent 32a2b01 commit cb8d320

File tree

20 files changed

+125
-221
lines changed

20 files changed

+125
-221
lines changed

api/api.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ package api
99
// //
1010
///////////////////////////////////////////////
1111

12-
// Spec version = 996d171a2b79e9bb85c549f47b07c6ef2721fc8a
12+
// Spec version = 22eaf104ffa026981e6ecbf9bd5d60054f12ddf9
1313

1414
import (
1515
"errors"
@@ -86,6 +86,7 @@ func StatusCodeToError(statusCode int) error {
8686
var (
8787
// A slice containing all endpoints from the Riot API.
8888
AllEndpoints = [][]string{
89+
{"GET", "/riot/account/v1/region/by-game/{game}/by-puuid/{puuid}", "account-v1.getActiveRegion"},
8990
{"GET", "/riot/account/v1/active-shards/by-game/{game}/by-puuid/{puuid}", "account-v1.getActiveShard"},
9091
{"GET", "/riot/account/v1/accounts/me", "account-v1.getByAccessToken"},
9192
{"GET", "/riot/account/v1/accounts/by-puuid/{puuid}", "account-v1.getByPuuid"},
@@ -106,7 +107,6 @@ var (
106107
{"GET", "/lol/league/v4/leagues/{leagueId}", "league-v4.getLeagueById"},
107108
{"GET", "/lol/league/v4/entries/{queue}/{tier}/{division}", "league-v4.getLeagueEntries"},
108109
{"GET", "/lol/league/v4/entries/by-puuid/{encryptedPUUID}", "league-v4.getLeagueEntriesByPUUID"},
109-
{"GET", "/lol/league/v4/entries/by-summoner/{encryptedSummonerId}", "league-v4.getLeagueEntriesForSummoner"},
110110
{"GET", "/lol/league/v4/masterleagues/by-queue/{queue}", "league-v4.getMasterLeague"},
111111
{"GET", "/lol/challenges/v1/challenges/config", "lol-challenges-v1.getAllChallengeConfigs"},
112112
{"GET", "/lol/challenges/v1/challenges/percentiles", "lol-challenges-v1.getAllChallengePercentiles"},
@@ -133,24 +133,20 @@ var (
133133
{"GET", "/lol/spectator/v5/active-games/by-summoner/{encryptedPUUID}", "spectator-v5.getCurrentGameInfoByPuuid"},
134134
{"GET", "/lol/spectator/v5/featured-games", "spectator-v5.getFeaturedGames"},
135135
{"GET", "/lol/summoner/v4/summoners/me", "summoner-v4.getByAccessToken"},
136-
{"GET", "/lol/summoner/v4/summoners/by-account/{encryptedAccountId}", "summoner-v4.getByAccountId"},
137136
{"GET", "/lol/summoner/v4/summoners/by-puuid/{encryptedPUUID}", "summoner-v4.getByPUUID"},
138137
{"GET", "/fulfillment/v1/summoners/by-puuid/{rsoPUUID}", "summoner-v4.getByRSOPUUID"},
139-
{"GET", "/lol/summoner/v4/summoners/{encryptedSummonerId}", "summoner-v4.getBySummonerId"},
140138
{"GET", "/tft/league/v1/challenger", "tft-league-v1.getChallengerLeague"},
141139
{"GET", "/tft/league/v1/grandmaster", "tft-league-v1.getGrandmasterLeague"},
142140
{"GET", "/tft/league/v1/leagues/{leagueId}", "tft-league-v1.getLeagueById"},
143141
{"GET", "/tft/league/v1/entries/{tier}/{division}", "tft-league-v1.getLeagueEntries"},
144-
{"GET", "/tft/league/v1/entries/by-summoner/{summonerId}", "tft-league-v1.getLeagueEntriesForSummoner"},
142+
{"GET", "/tft/league/v1/by-puuid/{puuid}", "tft-league-v1.getLeagueEntriesByPUUID"},
145143
{"GET", "/tft/league/v1/master", "tft-league-v1.getMasterLeague"},
146144
{"GET", "/tft/league/v1/rated-ladders/{queue}/top", "tft-league-v1.getTopRatedLadder"},
147145
{"GET", "/tft/match/v1/matches/{matchId}", "tft-match-v1.getMatch"},
148146
{"GET", "/tft/match/v1/matches/by-puuid/{puuid}/ids", "tft-match-v1.getMatchIdsByPUUID"},
149147
{"GET", "/tft/status/v1/platform-data", "tft-status-v1.getPlatformData"},
150148
{"GET", "/tft/summoner/v1/summoners/me", "tft-summoner-v1.getByAccessToken"},
151-
{"GET", "/tft/summoner/v1/summoners/by-account/{encryptedAccountId}", "tft-summoner-v1.getByAccountId"},
152149
{"GET", "/tft/summoner/v1/summoners/by-puuid/{encryptedPUUID}", "tft-summoner-v1.getByPUUID"},
153-
{"GET", "/tft/summoner/v1/summoners/{encryptedSummonerId}", "tft-summoner-v1.getBySummonerId"},
154150
{"POST", "/lol/tournament-stub/v5/codes", "tournament-stub-v5.createTournamentCode"},
155151
{"GET", "/lol/tournament-stub/v5/lobby-events/by-code/{tournamentCode}", "tournament-stub-v5.getLobbyEventsByCode"},
156152
{"GET", "/lol/tournament-stub/v5/codes/{tournamentCode}", "tournament-stub-v5.getTournamentCode"},

api/constants.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ package api
88
// //
99
///////////////////////////////////////////////
1010

11-
// Spec version = 996d171a2b79e9bb85c549f47b07c6ef2721fc8a
11+
// Spec version = 22eaf104ffa026981e6ecbf9bd5d60054f12ddf9
1212

1313
// Regional routes, used in tournament services, Legends of Runeterra, and some other endpoints.
1414
type RegionalRoute string

clients/lol/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ package lol
2424
// //
2525
///////////////////////////////////////////////
2626

27-
// Spec version = 996d171a2b79e9bb85c549f47b07c6ef2721fc8a
27+
// Spec version = 22eaf104ffa026981e6ecbf9bd5d60054f12ddf9
2828

2929
import "github.com/Kyagara/equinox/v2/internal"
3030

clients/lol/constants.go

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import "strconv"
1010
// //
1111
///////////////////////////////////////////////
1212

13-
// Spec version = 996d171a2b79e9bb85c549f47b07c6ef2721fc8a
13+
// Spec version = 22eaf104ffa026981e6ecbf9bd5d60054f12ddf9
1414

1515
// Platform routes for League of Legends.
1616
type PlatformRoute string
@@ -326,6 +326,8 @@ const (
326326
ASCENSION_GAMEMODE GameMode = "ASCENSION"
327327
// Blood Hunt Assassin games
328328
ASSASSINATE_GAMEMODE GameMode = "ASSASSINATE"
329+
// Brawl
330+
BRAWL_GAMEMODE GameMode = "BRAWL"
329331
// 2v2v2v2 Arena
330332
CHERRY_GAMEMODE GameMode = "CHERRY"
331333
// Classic Summoner's Rift and Twisted Treeline games
@@ -384,6 +386,8 @@ func (gameMode GameMode) String() string {
384386
return "ASCENSION"
385387
case ASSASSINATE_GAMEMODE:
386388
return "ASSASSINATE"
389+
case BRAWL_GAMEMODE:
390+
return "BRAWL"
387391
case CHERRY_GAMEMODE:
388392
return "CHERRY"
389393
case CLASSIC_GAMEMODE:
@@ -487,6 +491,10 @@ const (
487491
//
488492
// Map for Swarm (`STRAWBERRY`). Team up with a friend or venture solo in this horde survival mode.
489493
SWARM_MAP Map = 33
494+
// The Bandlewood
495+
//
496+
// Map for Brawl (`BRAWL`). Work together with your team to escort minions into the enemy portal. No roles, no lanes, no pressure. Just a five-on-five brawl.
497+
THE_BANDLEWOOD_MAP Map = 35
490498
// The Crystal Scar
491499
//
492500
// Dominion map
@@ -535,6 +543,8 @@ func (gameMap Map) String() string {
535543
return "1"
536544
case SWARM_MAP:
537545
return "33"
546+
case THE_BANDLEWOOD_MAP:
547+
return "35"
538548
case THE_CRYSTAL_SCAR_MAP:
539549
return "8"
540550
case THE_PROVING_GROUNDS_MAP:
@@ -770,6 +780,8 @@ const (
770780
SWARM_SOLO_STRAWBERRY_GAMES_QUEUE Queue = 1810
771781
// Swarm trio (`STRAWBERRY` games) games on Swarm
772782
SWARM_TRIO_STRAWBERRY_GAMES_QUEUE Queue = 1830
783+
// Games on The Bandlewood
784+
THE_BANDLEWOOD_QUEUE Queue = 2300
773785
// # Deprecated
774786
//
775787
// 3v3 Blind Pick games on Twisted Treeline
@@ -974,6 +986,8 @@ func (queue Queue) String() string {
974986
return "1810"
975987
case SWARM_TRIO_STRAWBERRY_GAMES_QUEUE:
976988
return "1830"
989+
case THE_BANDLEWOOD_QUEUE:
990+
return "2300"
977991
case TWISTED_TREELINE_3V3_BLIND_PICK_QUEUE:
978992
return "460"
979993
case TWISTED_TREELINE_3V3_NORMAL_QUEUE:

clients/lol/endpoints.go

Lines changed: 1 addition & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ package lol
88
// //
99
///////////////////////////////////////////////
1010

11-
// Spec version = 996d171a2b79e9bb85c549f47b07c6ef2721fc8a
11+
// Spec version = 22eaf104ffa026981e6ecbf9bd5d60054f12ddf9
1212

1313
import (
1414
"context"
@@ -703,32 +703,6 @@ func (endpoint *LeagueV4) MasterByQueue(ctx context.Context, route PlatformRoute
703703
return &data, nil
704704
}
705705

706-
// Get league entries in all queues for a given summoner ID.
707-
//
708-
// # Parameters
709-
// - route: Route to query.
710-
// - encryptedSummonerId
711-
//
712-
// # Riot API Reference
713-
//
714-
// [league-v4.getLeagueEntriesForSummoner]
715-
//
716-
// [league-v4.getLeagueEntriesForSummoner]: https://developer.riotgames.com/api-methods/#league-v4/GET_getLeagueEntriesForSummoner
717-
func (endpoint *LeagueV4) SummonerEntries(ctx context.Context, route PlatformRoute, encryptedSummonerId string) ([]LeagueEntryV4DTO, error) {
718-
logger := endpoint.internal.Logger("LOL_LeagueV4_SummonerEntries")
719-
urlComponents := []string{"https://", route.String(), api.RIOT_API_BASE_URL_FORMAT, "/lol/league/v4/entries/by-summoner/", encryptedSummonerId}
720-
request, err := endpoint.internal.Request(ctx, logger, http.MethodGet, urlComponents, "league-v4.getLeagueEntriesForSummoner", nil)
721-
if err != nil {
722-
return nil, err
723-
}
724-
var data []LeagueEntryV4DTO
725-
err = endpoint.internal.Execute(ctx, request, &data)
726-
if err != nil {
727-
return nil, err
728-
}
729-
return data, nil
730-
}
731-
732706
// # Riot API Reference
733707
//
734708
// [match-v5]
@@ -1102,32 +1076,6 @@ func (endpoint *SummonerV4) ByAccessToken(ctx context.Context, route PlatformRou
11021076
return &data, nil
11031077
}
11041078

1105-
// Get a summoner by account ID.
1106-
//
1107-
// # Parameters
1108-
// - route: Route to query.
1109-
// - encryptedAccountId
1110-
//
1111-
// # Riot API Reference
1112-
//
1113-
// [summoner-v4.getByAccountId]
1114-
//
1115-
// [summoner-v4.getByAccountId]: https://developer.riotgames.com/api-methods/#summoner-v4/GET_getByAccountId
1116-
func (endpoint *SummonerV4) ByAccountID(ctx context.Context, route PlatformRoute, encryptedAccountId string) (*SummonerV4DTO, error) {
1117-
logger := endpoint.internal.Logger("LOL_SummonerV4_ByAccountID")
1118-
urlComponents := []string{"https://", route.String(), api.RIOT_API_BASE_URL_FORMAT, "/lol/summoner/v4/summoners/by-account/", encryptedAccountId}
1119-
request, err := endpoint.internal.Request(ctx, logger, http.MethodGet, urlComponents, "summoner-v4.getByAccountId", nil)
1120-
if err != nil {
1121-
return nil, err
1122-
}
1123-
var data SummonerV4DTO
1124-
err = endpoint.internal.Execute(ctx, request, &data)
1125-
if err != nil {
1126-
return nil, err
1127-
}
1128-
return &data, nil
1129-
}
1130-
11311079
// Get a summoner by PUUID.
11321080
//
11331081
// # Parameters
@@ -1180,32 +1128,6 @@ func (endpoint *SummonerV4) ByRSOPUUID(ctx context.Context, route PlatformRoute,
11801128
return &data, nil
11811129
}
11821130

1183-
// Get a summoner by summoner ID.
1184-
//
1185-
// # Parameters
1186-
// - route: Route to query.
1187-
// - encryptedSummonerId: Summoner ID
1188-
//
1189-
// # Riot API Reference
1190-
//
1191-
// [summoner-v4.getBySummonerId]
1192-
//
1193-
// [summoner-v4.getBySummonerId]: https://developer.riotgames.com/api-methods/#summoner-v4/GET_getBySummonerId
1194-
func (endpoint *SummonerV4) BySummonerID(ctx context.Context, route PlatformRoute, encryptedSummonerId string) (*SummonerV4DTO, error) {
1195-
logger := endpoint.internal.Logger("LOL_SummonerV4_BySummonerID")
1196-
urlComponents := []string{"https://", route.String(), api.RIOT_API_BASE_URL_FORMAT, "/lol/summoner/v4/summoners/", encryptedSummonerId}
1197-
request, err := endpoint.internal.Request(ctx, logger, http.MethodGet, urlComponents, "summoner-v4.getBySummonerId", nil)
1198-
if err != nil {
1199-
return nil, err
1200-
}
1201-
var data SummonerV4DTO
1202-
err = endpoint.internal.Execute(ctx, request, &data)
1203-
if err != nil {
1204-
return nil, err
1205-
}
1206-
return &data, nil
1207-
}
1208-
12091131
// # Riot API Reference
12101132
//
12111133
// [tournament-stub-v5]

clients/lol/models.go

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ package lol
88
// //
99
///////////////////////////////////////////////
1010

11-
// Spec version = 996d171a2b79e9bb85c549f47b07c6ef2721fc8a
11+
// Spec version = 22eaf104ffa026981e6ecbf9bd5d60054f12ddf9
1212

1313
// lol-challenges-v1.ApexPlayerInfoDto
1414
type ChallengesApexPlayerInfoV1DTO struct {
@@ -140,9 +140,8 @@ type ClashPlayerV1DTO struct {
140140
// (Legal values: UNSELECTED, FILL, TOP, JUNGLE, MIDDLE, BOTTOM, UTILITY)
141141
Position string `json:"position,omitempty"`
142142
// (Legal values: CAPTAIN, MEMBER)
143-
Role string `json:"role,omitempty"`
144-
SummonerID string `json:"summonerId,omitempty"`
145-
TeamID string `json:"teamId,omitempty"`
143+
Role string `json:"role,omitempty"`
144+
TeamID string `json:"teamId,omitempty"`
146145
}
147146

148147
// clash-v1.TeamDto
@@ -184,9 +183,7 @@ type LeagueEntryV4DTO struct {
184183
PUUID string `json:"puuid,omitempty"`
185184
QueueType QueueType `json:"queueType,omitempty"`
186185
// The player's division within a tier.
187-
Rank Division `json:"rank,omitempty"`
188-
// Player's encrypted summonerId.
189-
SummonerID string `json:"summonerId,omitempty"`
186+
Rank Division `json:"rank,omitempty"`
190187
Tier Tier `json:"tier,omitempty"`
191188
MiniSeries LeagueMiniSeriesV4DTO `json:"miniSeries"`
192189
LeaguePoints int `json:"leaguePoints,omitempty"`
@@ -234,10 +231,8 @@ type LeagueExpMiniSeriesV4DTO struct {
234231
// league-v4.LeagueItemDTO
235232
type LeagueItemV4DTO struct {
236233
// Player's encrypted puuid.
237-
PUUID string `json:"puuid,omitempty"`
238-
Rank Division `json:"rank,omitempty"`
239-
// Player's encrypted summonerId.
240-
SummonerID string `json:"summonerId,omitempty"`
234+
PUUID string `json:"puuid,omitempty"`
235+
Rank Division `json:"rank,omitempty"`
241236
MiniSeries LeagueMiniSeriesV4DTO `json:"miniSeries"`
242237
LeaguePoints int `json:"leaguePoints,omitempty"`
243238
// Losing team on Summoners Rift.
@@ -687,7 +682,8 @@ type MatchParticipantV5DTO struct {
687682
ChampExperience int `json:"champExperience,omitempty"`
688683
ChampLevel int `json:"champLevel,omitempty"`
689684
// Prior to patch 11.4, on Feb 18th, 2021, this field returned invalid championIds. We recommend determining the champion based on the championName field for matches played prior to patch 11.4.
690-
ChampionID int `json:"championId,omitempty"`
685+
ChampionID int `json:"championId,omitempty"`
686+
ChampionSkinID int `json:"championSkinId,omitempty"`
691687
// This field is currently only utilized for Kayn's transformations. (Legal values: 0 - None, 1 - Slayer, 2 - Assassin)
692688
ChampionTransform int `json:"championTransform,omitempty"`
693689
// Blue generic ping (ALT+click)
@@ -941,8 +937,6 @@ type SpectatorCurrentGameParticipantV5DTO struct {
941937
// The encrypted puuid of this participant
942938
PUUID string `json:"puuid,omitempty"`
943939
RiotID string `json:"riotId,omitempty"`
944-
// The encrypted summoner ID of this participant
945-
SummonerID string `json:"summonerId,omitempty"`
946940
// List of Game Customizations
947941
GameCustomizationObjects []SpectatorGameCustomizationObjectV5DTO `json:"gameCustomizationObjects,omitempty"`
948942
// Perks/Runes Reforged Information
@@ -1016,8 +1010,6 @@ type SpectatorParticipantV5DTO struct {
10161010
// Encrypted puuid of this participant
10171011
PUUID string `json:"puuid,omitempty"`
10181012
RiotID string `json:"riotId,omitempty"`
1019-
// Encrypted summoner ID of this participant
1020-
SummonerID string `json:"summonerId,omitempty"`
10211013
// The ID of the champion played by this participant
10221014
ChampionID int `json:"championId,omitempty"`
10231015
// The ID of the profile icon used by this participant
@@ -1087,10 +1079,6 @@ type StatusV4DTO struct {
10871079

10881080
// summoner-v4.SummonerDTO
10891081
type SummonerV4DTO struct {
1090-
// Encrypted account ID. Max length 56 characters.
1091-
AccountID string `json:"accountId,omitempty"`
1092-
// Encrypted summoner ID. Max length 63 characters.
1093-
ID string `json:"id,omitempty"`
10941082
// Encrypted PUUID. Exact length of 78 characters.
10951083
PUUID string `json:"puuid,omitempty"`
10961084
// ID of the summoner icon associated with the summoner.
@@ -1190,7 +1178,8 @@ type TournamentGamesV5DTO struct {
11901178
WinningTeam []TournamentTeamV5DTO `json:"winningTeam,omitempty"`
11911179
GameID int `json:"gameId,omitempty"`
11921180
// Game Map ID
1193-
GameMap int `json:"gameMap,omitempty"`
1181+
GameMap int `json:"gameMap,omitempty"`
1182+
StartTime int `json:"startTime,omitempty"`
11941183
}
11951184

11961185
// tournament-v5.LobbyEventV5DTO
@@ -1268,8 +1257,6 @@ type TournamentStubCodeV5DTO struct {
12681257
//
12691258
// (Legal values: BR, EUNE, EUW, JP, LAN, LAS, NA, OCE, PBE, RU, TR, KR)
12701259
Region TournamentRegion `json:"region,omitempty"`
1271-
// The spectator mode for the tournament code game.
1272-
Spectators string `json:"spectators,omitempty"`
12731260
// The puuids of the participants (Encrypted)
12741261
Participants []string `json:"participants,omitempty"`
12751262
// The tournament code's ID.

clients/lor/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ package lor
1616
// //
1717
///////////////////////////////////////////////
1818

19-
// Spec version = 996d171a2b79e9bb85c549f47b07c6ef2721fc8a
19+
// Spec version = 22eaf104ffa026981e6ecbf9bd5d60054f12ddf9
2020

2121
import "github.com/Kyagara/equinox/v2/internal"
2222

clients/lor/endpoints.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ package lor
88
// //
99
///////////////////////////////////////////////
1010

11-
// Spec version = 996d171a2b79e9bb85c549f47b07c6ef2721fc8a
11+
// Spec version = 22eaf104ffa026981e6ecbf9bd5d60054f12ddf9
1212

1313
import (
1414
"context"

clients/lor/models.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ package lor
88
// //
99
///////////////////////////////////////////////
1010

11-
// Spec version = 996d171a2b79e9bb85c549f47b07c6ef2721fc8a
11+
// Spec version = 22eaf104ffa026981e6ecbf9bd5d60054f12ddf9
1212

1313
// lor-deck-v1.NewDeckDto
1414
type DeckNewDeckV1DTO struct {

clients/riot/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ package riot
1212
// //
1313
///////////////////////////////////////////////
1414

15-
// Spec version = 996d171a2b79e9bb85c549f47b07c6ef2721fc8a
15+
// Spec version = 22eaf104ffa026981e6ecbf9bd5d60054f12ddf9
1616

1717
import "github.com/Kyagara/equinox/v2/internal"
1818

0 commit comments

Comments
 (0)