RiotAPIClient
Bases: BaseClient
Riot API Client.
Resources | Support |
---|---|
League of Legends | ✅ |
Legends of Runeterra | ✅ |
Teamfight Tactics | ✅ |
Valorant | ✅ |
Example:
async with RiotAPIClient(
default_headers={"X-Riot-Token": <API_KEY>}
) as client:
account = await client.get_account_v1_by_riot_id(region="americas", game_name="200", tag_line="16384")
summoner = await client.get_lol_summoner_v4_by_puuid(region="na1", puuid=account["puuid"])
assert summoner["summonerLevel"] > 200
Source code in pulsefire/clients.py
329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 |
|
Attributes
Region
class-attribute
instance-attribute
Region = (
Literal[
"americas",
"europe",
"asia",
"sea",
"esports",
"br1",
"eun1",
"euw1",
"jp1",
"kr",
"la1",
"la2",
"me1",
"na1",
"oc1",
"tr1",
"ru",
"ph2",
"sg2",
"th2",
"tw2",
"vn2",
"ap",
"br",
"eu",
"kr",
"latam",
"na",
]
| _str
)
Functions
__init__
__init__(
*,
base_url: str = "https://{region}.api.riotgames.com",
default_params: dict[str, Any] = {},
default_headers: dict[str, str] = {"X-Riot-Token": ""},
default_queries: dict[str, str] = {},
middlewares: list[Middleware] = [
json_response_middleware(),
http_error_middleware(),
rate_limiter_middleware(RiotAPIRateLimiter()),
]
) -> None
Source code in pulsefire/clients.py
get_account_v1_by_puuid
async
get_account_v1_by_riot_id
async
get_account_v1_me
async
get_account_v1_active_shard_by_puuid
async
get_lol_champion_v3_rotation
async
get_lol_champion_v4_mastery_by_summoner
async
get_lol_champion_v4_mastery_by_summoner(
*,
region: Region = ...,
summoner_id: str = ...,
champion_id: int = ...
) -> RiotAPISchema.LolChampionV4Mastery
Source code in pulsefire/clients.py
get_lol_champion_v4_masteries_by_summoner
async
get_lol_champion_v4_top_masteries_by_summoner
async
get_lol_champion_v4_top_masteries_by_summoner(
*, region: Region = ..., summoner_id: str = ...
) -> list[RiotAPISchema.LolChampionV4Mastery]
Source code in pulsefire/clients.py
get_lol_champion_v4_mastery_score_by_summoner
async
get_lol_champion_v4_mastery_by_puuid
async
get_lol_champion_v4_mastery_by_puuid(
*, region: Region = ..., puuid: str = ..., champion_id: int = ...
) -> RiotAPISchema.LolChampionV4Mastery
Source code in pulsefire/clients.py
get_lol_champion_v4_masteries_by_puuid
async
get_lol_champion_v4_top_masteries_by_puuid
async
get_lol_champion_v4_mastery_score_by_puuid
async
get_lol_clash_v1_players_by_summoner
async
get_lol_clash_v1_players_by_puuid
async
get_lol_clash_v1_team
async
get_lol_clash_v1_tournament_by_team
async
get_lol_clash_v1_tournament
async
get_lol_clash_v1_tournaments
async
get_lol_league_v4_entries_by_summoner
async
get_lol_league_v4_challenger_league_by_queue
async
get_lol_league_v4_grandmaster_league_by_queue
async
get_lol_league_v4_master_league_by_queue
async
get_lol_league_v4_entries_by_division
async
get_lol_league_v4_entries_by_division(
*,
region: Region = ...,
queue: str = ...,
tier: str = ...,
division: str = ...,
queries: dict = {"page": 1}
) -> list[RiotAPISchema.LolLeagueV4LeagueFullEntry]
Source code in pulsefire/clients.py
get_lol_league_v4_league
async
get_lol_match_v5_match
async
get_lol_match_v5_match_timeline
async
get_lol_match_v5_match_ids_by_puuid
async
get_lol_spectator_v4_active_game_by_summoner
async
get_lol_spectator_v4_featured_games
async
get_lol_spectator_v5_active_game_by_summoner
async
get_lol_spectator_v5_featured_games
async
get_lol_status_v4_platform_data
async
get_lol_summoner_v4_by_id
async
get_lol_summoner_v4_by_name
async
get_lol_summoner_v4_by_puuid
async
get_lol_summoner_v4_me
async
get_lol_summoner_v4_by_rso_puuid
async
get_tft_league_v1_entries_by_summoner
async
get_tft_league_v1_challenger_league
async
get_tft_league_v1_grandmaster_league
async
get_tft_league_v1_master_league
async
get_tft_league_v1_entries_by_division
async
get_tft_league_v1_entries_by_division(
*,
region: Region = ...,
tier: str = ...,
division: str = ...,
queries: dict = {"page": 1}
) -> list[RiotAPISchema.TftLeagueV1LeagueFullEntry]