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
|
File without changes
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# Generated Code. Do not edit.
|
|
2
|
+
from riotskillissue.core.http import HttpClient
|
|
3
|
+
|
|
4
|
+
from riotskillissue.api.endpoints.lol_challenges import Lol_challengesApi
|
|
5
|
+
|
|
6
|
+
from riotskillissue.api.endpoints.champion_mastery import Champion_masteryApi
|
|
7
|
+
|
|
8
|
+
from riotskillissue.api.endpoints.clash import ClashApi
|
|
9
|
+
|
|
10
|
+
from riotskillissue.api.endpoints.league_exp import League_expApi
|
|
11
|
+
|
|
12
|
+
from riotskillissue.api.endpoints.league import LeagueApi
|
|
13
|
+
|
|
14
|
+
from riotskillissue.api.endpoints.match import MatchApi
|
|
15
|
+
|
|
16
|
+
from riotskillissue.api.endpoints.champion import ChampionApi
|
|
17
|
+
|
|
18
|
+
from riotskillissue.api.endpoints.lol_rso_match import Lol_rso_matchApi
|
|
19
|
+
|
|
20
|
+
from riotskillissue.api.endpoints.spectator_tft import Spectator_tftApi
|
|
21
|
+
|
|
22
|
+
from riotskillissue.api.endpoints.spectator import SpectatorApi
|
|
23
|
+
|
|
24
|
+
from riotskillissue.api.endpoints.lol_status import Lol_statusApi
|
|
25
|
+
|
|
26
|
+
from riotskillissue.api.endpoints.summoner import SummonerApi
|
|
27
|
+
|
|
28
|
+
from riotskillissue.api.endpoints.tournament_stub import Tournament_stubApi
|
|
29
|
+
|
|
30
|
+
from riotskillissue.api.endpoints.tournament import TournamentApi
|
|
31
|
+
|
|
32
|
+
from riotskillissue.api.endpoints.lor_deck import Lor_deckApi
|
|
33
|
+
|
|
34
|
+
from riotskillissue.api.endpoints.lor_inventory import Lor_inventoryApi
|
|
35
|
+
|
|
36
|
+
from riotskillissue.api.endpoints.lor_match import Lor_matchApi
|
|
37
|
+
|
|
38
|
+
from riotskillissue.api.endpoints.lor_ranked import Lor_rankedApi
|
|
39
|
+
|
|
40
|
+
from riotskillissue.api.endpoints.lor_status import Lor_statusApi
|
|
41
|
+
|
|
42
|
+
from riotskillissue.api.endpoints.riftbound_content import Riftbound_contentApi
|
|
43
|
+
|
|
44
|
+
from riotskillissue.api.endpoints.account import AccountApi
|
|
45
|
+
|
|
46
|
+
from riotskillissue.api.endpoints.tft_league import Tft_leagueApi
|
|
47
|
+
|
|
48
|
+
from riotskillissue.api.endpoints.tft_match import Tft_matchApi
|
|
49
|
+
|
|
50
|
+
from riotskillissue.api.endpoints.tft_status import Tft_statusApi
|
|
51
|
+
|
|
52
|
+
from riotskillissue.api.endpoints.tft_summoner import Tft_summonerApi
|
|
53
|
+
|
|
54
|
+
from riotskillissue.api.endpoints.val_console_ranked import Val_console_rankedApi
|
|
55
|
+
|
|
56
|
+
from riotskillissue.api.endpoints.val_content import Val_contentApi
|
|
57
|
+
|
|
58
|
+
from riotskillissue.api.endpoints.val_console_match import Val_console_matchApi
|
|
59
|
+
|
|
60
|
+
from riotskillissue.api.endpoints.val_match import Val_matchApi
|
|
61
|
+
|
|
62
|
+
from riotskillissue.api.endpoints.val_ranked import Val_rankedApi
|
|
63
|
+
|
|
64
|
+
from riotskillissue.api.endpoints.val_status import Val_statusApi
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class GeneratedClientMixin:
|
|
68
|
+
def __init__(self, http: HttpClient):
|
|
69
|
+
|
|
70
|
+
self.lol_challenges = Lol_challengesApi(http)
|
|
71
|
+
|
|
72
|
+
self.champion_mastery = Champion_masteryApi(http)
|
|
73
|
+
|
|
74
|
+
self.clash = ClashApi(http)
|
|
75
|
+
|
|
76
|
+
self.league_exp = League_expApi(http)
|
|
77
|
+
|
|
78
|
+
self.league = LeagueApi(http)
|
|
79
|
+
|
|
80
|
+
self.match = MatchApi(http)
|
|
81
|
+
|
|
82
|
+
self.champion = ChampionApi(http)
|
|
83
|
+
|
|
84
|
+
self.lol_rso_match = Lol_rso_matchApi(http)
|
|
85
|
+
|
|
86
|
+
self.spectator_tft = Spectator_tftApi(http)
|
|
87
|
+
|
|
88
|
+
self.spectator = SpectatorApi(http)
|
|
89
|
+
|
|
90
|
+
self.lol_status = Lol_statusApi(http)
|
|
91
|
+
|
|
92
|
+
self.summoner = SummonerApi(http)
|
|
93
|
+
|
|
94
|
+
self.tournament_stub = Tournament_stubApi(http)
|
|
95
|
+
|
|
96
|
+
self.tournament = TournamentApi(http)
|
|
97
|
+
|
|
98
|
+
self.lor_deck = Lor_deckApi(http)
|
|
99
|
+
|
|
100
|
+
self.lor_inventory = Lor_inventoryApi(http)
|
|
101
|
+
|
|
102
|
+
self.lor_match = Lor_matchApi(http)
|
|
103
|
+
|
|
104
|
+
self.lor_ranked = Lor_rankedApi(http)
|
|
105
|
+
|
|
106
|
+
self.lor_status = Lor_statusApi(http)
|
|
107
|
+
|
|
108
|
+
self.riftbound_content = Riftbound_contentApi(http)
|
|
109
|
+
|
|
110
|
+
self.account = AccountApi(http)
|
|
111
|
+
|
|
112
|
+
self.tft_league = Tft_leagueApi(http)
|
|
113
|
+
|
|
114
|
+
self.tft_match = Tft_matchApi(http)
|
|
115
|
+
|
|
116
|
+
self.tft_status = Tft_statusApi(http)
|
|
117
|
+
|
|
118
|
+
self.tft_summoner = Tft_summonerApi(http)
|
|
119
|
+
|
|
120
|
+
self.val_console_ranked = Val_console_rankedApi(http)
|
|
121
|
+
|
|
122
|
+
self.val_content = Val_contentApi(http)
|
|
123
|
+
|
|
124
|
+
self.val_console_match = Val_console_matchApi(http)
|
|
125
|
+
|
|
126
|
+
self.val_match = Val_matchApi(http)
|
|
127
|
+
|
|
128
|
+
self.val_ranked = Val_rankedApi(http)
|
|
129
|
+
|
|
130
|
+
self.val_status = Val_statusApi(http)
|
|
131
|
+
|
|
@@ -0,0 +1,188 @@
|
|
|
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 AccountApi:
|
|
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
|
+
puuid: str,
|
|
16
|
+
|
|
17
|
+
) -> account_v1_AccountDto:
|
|
18
|
+
"""
|
|
19
|
+
Get account by puuid
|
|
20
|
+
"""
|
|
21
|
+
path = "/riot/account/v1/accounts/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(account_v1_AccountDto).validate_python(response.json())
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
async def get_by_riot_id(
|
|
46
|
+
self,
|
|
47
|
+
region: str,
|
|
48
|
+
|
|
49
|
+
gameName: str,
|
|
50
|
+
|
|
51
|
+
tagLine: str,
|
|
52
|
+
|
|
53
|
+
) -> account_v1_AccountDto:
|
|
54
|
+
"""
|
|
55
|
+
Get account by riot id
|
|
56
|
+
"""
|
|
57
|
+
path = "/riot/account/v1/accounts/by-riot-id/{gameName}/{tagLine}"
|
|
58
|
+
# Replace path params
|
|
59
|
+
|
|
60
|
+
path = path.replace("{" + "gameName" + "}", str(gameName))
|
|
61
|
+
|
|
62
|
+
path = path.replace("{" + "tagLine" + "}", str(tagLine))
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
# Query params
|
|
66
|
+
params = {
|
|
67
|
+
|
|
68
|
+
}
|
|
69
|
+
# Filter None
|
|
70
|
+
params = {k: v for k, v in params.items() if v is not None}
|
|
71
|
+
|
|
72
|
+
response = await self.http.request(
|
|
73
|
+
method="GET",
|
|
74
|
+
url=path,
|
|
75
|
+
region_or_platform=region,
|
|
76
|
+
params=params
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
from pydantic import TypeAdapter
|
|
80
|
+
return TypeAdapter(account_v1_AccountDto).validate_python(response.json())
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
async def get_by_access_token(
|
|
84
|
+
self,
|
|
85
|
+
region: str,
|
|
86
|
+
|
|
87
|
+
) -> account_v1_AccountDto:
|
|
88
|
+
"""
|
|
89
|
+
Get account by access token
|
|
90
|
+
"""
|
|
91
|
+
path = "/riot/account/v1/accounts/me"
|
|
92
|
+
# Replace path params
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
# Query params
|
|
96
|
+
params = {
|
|
97
|
+
|
|
98
|
+
}
|
|
99
|
+
# Filter None
|
|
100
|
+
params = {k: v for k, v in params.items() if v is not None}
|
|
101
|
+
|
|
102
|
+
response = await self.http.request(
|
|
103
|
+
method="GET",
|
|
104
|
+
url=path,
|
|
105
|
+
region_or_platform=region,
|
|
106
|
+
params=params
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
from pydantic import TypeAdapter
|
|
110
|
+
return TypeAdapter(account_v1_AccountDto).validate_python(response.json())
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
async def get_active_shard(
|
|
114
|
+
self,
|
|
115
|
+
region: str,
|
|
116
|
+
|
|
117
|
+
game: str,
|
|
118
|
+
|
|
119
|
+
puuid: str,
|
|
120
|
+
|
|
121
|
+
) -> account_v1_ActiveShardDto:
|
|
122
|
+
"""
|
|
123
|
+
Get active shard for a player
|
|
124
|
+
"""
|
|
125
|
+
path = "/riot/account/v1/active-shards/by-game/{game}/by-puuid/{puuid}"
|
|
126
|
+
# Replace path params
|
|
127
|
+
|
|
128
|
+
path = path.replace("{" + "game" + "}", str(game))
|
|
129
|
+
|
|
130
|
+
path = path.replace("{" + "puuid" + "}", str(puuid))
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
# Query params
|
|
134
|
+
params = {
|
|
135
|
+
|
|
136
|
+
}
|
|
137
|
+
# Filter None
|
|
138
|
+
params = {k: v for k, v in params.items() if v is not None}
|
|
139
|
+
|
|
140
|
+
response = await self.http.request(
|
|
141
|
+
method="GET",
|
|
142
|
+
url=path,
|
|
143
|
+
region_or_platform=region,
|
|
144
|
+
params=params
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
from pydantic import TypeAdapter
|
|
148
|
+
return TypeAdapter(account_v1_ActiveShardDto).validate_python(response.json())
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
async def get_active_region(
|
|
152
|
+
self,
|
|
153
|
+
region: str,
|
|
154
|
+
|
|
155
|
+
game: str,
|
|
156
|
+
|
|
157
|
+
puuid: str,
|
|
158
|
+
|
|
159
|
+
) -> account_v1_AccountRegionDTO:
|
|
160
|
+
"""
|
|
161
|
+
Get active region (lol and tft)
|
|
162
|
+
"""
|
|
163
|
+
path = "/riot/account/v1/region/by-game/{game}/by-puuid/{puuid}"
|
|
164
|
+
# Replace path params
|
|
165
|
+
|
|
166
|
+
path = path.replace("{" + "game" + "}", str(game))
|
|
167
|
+
|
|
168
|
+
path = path.replace("{" + "puuid" + "}", str(puuid))
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
# Query params
|
|
172
|
+
params = {
|
|
173
|
+
|
|
174
|
+
}
|
|
175
|
+
# Filter None
|
|
176
|
+
params = {k: v for k, v in params.items() if v is not None}
|
|
177
|
+
|
|
178
|
+
response = await self.http.request(
|
|
179
|
+
method="GET",
|
|
180
|
+
url=path,
|
|
181
|
+
region_or_platform=region,
|
|
182
|
+
params=params
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
from pydantic import TypeAdapter
|
|
186
|
+
return TypeAdapter(account_v1_AccountRegionDTO).validate_python(response.json())
|
|
187
|
+
|
|
188
|
+
|
|
@@ -0,0 +1,143 @@
|
|
|
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 Champion-masteryApi:
|
|
8
|
+
def __init__(self, http: HttpClient):
|
|
9
|
+
self.http = http
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
async def get_all_champion_masteries_by_p_u_u_i_d(
|
|
13
|
+
self,
|
|
14
|
+
region: str,
|
|
15
|
+
|
|
16
|
+
encryptedPUUID: str,
|
|
17
|
+
|
|
18
|
+
) -> List[champion-mastery-v4.ChampionMasteryDto]:
|
|
19
|
+
"""
|
|
20
|
+
Get all champion mastery entries sorted by number of champion points descending.
|
|
21
|
+
"""
|
|
22
|
+
path = "/lol/champion-mastery/v4/champion-masteries/by-puuid/{encryptedPUUID}"
|
|
23
|
+
# Replace path params
|
|
24
|
+
|
|
25
|
+
path = path.replace("{" + "encryptedPUUID" + "}", str(encryptedPUUID))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
# Query params
|
|
29
|
+
params = {
|
|
30
|
+
|
|
31
|
+
}
|
|
32
|
+
# Filter None
|
|
33
|
+
params = {k: v for k, v in params.items() if v is not None}
|
|
34
|
+
|
|
35
|
+
response = await self.http.request(
|
|
36
|
+
method="GET",
|
|
37
|
+
url=path,
|
|
38
|
+
region_or_platform=region,
|
|
39
|
+
params=params
|
|
40
|
+
)
|
|
41
|
+
return response.json()
|
|
42
|
+
|
|
43
|
+
async def get_champion_mastery_by_p_u_u_i_d(
|
|
44
|
+
self,
|
|
45
|
+
region: str,
|
|
46
|
+
|
|
47
|
+
encryptedPUUID: str,
|
|
48
|
+
|
|
49
|
+
championId: int,
|
|
50
|
+
|
|
51
|
+
) -> champion-mastery-v4.ChampionMasteryDto:
|
|
52
|
+
"""
|
|
53
|
+
Get a champion mastery by puuid and champion ID.
|
|
54
|
+
"""
|
|
55
|
+
path = "/lol/champion-mastery/v4/champion-masteries/by-puuid/{encryptedPUUID}/by-champion/{championId}"
|
|
56
|
+
# Replace path params
|
|
57
|
+
|
|
58
|
+
path = path.replace("{" + "encryptedPUUID" + "}", str(encryptedPUUID))
|
|
59
|
+
|
|
60
|
+
path = path.replace("{" + "championId" + "}", str(championId))
|
|
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_top_champion_masteries_by_p_u_u_i_d(
|
|
79
|
+
self,
|
|
80
|
+
region: str,
|
|
81
|
+
|
|
82
|
+
encryptedPUUID: str,
|
|
83
|
+
|
|
84
|
+
count: int = None,
|
|
85
|
+
|
|
86
|
+
) -> List[champion-mastery-v4.ChampionMasteryDto]:
|
|
87
|
+
"""
|
|
88
|
+
Get specified number of top champion mastery entries sorted by number of champion points descending.
|
|
89
|
+
"""
|
|
90
|
+
path = "/lol/champion-mastery/v4/champion-masteries/by-puuid/{encryptedPUUID}/top"
|
|
91
|
+
# Replace path params
|
|
92
|
+
|
|
93
|
+
path = path.replace("{" + "encryptedPUUID" + "}", str(encryptedPUUID))
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
# Query params
|
|
97
|
+
params = {
|
|
98
|
+
|
|
99
|
+
"count": count,
|
|
100
|
+
|
|
101
|
+
}
|
|
102
|
+
# Filter None
|
|
103
|
+
params = {k: v for k, v in params.items() if v is not None}
|
|
104
|
+
|
|
105
|
+
response = await self.http.request(
|
|
106
|
+
method="GET",
|
|
107
|
+
url=path,
|
|
108
|
+
region_or_platform=region,
|
|
109
|
+
params=params
|
|
110
|
+
)
|
|
111
|
+
return response.json()
|
|
112
|
+
|
|
113
|
+
async def get_champion_mastery_score_by_p_u_u_i_d(
|
|
114
|
+
self,
|
|
115
|
+
region: str,
|
|
116
|
+
|
|
117
|
+
encryptedPUUID: str,
|
|
118
|
+
|
|
119
|
+
) -> int:
|
|
120
|
+
"""
|
|
121
|
+
Get a player's total champion mastery score, which is the sum of individual champion mastery levels.
|
|
122
|
+
"""
|
|
123
|
+
path = "/lol/champion-mastery/v4/scores/by-puuid/{encryptedPUUID}"
|
|
124
|
+
# Replace path params
|
|
125
|
+
|
|
126
|
+
path = path.replace("{" + "encryptedPUUID" + "}", str(encryptedPUUID))
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
# Query params
|
|
130
|
+
params = {
|
|
131
|
+
|
|
132
|
+
}
|
|
133
|
+
# Filter None
|
|
134
|
+
params = {k: v for k, v in params.items() if v is not None}
|
|
135
|
+
|
|
136
|
+
response = await self.http.request(
|
|
137
|
+
method="GET",
|
|
138
|
+
url=path,
|
|
139
|
+
region_or_platform=region,
|
|
140
|
+
params=params
|
|
141
|
+
)
|
|
142
|
+
return response.json()
|
|
143
|
+
|
|
@@ -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 ChampionApi:
|
|
7
|
+
def __init__(self, http: HttpClient):
|
|
8
|
+
self.http = http
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
async def get_champion_info(
|
|
12
|
+
self,
|
|
13
|
+
region: str,
|
|
14
|
+
|
|
15
|
+
) -> champion_v3_ChampionInfo:
|
|
16
|
+
"""
|
|
17
|
+
Returns champion rotations, including free-to-play and low-level free-to-play rotations (REST)
|
|
18
|
+
"""
|
|
19
|
+
path = "/lol/platform/v3/champion-rotations"
|
|
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(champion_v3_ChampionInfo).validate_python(response.json())
|
|
39
|
+
|
|
40
|
+
|
|
@@ -0,0 +1,154 @@
|
|
|
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 Champion_masteryApi:
|
|
7
|
+
def __init__(self, http: HttpClient):
|
|
8
|
+
self.http = http
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
async def get_all_champion_masteries_by_puuid(
|
|
12
|
+
self,
|
|
13
|
+
region: str,
|
|
14
|
+
|
|
15
|
+
encryptedPUUID: str,
|
|
16
|
+
|
|
17
|
+
) -> List[champion_mastery_v4_ChampionMasteryDto]:
|
|
18
|
+
"""
|
|
19
|
+
Get all champion mastery entries sorted by number of champion points descending.
|
|
20
|
+
"""
|
|
21
|
+
path = "/lol/champion-mastery/v4/champion-masteries/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(List[champion_mastery_v4_ChampionMasteryDto]).validate_python(response.json())
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
async def get_champion_mastery_by_puuid(
|
|
46
|
+
self,
|
|
47
|
+
region: str,
|
|
48
|
+
|
|
49
|
+
championId: int,
|
|
50
|
+
|
|
51
|
+
encryptedPUUID: str,
|
|
52
|
+
|
|
53
|
+
) -> champion_mastery_v4_ChampionMasteryDto:
|
|
54
|
+
"""
|
|
55
|
+
Get a champion mastery by puuid and champion ID.
|
|
56
|
+
"""
|
|
57
|
+
path = "/lol/champion-mastery/v4/champion-masteries/by-puuid/{encryptedPUUID}/by-champion/{championId}"
|
|
58
|
+
# Replace path params
|
|
59
|
+
|
|
60
|
+
path = path.replace("{" + "championId" + "}", str(championId))
|
|
61
|
+
|
|
62
|
+
path = path.replace("{" + "encryptedPUUID" + "}", str(encryptedPUUID))
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
# Query params
|
|
66
|
+
params = {
|
|
67
|
+
|
|
68
|
+
}
|
|
69
|
+
# Filter None
|
|
70
|
+
params = {k: v for k, v in params.items() if v is not None}
|
|
71
|
+
|
|
72
|
+
response = await self.http.request(
|
|
73
|
+
method="GET",
|
|
74
|
+
url=path,
|
|
75
|
+
region_or_platform=region,
|
|
76
|
+
params=params
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
from pydantic import TypeAdapter
|
|
80
|
+
return TypeAdapter(champion_mastery_v4_ChampionMasteryDto).validate_python(response.json())
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
async def get_top_champion_masteries_by_puuid(
|
|
84
|
+
self,
|
|
85
|
+
region: str,
|
|
86
|
+
|
|
87
|
+
encryptedPUUID: str,
|
|
88
|
+
|
|
89
|
+
count: int = None,
|
|
90
|
+
|
|
91
|
+
) -> List[champion_mastery_v4_ChampionMasteryDto]:
|
|
92
|
+
"""
|
|
93
|
+
Get specified number of top champion mastery entries sorted by number of champion points descending.
|
|
94
|
+
"""
|
|
95
|
+
path = "/lol/champion-mastery/v4/champion-masteries/by-puuid/{encryptedPUUID}/top"
|
|
96
|
+
# Replace path params
|
|
97
|
+
|
|
98
|
+
path = path.replace("{" + "encryptedPUUID" + "}", str(encryptedPUUID))
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
# Query params
|
|
102
|
+
params = {
|
|
103
|
+
|
|
104
|
+
"count": count,
|
|
105
|
+
|
|
106
|
+
}
|
|
107
|
+
# Filter None
|
|
108
|
+
params = {k: v for k, v in params.items() if v is not None}
|
|
109
|
+
|
|
110
|
+
response = await self.http.request(
|
|
111
|
+
method="GET",
|
|
112
|
+
url=path,
|
|
113
|
+
region_or_platform=region,
|
|
114
|
+
params=params
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
from pydantic import TypeAdapter
|
|
118
|
+
return TypeAdapter(List[champion_mastery_v4_ChampionMasteryDto]).validate_python(response.json())
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
async def get_champion_mastery_score_by_puuid(
|
|
122
|
+
self,
|
|
123
|
+
region: str,
|
|
124
|
+
|
|
125
|
+
encryptedPUUID: str,
|
|
126
|
+
|
|
127
|
+
) -> int:
|
|
128
|
+
"""
|
|
129
|
+
Get a player's total champion mastery score, which is the sum of individual champion mastery levels.
|
|
130
|
+
"""
|
|
131
|
+
path = "/lol/champion-mastery/v4/scores/by-puuid/{encryptedPUUID}"
|
|
132
|
+
# Replace path params
|
|
133
|
+
|
|
134
|
+
path = path.replace("{" + "encryptedPUUID" + "}", str(encryptedPUUID))
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
# Query params
|
|
138
|
+
params = {
|
|
139
|
+
|
|
140
|
+
}
|
|
141
|
+
# Filter None
|
|
142
|
+
params = {k: v for k, v in params.items() if v is not None}
|
|
143
|
+
|
|
144
|
+
response = await self.http.request(
|
|
145
|
+
method="GET",
|
|
146
|
+
url=path,
|
|
147
|
+
region_or_platform=region,
|
|
148
|
+
params=params
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
from pydantic import TypeAdapter
|
|
152
|
+
return TypeAdapter(int).validate_python(response.json())
|
|
153
|
+
|
|
154
|
+
|