bundle.marvel_rivals.client¶
Typed Marvel Rivals player statistics and a reusable HTTP client.
Attributes¶
Exceptions¶
A player lookup failed without exposing provider internals. |
Classes¶
API model with stable, canonical Data serialization. |
|
Shared combat statistics for ranked matches and individual heroes. |
|
Hero performance shares the same combat model as ranked totals. |
|
Player overview with aliases for the API's nested response shape. |
|
A playable hero from the public roster. |
|
Global hero totals; the API does not provide a season filter. |
|
A dated game or balance update. |
|
One lazy HTTP connection pool shared by every bot command. |
Module Contents¶
- bundle.marvel_rivals.client.API_BASE_URL = 'https://marvelrivalsapi.com/api/v1'¶
- exception bundle.marvel_rivals.client.MarvelRivalsError[source]¶
Bases:
RuntimeErrorA player lookup failed without exposing provider internals.
- class bundle.marvel_rivals.client.MarvelData(/, **data: Any)[source]¶
Bases:
bundle.core.data.DataAPI model with stable, canonical Data serialization.
- model_config¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class bundle.marvel_rivals.client.MatchStats(/, **data: Any)[source]¶
Bases:
MarvelDataShared combat statistics for ranked matches and individual heroes.
- class bundle.marvel_rivals.client.HeroStats(/, **data: Any)[source]¶
Bases:
MatchStatsHero performance shares the same combat model as ranked totals.
- class bundle.marvel_rivals.client.PlayerStats(/, **data: Any)[source]¶
Bases:
MarvelDataPlayer overview with aliases for the API’s nested response shape.
- ranked: MatchStats¶
- classmethod from_api(payload: Any, *, season: int | None = None) PlayerStats[source]¶
Validate provider data without manual field-by-field copying.
- class bundle.marvel_rivals.client.Champion(/, **data: Any)[source]¶
Bases:
MarvelDataA playable hero from the public roster.
- class bundle.marvel_rivals.client.ChampionStats(/, **data: Any)[source]¶
Bases:
MatchStatsGlobal hero totals; the API does not provide a season filter.
- class bundle.marvel_rivals.client.Patch(/, **data: Any)[source]¶
Bases:
MarvelDataA dated game or balance update.
- class bundle.marvel_rivals.client.MarvelRivalsClient(api_key: str)[source]¶
One lazy HTTP connection pool shared by every bot command.
- api_key¶
- async player(uid: str, *, season: int | None = None) PlayerStats[source]¶
Retrieve ranked statistics by numeric player UID.
- async champion_stats(query: str) ChampionStats[source]¶
Global hero aggregates by name or numeric ID.