League of Legends¶
Player profile¶
import asyncio
from riotskillissue import PlatformRoute, RiotClient
async def main() -> None:
async with RiotClient(default_route=PlatformRoute.EUW1) as riot:
profile = await riot.lol.player_profile("Player#EUW")
print(profile.model_dump())
if __name__ == "__main__":
asyncio.run(main())
Match history¶
match_history resolves the account, requests the lightweight ID list, and
fetches details with bounded concurrency. The default is five summaries and the
accepted range is 1–20.
import asyncio
from riotskillissue import PlatformRoute, RiotClient
async def main() -> None:
async with RiotClient(default_route=PlatformRoute.EUW1) as riot:
history = await riot.lol.match_history("Player#EUW", count=5)
for match in history:
print(match.match_id, match.won, match.duration_seconds)
if __name__ == "__main__":
asyncio.run(main())
Champion mastery¶
import asyncio
from riotskillissue import PlatformRoute, RiotClient
async def main() -> None:
async with RiotClient(default_route=PlatformRoute.EUW1) as riot:
masteries = await riot.lol.champion_mastery("Player#EUW", count=10)
for mastery in masteries:
print(mastery)
if __name__ == "__main__":
asyncio.run(main())