riotskillissue 0.1.0__py3-none-any.whl
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.
- riotskillissue/__init__.py +5 -0
- riotskillissue/api/__init__.py +0 -0
- riotskillissue/api/client_mixin.py +131 -0
- riotskillissue/api/endpoints/account.py +188 -0
- riotskillissue/api/endpoints/champion-mastery.py +143 -0
- riotskillissue/api/endpoints/champion.py +40 -0
- riotskillissue/api/endpoints/champion_mastery.py +154 -0
- riotskillissue/api/endpoints/clash.py +176 -0
- riotskillissue/api/endpoints/league-exp.py +54 -0
- riotskillissue/api/endpoints/league.py +226 -0
- riotskillissue/api/endpoints/league_exp.py +56 -0
- riotskillissue/api/endpoints/lol-challenges.py +197 -0
- riotskillissue/api/endpoints/lol-rso-match.py +124 -0
- riotskillissue/api/endpoints/lol-status.py +38 -0
- riotskillissue/api/endpoints/lol_challenges.py +214 -0
- riotskillissue/api/endpoints/lol_rso_match.py +132 -0
- riotskillissue/api/endpoints/lol_status.py +40 -0
- riotskillissue/api/endpoints/lor-deck.py +65 -0
- riotskillissue/api/endpoints/lor-inventory.py +38 -0
- riotskillissue/api/endpoints/lor-match.py +73 -0
- riotskillissue/api/endpoints/lor-ranked.py +38 -0
- riotskillissue/api/endpoints/lor-status.py +38 -0
- riotskillissue/api/endpoints/lor_deck.py +70 -0
- riotskillissue/api/endpoints/lor_inventory.py +40 -0
- riotskillissue/api/endpoints/lor_match.py +78 -0
- riotskillissue/api/endpoints/lor_ranked.py +40 -0
- riotskillissue/api/endpoints/lor_status.py +40 -0
- riotskillissue/api/endpoints/match.py +170 -0
- riotskillissue/api/endpoints/riftbound-content.py +42 -0
- riotskillissue/api/endpoints/riftbound_content.py +44 -0
- riotskillissue/api/endpoints/spectator-tft.py +42 -0
- riotskillissue/api/endpoints/spectator.py +44 -0
- riotskillissue/api/endpoints/spectator_tft.py +44 -0
- riotskillissue/api/endpoints/summoner.py +74 -0
- riotskillissue/api/endpoints/tft-league.py +240 -0
- riotskillissue/api/endpoints/tft-match.py +89 -0
- riotskillissue/api/endpoints/tft-status.py +38 -0
- riotskillissue/api/endpoints/tft-summoner.py +69 -0
- riotskillissue/api/endpoints/tft_league.py +260 -0
- riotskillissue/api/endpoints/tft_match.py +94 -0
- riotskillissue/api/endpoints/tft_status.py +40 -0
- riotskillissue/api/endpoints/tft_summoner.py +74 -0
- riotskillissue/api/endpoints/tournament-stub.py +162 -0
- riotskillissue/api/endpoints/tournament.py +243 -0
- riotskillissue/api/endpoints/tournament_stub.py +176 -0
- riotskillissue/api/endpoints/val-console-match.py +108 -0
- riotskillissue/api/endpoints/val-console-ranked.py +54 -0
- riotskillissue/api/endpoints/val-content.py +42 -0
- riotskillissue/api/endpoints/val-match.py +104 -0
- riotskillissue/api/endpoints/val-ranked.py +50 -0
- riotskillissue/api/endpoints/val-status.py +38 -0
- riotskillissue/api/endpoints/val_console_match.py +116 -0
- riotskillissue/api/endpoints/val_console_ranked.py +56 -0
- riotskillissue/api/endpoints/val_content.py +44 -0
- riotskillissue/api/endpoints/val_match.py +112 -0
- riotskillissue/api/endpoints/val_ranked.py +52 -0
- riotskillissue/api/endpoints/val_status.py +40 -0
- riotskillissue/api/models.py +4295 -0
- riotskillissue/auth.py +76 -0
- riotskillissue/cli.py +84 -0
- riotskillissue/core/cache.py +60 -0
- riotskillissue/core/client.py +47 -0
- riotskillissue/core/config.py +19 -0
- riotskillissue/core/http.py +144 -0
- riotskillissue/core/pagination.py +63 -0
- riotskillissue/core/ratelimit.py +185 -0
- riotskillissue/core/types.py +57 -0
- riotskillissue/core/utils.py +25 -0
- riotskillissue/static.py +71 -0
- riotskillissue/testing.py +46 -0
- riotskillissue-0.1.0.dist-info/METADATA +29 -0
- riotskillissue-0.1.0.dist-info/RECORD +75 -0
- riotskillissue-0.1.0.dist-info/WHEEL +4 -0
- riotskillissue-0.1.0.dist-info/entry_points.txt +2 -0
- riotskillissue-0.1.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
# Generated Code. Do not edit.
|
|
2
|
+
from typing import Optional, List, Dict, Any
|
|
3
|
+
from riotskillissue.core.http import HttpClient
|
|
4
|
+
from riotskillissue.api.models import *
|
|
5
|
+
|
|
6
|
+
class Tft_leagueApi:
|
|
7
|
+
def __init__(self, http: HttpClient):
|
|
8
|
+
self.http = http
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
async def get_league_entries_by_puuid(
|
|
12
|
+
self,
|
|
13
|
+
region: str,
|
|
14
|
+
|
|
15
|
+
puuid: str,
|
|
16
|
+
|
|
17
|
+
) -> List[tft_league_v1_LeagueEntryDTO]:
|
|
18
|
+
"""
|
|
19
|
+
Get league entries in all queues for a given puuid
|
|
20
|
+
"""
|
|
21
|
+
path = "/tft/league/v1/by-puuid/{puuid}"
|
|
22
|
+
# Replace path params
|
|
23
|
+
|
|
24
|
+
path = path.replace("{" + "puuid" + "}", str(puuid))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
# Query params
|
|
28
|
+
params = {
|
|
29
|
+
|
|
30
|
+
}
|
|
31
|
+
# Filter None
|
|
32
|
+
params = {k: v for k, v in params.items() if v is not None}
|
|
33
|
+
|
|
34
|
+
response = await self.http.request(
|
|
35
|
+
method="GET",
|
|
36
|
+
url=path,
|
|
37
|
+
region_or_platform=region,
|
|
38
|
+
params=params
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
from pydantic import TypeAdapter
|
|
42
|
+
return TypeAdapter(List[tft_league_v1_LeagueEntryDTO]).validate_python(response.json())
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
async def get_challenger_league(
|
|
46
|
+
self,
|
|
47
|
+
region: str,
|
|
48
|
+
|
|
49
|
+
queue: str = None,
|
|
50
|
+
|
|
51
|
+
) -> tft_league_v1_LeagueListDTO:
|
|
52
|
+
"""
|
|
53
|
+
Get the challenger league.
|
|
54
|
+
"""
|
|
55
|
+
path = "/tft/league/v1/challenger"
|
|
56
|
+
# Replace path params
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
# Query params
|
|
60
|
+
params = {
|
|
61
|
+
|
|
62
|
+
"queue": queue,
|
|
63
|
+
|
|
64
|
+
}
|
|
65
|
+
# Filter None
|
|
66
|
+
params = {k: v for k, v in params.items() if v is not None}
|
|
67
|
+
|
|
68
|
+
response = await self.http.request(
|
|
69
|
+
method="GET",
|
|
70
|
+
url=path,
|
|
71
|
+
region_or_platform=region,
|
|
72
|
+
params=params
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
from pydantic import TypeAdapter
|
|
76
|
+
return TypeAdapter(tft_league_v1_LeagueListDTO).validate_python(response.json())
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
async def get_league_entries(
|
|
80
|
+
self,
|
|
81
|
+
region: str,
|
|
82
|
+
|
|
83
|
+
division: str,
|
|
84
|
+
|
|
85
|
+
tier: str,
|
|
86
|
+
|
|
87
|
+
page: int = None,
|
|
88
|
+
|
|
89
|
+
queue: str = None,
|
|
90
|
+
|
|
91
|
+
) -> List[tft_league_v1_LeagueEntryDTO]:
|
|
92
|
+
"""
|
|
93
|
+
Get all the league entries.
|
|
94
|
+
"""
|
|
95
|
+
path = "/tft/league/v1/entries/{tier}/{division}"
|
|
96
|
+
# Replace path params
|
|
97
|
+
|
|
98
|
+
path = path.replace("{" + "division" + "}", str(division))
|
|
99
|
+
|
|
100
|
+
path = path.replace("{" + "tier" + "}", str(tier))
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
# Query params
|
|
104
|
+
params = {
|
|
105
|
+
|
|
106
|
+
"page": page,
|
|
107
|
+
|
|
108
|
+
"queue": queue,
|
|
109
|
+
|
|
110
|
+
}
|
|
111
|
+
# Filter None
|
|
112
|
+
params = {k: v for k, v in params.items() if v is not None}
|
|
113
|
+
|
|
114
|
+
response = await self.http.request(
|
|
115
|
+
method="GET",
|
|
116
|
+
url=path,
|
|
117
|
+
region_or_platform=region,
|
|
118
|
+
params=params
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
from pydantic import TypeAdapter
|
|
122
|
+
return TypeAdapter(List[tft_league_v1_LeagueEntryDTO]).validate_python(response.json())
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
async def get_grandmaster_league(
|
|
126
|
+
self,
|
|
127
|
+
region: str,
|
|
128
|
+
|
|
129
|
+
queue: str = None,
|
|
130
|
+
|
|
131
|
+
) -> tft_league_v1_LeagueListDTO:
|
|
132
|
+
"""
|
|
133
|
+
Get the grandmaster league.
|
|
134
|
+
"""
|
|
135
|
+
path = "/tft/league/v1/grandmaster"
|
|
136
|
+
# Replace path params
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
# Query params
|
|
140
|
+
params = {
|
|
141
|
+
|
|
142
|
+
"queue": queue,
|
|
143
|
+
|
|
144
|
+
}
|
|
145
|
+
# Filter None
|
|
146
|
+
params = {k: v for k, v in params.items() if v is not None}
|
|
147
|
+
|
|
148
|
+
response = await self.http.request(
|
|
149
|
+
method="GET",
|
|
150
|
+
url=path,
|
|
151
|
+
region_or_platform=region,
|
|
152
|
+
params=params
|
|
153
|
+
)
|
|
154
|
+
|
|
155
|
+
from pydantic import TypeAdapter
|
|
156
|
+
return TypeAdapter(tft_league_v1_LeagueListDTO).validate_python(response.json())
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
async def get_league_by_id(
|
|
160
|
+
self,
|
|
161
|
+
region: str,
|
|
162
|
+
|
|
163
|
+
leagueId: str,
|
|
164
|
+
|
|
165
|
+
) -> tft_league_v1_LeagueListDTO:
|
|
166
|
+
"""
|
|
167
|
+
Get league with given ID, including inactive entries.
|
|
168
|
+
"""
|
|
169
|
+
path = "/tft/league/v1/leagues/{leagueId}"
|
|
170
|
+
# Replace path params
|
|
171
|
+
|
|
172
|
+
path = path.replace("{" + "leagueId" + "}", str(leagueId))
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
# Query params
|
|
176
|
+
params = {
|
|
177
|
+
|
|
178
|
+
}
|
|
179
|
+
# Filter None
|
|
180
|
+
params = {k: v for k, v in params.items() if v is not None}
|
|
181
|
+
|
|
182
|
+
response = await self.http.request(
|
|
183
|
+
method="GET",
|
|
184
|
+
url=path,
|
|
185
|
+
region_or_platform=region,
|
|
186
|
+
params=params
|
|
187
|
+
)
|
|
188
|
+
|
|
189
|
+
from pydantic import TypeAdapter
|
|
190
|
+
return TypeAdapter(tft_league_v1_LeagueListDTO).validate_python(response.json())
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
async def get_master_league(
|
|
194
|
+
self,
|
|
195
|
+
region: str,
|
|
196
|
+
|
|
197
|
+
queue: str = None,
|
|
198
|
+
|
|
199
|
+
) -> tft_league_v1_LeagueListDTO:
|
|
200
|
+
"""
|
|
201
|
+
Get the master league.
|
|
202
|
+
"""
|
|
203
|
+
path = "/tft/league/v1/master"
|
|
204
|
+
# Replace path params
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
# Query params
|
|
208
|
+
params = {
|
|
209
|
+
|
|
210
|
+
"queue": queue,
|
|
211
|
+
|
|
212
|
+
}
|
|
213
|
+
# Filter None
|
|
214
|
+
params = {k: v for k, v in params.items() if v is not None}
|
|
215
|
+
|
|
216
|
+
response = await self.http.request(
|
|
217
|
+
method="GET",
|
|
218
|
+
url=path,
|
|
219
|
+
region_or_platform=region,
|
|
220
|
+
params=params
|
|
221
|
+
)
|
|
222
|
+
|
|
223
|
+
from pydantic import TypeAdapter
|
|
224
|
+
return TypeAdapter(tft_league_v1_LeagueListDTO).validate_python(response.json())
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
async def get_top_rated_ladder(
|
|
228
|
+
self,
|
|
229
|
+
region: str,
|
|
230
|
+
|
|
231
|
+
queue: str,
|
|
232
|
+
|
|
233
|
+
) -> List[tft_league_v1_TopRatedLadderEntryDto]:
|
|
234
|
+
"""
|
|
235
|
+
Get the top rated ladder for given queue
|
|
236
|
+
"""
|
|
237
|
+
path = "/tft/league/v1/rated-ladders/{queue}/top"
|
|
238
|
+
# Replace path params
|
|
239
|
+
|
|
240
|
+
path = path.replace("{" + "queue" + "}", str(queue))
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
# Query params
|
|
244
|
+
params = {
|
|
245
|
+
|
|
246
|
+
}
|
|
247
|
+
# Filter None
|
|
248
|
+
params = {k: v for k, v in params.items() if v is not None}
|
|
249
|
+
|
|
250
|
+
response = await self.http.request(
|
|
251
|
+
method="GET",
|
|
252
|
+
url=path,
|
|
253
|
+
region_or_platform=region,
|
|
254
|
+
params=params
|
|
255
|
+
)
|
|
256
|
+
|
|
257
|
+
from pydantic import TypeAdapter
|
|
258
|
+
return TypeAdapter(List[tft_league_v1_TopRatedLadderEntryDto]).validate_python(response.json())
|
|
259
|
+
|
|
260
|
+
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Generated Code. Do not edit.
|
|
2
|
+
from typing import Optional, List, Dict, Any
|
|
3
|
+
from riotskillissue.core.http import HttpClient
|
|
4
|
+
from riotskillissue.api.models import *
|
|
5
|
+
|
|
6
|
+
class Tft_matchApi:
|
|
7
|
+
def __init__(self, http: HttpClient):
|
|
8
|
+
self.http = http
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
async def get_match_ids_by_puuid(
|
|
12
|
+
self,
|
|
13
|
+
region: str,
|
|
14
|
+
|
|
15
|
+
puuid: str,
|
|
16
|
+
|
|
17
|
+
count: int = None,
|
|
18
|
+
|
|
19
|
+
endTime: int = None,
|
|
20
|
+
|
|
21
|
+
start: int = None,
|
|
22
|
+
|
|
23
|
+
startTime: int = None,
|
|
24
|
+
|
|
25
|
+
) -> List[str]:
|
|
26
|
+
"""
|
|
27
|
+
Get a list of match ids by PUUID
|
|
28
|
+
"""
|
|
29
|
+
path = "/tft/match/v1/matches/by-puuid/{puuid}/ids"
|
|
30
|
+
# Replace path params
|
|
31
|
+
|
|
32
|
+
path = path.replace("{" + "puuid" + "}", str(puuid))
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
# Query params
|
|
36
|
+
params = {
|
|
37
|
+
|
|
38
|
+
"count": count,
|
|
39
|
+
|
|
40
|
+
"endTime": endTime,
|
|
41
|
+
|
|
42
|
+
"start": start,
|
|
43
|
+
|
|
44
|
+
"startTime": startTime,
|
|
45
|
+
|
|
46
|
+
}
|
|
47
|
+
# Filter None
|
|
48
|
+
params = {k: v for k, v in params.items() if v is not None}
|
|
49
|
+
|
|
50
|
+
response = await self.http.request(
|
|
51
|
+
method="GET",
|
|
52
|
+
url=path,
|
|
53
|
+
region_or_platform=region,
|
|
54
|
+
params=params
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
from pydantic import TypeAdapter
|
|
58
|
+
return TypeAdapter(List[str]).validate_python(response.json())
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
async def get_match(
|
|
62
|
+
self,
|
|
63
|
+
region: str,
|
|
64
|
+
|
|
65
|
+
matchId: str,
|
|
66
|
+
|
|
67
|
+
) -> tft_match_v1_MatchDto:
|
|
68
|
+
"""
|
|
69
|
+
Get a match by match id
|
|
70
|
+
"""
|
|
71
|
+
path = "/tft/match/v1/matches/{matchId}"
|
|
72
|
+
# Replace path params
|
|
73
|
+
|
|
74
|
+
path = path.replace("{" + "matchId" + "}", str(matchId))
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
# Query params
|
|
78
|
+
params = {
|
|
79
|
+
|
|
80
|
+
}
|
|
81
|
+
# Filter None
|
|
82
|
+
params = {k: v for k, v in params.items() if v is not None}
|
|
83
|
+
|
|
84
|
+
response = await self.http.request(
|
|
85
|
+
method="GET",
|
|
86
|
+
url=path,
|
|
87
|
+
region_or_platform=region,
|
|
88
|
+
params=params
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
from pydantic import TypeAdapter
|
|
92
|
+
return TypeAdapter(tft_match_v1_MatchDto).validate_python(response.json())
|
|
93
|
+
|
|
94
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Generated Code. Do not edit.
|
|
2
|
+
from typing import Optional, List, Dict, Any
|
|
3
|
+
from riotskillissue.core.http import HttpClient
|
|
4
|
+
from riotskillissue.api.models import *
|
|
5
|
+
|
|
6
|
+
class Tft_statusApi:
|
|
7
|
+
def __init__(self, http: HttpClient):
|
|
8
|
+
self.http = http
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
async def get_platform_data(
|
|
12
|
+
self,
|
|
13
|
+
region: str,
|
|
14
|
+
|
|
15
|
+
) -> tft_status_v1_PlatformDataDto:
|
|
16
|
+
"""
|
|
17
|
+
Get Teamfight Tactics status for the given platform.
|
|
18
|
+
"""
|
|
19
|
+
path = "/tft/status/v1/platform-data"
|
|
20
|
+
# Replace path params
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
# Query params
|
|
24
|
+
params = {
|
|
25
|
+
|
|
26
|
+
}
|
|
27
|
+
# Filter None
|
|
28
|
+
params = {k: v for k, v in params.items() if v is not None}
|
|
29
|
+
|
|
30
|
+
response = await self.http.request(
|
|
31
|
+
method="GET",
|
|
32
|
+
url=path,
|
|
33
|
+
region_or_platform=region,
|
|
34
|
+
params=params
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
from pydantic import TypeAdapter
|
|
38
|
+
return TypeAdapter(tft_status_v1_PlatformDataDto).validate_python(response.json())
|
|
39
|
+
|
|
40
|
+
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Generated Code. Do not edit.
|
|
2
|
+
from typing import Optional, List, Dict, Any
|
|
3
|
+
from riotskillissue.core.http import HttpClient
|
|
4
|
+
from riotskillissue.api.models import *
|
|
5
|
+
|
|
6
|
+
class Tft_summonerApi:
|
|
7
|
+
def __init__(self, http: HttpClient):
|
|
8
|
+
self.http = http
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
async def get_by_puuid(
|
|
12
|
+
self,
|
|
13
|
+
region: str,
|
|
14
|
+
|
|
15
|
+
encryptedPUUID: str,
|
|
16
|
+
|
|
17
|
+
) -> tft_summoner_v1_SummonerDTO:
|
|
18
|
+
"""
|
|
19
|
+
Get a summoner by PUUID.
|
|
20
|
+
"""
|
|
21
|
+
path = "/tft/summoner/v1/summoners/by-puuid/{encryptedPUUID}"
|
|
22
|
+
# Replace path params
|
|
23
|
+
|
|
24
|
+
path = path.replace("{" + "encryptedPUUID" + "}", str(encryptedPUUID))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
# Query params
|
|
28
|
+
params = {
|
|
29
|
+
|
|
30
|
+
}
|
|
31
|
+
# Filter None
|
|
32
|
+
params = {k: v for k, v in params.items() if v is not None}
|
|
33
|
+
|
|
34
|
+
response = await self.http.request(
|
|
35
|
+
method="GET",
|
|
36
|
+
url=path,
|
|
37
|
+
region_or_platform=region,
|
|
38
|
+
params=params
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
from pydantic import TypeAdapter
|
|
42
|
+
return TypeAdapter(tft_summoner_v1_SummonerDTO).validate_python(response.json())
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
async def get_by_access_token(
|
|
46
|
+
self,
|
|
47
|
+
region: str,
|
|
48
|
+
|
|
49
|
+
) -> tft_summoner_v1_SummonerDTO:
|
|
50
|
+
"""
|
|
51
|
+
Get a summoner by access token.
|
|
52
|
+
"""
|
|
53
|
+
path = "/tft/summoner/v1/summoners/me"
|
|
54
|
+
# Replace path params
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
# Query params
|
|
58
|
+
params = {
|
|
59
|
+
|
|
60
|
+
}
|
|
61
|
+
# Filter None
|
|
62
|
+
params = {k: v for k, v in params.items() if v is not None}
|
|
63
|
+
|
|
64
|
+
response = await self.http.request(
|
|
65
|
+
method="GET",
|
|
66
|
+
url=path,
|
|
67
|
+
region_or_platform=region,
|
|
68
|
+
params=params
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
from pydantic import TypeAdapter
|
|
72
|
+
return TypeAdapter(tft_summoner_v1_SummonerDTO).validate_python(response.json())
|
|
73
|
+
|
|
74
|
+
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# Generated Code. Do not edit.
|
|
2
|
+
from typing import Optional, List, Dict, Any
|
|
3
|
+
from riot.core.http import HttpClient
|
|
4
|
+
from riot.core.types import Region, Platform
|
|
5
|
+
from riot.api.models import *
|
|
6
|
+
|
|
7
|
+
class Tournament-stubApi:
|
|
8
|
+
def __init__(self, http: HttpClient):
|
|
9
|
+
self.http = http
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
async def create_tournament_code(
|
|
13
|
+
self,
|
|
14
|
+
region: str,
|
|
15
|
+
|
|
16
|
+
count: int = None,
|
|
17
|
+
|
|
18
|
+
tournamentId: int,
|
|
19
|
+
|
|
20
|
+
) -> List[str]:
|
|
21
|
+
"""
|
|
22
|
+
Create a tournament code for the given tournament - Stub method
|
|
23
|
+
"""
|
|
24
|
+
path = "/lol/tournament-stub/v5/codes"
|
|
25
|
+
# Replace path params
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
# Query params
|
|
29
|
+
params = {
|
|
30
|
+
|
|
31
|
+
"count": count,
|
|
32
|
+
|
|
33
|
+
"tournamentId": tournamentId,
|
|
34
|
+
|
|
35
|
+
}
|
|
36
|
+
# Filter None
|
|
37
|
+
params = {k: v for k, v in params.items() if v is not None}
|
|
38
|
+
|
|
39
|
+
response = await self.http.request(
|
|
40
|
+
method="POST",
|
|
41
|
+
url=path,
|
|
42
|
+
region_or_platform=region,
|
|
43
|
+
params=params
|
|
44
|
+
)
|
|
45
|
+
return response.json()
|
|
46
|
+
|
|
47
|
+
async def get_tournament_code(
|
|
48
|
+
self,
|
|
49
|
+
region: str,
|
|
50
|
+
|
|
51
|
+
tournamentCode: str,
|
|
52
|
+
|
|
53
|
+
) -> tournament-stub-v5.TournamentCodeV5DTO:
|
|
54
|
+
"""
|
|
55
|
+
Returns the tournament code DTO associated with a tournament code string - Stub Method
|
|
56
|
+
"""
|
|
57
|
+
path = "/lol/tournament-stub/v5/codes/{tournamentCode}"
|
|
58
|
+
# Replace path params
|
|
59
|
+
|
|
60
|
+
path = path.replace("{" + "tournamentCode" + "}", str(tournamentCode))
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
# Query params
|
|
64
|
+
params = {
|
|
65
|
+
|
|
66
|
+
}
|
|
67
|
+
# Filter None
|
|
68
|
+
params = {k: v for k, v in params.items() if v is not None}
|
|
69
|
+
|
|
70
|
+
response = await self.http.request(
|
|
71
|
+
method="GET",
|
|
72
|
+
url=path,
|
|
73
|
+
region_or_platform=region,
|
|
74
|
+
params=params
|
|
75
|
+
)
|
|
76
|
+
return response.json()
|
|
77
|
+
|
|
78
|
+
async def get_lobby_events_by_code(
|
|
79
|
+
self,
|
|
80
|
+
region: str,
|
|
81
|
+
|
|
82
|
+
tournamentCode: str,
|
|
83
|
+
|
|
84
|
+
) -> tournament-stub-v5.LobbyEventV5DTOWrapper:
|
|
85
|
+
"""
|
|
86
|
+
Gets a list of lobby events by tournament code - Stub method
|
|
87
|
+
"""
|
|
88
|
+
path = "/lol/tournament-stub/v5/lobby-events/by-code/{tournamentCode}"
|
|
89
|
+
# Replace path params
|
|
90
|
+
|
|
91
|
+
path = path.replace("{" + "tournamentCode" + "}", str(tournamentCode))
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
# Query params
|
|
95
|
+
params = {
|
|
96
|
+
|
|
97
|
+
}
|
|
98
|
+
# Filter None
|
|
99
|
+
params = {k: v for k, v in params.items() if v is not None}
|
|
100
|
+
|
|
101
|
+
response = await self.http.request(
|
|
102
|
+
method="GET",
|
|
103
|
+
url=path,
|
|
104
|
+
region_or_platform=region,
|
|
105
|
+
params=params
|
|
106
|
+
)
|
|
107
|
+
return response.json()
|
|
108
|
+
|
|
109
|
+
async def register_provider_data(
|
|
110
|
+
self,
|
|
111
|
+
region: str,
|
|
112
|
+
|
|
113
|
+
) -> int:
|
|
114
|
+
"""
|
|
115
|
+
Creates a tournament provider and returns its ID - Stub method
|
|
116
|
+
"""
|
|
117
|
+
path = "/lol/tournament-stub/v5/providers"
|
|
118
|
+
# Replace path params
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
# Query params
|
|
122
|
+
params = {
|
|
123
|
+
|
|
124
|
+
}
|
|
125
|
+
# Filter None
|
|
126
|
+
params = {k: v for k, v in params.items() if v is not None}
|
|
127
|
+
|
|
128
|
+
response = await self.http.request(
|
|
129
|
+
method="POST",
|
|
130
|
+
url=path,
|
|
131
|
+
region_or_platform=region,
|
|
132
|
+
params=params
|
|
133
|
+
)
|
|
134
|
+
return response.json()
|
|
135
|
+
|
|
136
|
+
async def register_tournament(
|
|
137
|
+
self,
|
|
138
|
+
region: str,
|
|
139
|
+
|
|
140
|
+
) -> int:
|
|
141
|
+
"""
|
|
142
|
+
Creates a tournament and returns its ID - Stub method
|
|
143
|
+
"""
|
|
144
|
+
path = "/lol/tournament-stub/v5/tournaments"
|
|
145
|
+
# Replace path params
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
# Query params
|
|
149
|
+
params = {
|
|
150
|
+
|
|
151
|
+
}
|
|
152
|
+
# Filter None
|
|
153
|
+
params = {k: v for k, v in params.items() if v is not None}
|
|
154
|
+
|
|
155
|
+
response = await self.http.request(
|
|
156
|
+
method="POST",
|
|
157
|
+
url=path,
|
|
158
|
+
region_or_platform=region,
|
|
159
|
+
params=params
|
|
160
|
+
)
|
|
161
|
+
return response.json()
|
|
162
|
+
|