valo_api package

Subpackages

Submodules

valo_api.config module

Classes:

Config()

class Config

Bases: object

Attributes:

USER_AGENT

BASE_URL

ALL_REGIONS

ALL_COUNTRY_CODES

ALL_LOCALS

USER_AGENT: str = 'Python Valorant API Wrapper'
BASE_URL: str = 'https://api.henrikdev.xyz'
ALL_REGIONS: List[str] = ['eu', 'na', 'ap', 'kr', 'latam', 'br']
ALL_COUNTRY_CODES = ['en-us', 'en-gb', 'de-de', 'es-es', 'fr-fr', 'it-it', 'ru-ru', 'tr-tr', 'es-mx', 'ja-jp', 'pt-br', 'vi-vn']
ALL_LOCALS = ['ar-AE', 'de-DE', 'en-US', 'es-ES', 'es-MX', 'fr-FR', 'id-ID', 'it-IT', 'ja-JP', 'ko-KR', 'pl-PL', 'pt-BR', 'ru-RU', 'th-TH', 'tr-TR', 'vi-VN', 'zh-CN', 'zh-TW']

valo_api.endpoint module

Functions:

response_type(api_type)

Classes:

Endpoint(path, f_name, return_type[, ...])

response_type(api_type)
class Endpoint(path, f_name, return_type, versions=('v1',), method='GET', kwargs=None, query_args=None, data_response=True)

Bases: Generic[R]

Attributes:

path

f_name

return_type

versions

method

kwargs

query_args

data_response

Methods:

endpoint_wrappers()

_get_endpoint_wrapper([version, async_function])

recursive_typing_get_args(type_)

build_query_args(**kwargs)

_get_endpoint(*args, **kwargs)

_get_endpoint_async(*args, **kwargs)

parse_response(response, content)

path: str
f_name: str
return_type: TypeVar(R)
versions: Iterable[str] = ('v1',)
method: str = 'GET'
kwargs: Optional[OrderedDict[str, Type]] = None
query_args: Optional[OrderedDict[str, str]] = None
data_response: bool = True
endpoint_wrappers()
Return type:

Iterable[Tuple[str, Callable[..., Union[TypeVar(R), Awaitable[TypeVar(R)]]]]]

_get_endpoint_wrapper(version=None, async_function=False)
Return type:

Callable[..., Union[TypeVar(R), Awaitable[TypeVar(R)]]]

recursive_typing_get_args(type_)
Return type:

str

build_query_args(**kwargs)
_get_endpoint(*args, **kwargs)
Return type:

TypeVar(R)

async _get_endpoint_async(*args, **kwargs)
Return type:

TypeVar(R)

parse_response(response, content)
Return type:

TypeVar(R)

valo_api.endpoints_config module

Classes:

EndpointsConfig(value)

An enumeration.

class EndpointsConfig(value)

Bases: Enum

An enumeration.

Attributes:

RAW_MATCH_DETAILS

RAW_MATCH_HISTORY

RAW_MMR

RAW_COMPETITIVE_UPDATES

CONTENT

STORE_FEATURED

STORE_OFFERS

STATUS

VERSION_INFO

WEBSITE

LEADERBOARD

ACCOUNT_BY_NAME

ACCOUNT_BY_PUUID

MATCH_DETAILS

MMR_DETAILS_BY_PUUID

MMR_DETAILS_BY_NAME

MMR_HISTORY_BY_PUUID

MMR_HISTORY_BY_NAME

MATCH_HISTORY_BY_PUUID

MATCH_HISTORY_BY_NAME

LIFETIME_MATCHES_BY_PUUID

LIFETIME_MATCHES_BY_NAME

CROSSHAIR

RAW_MATCH_DETAILS = Endpoint(path='/valorant/{version}/raw', f_name='get_raw_match_details_data', return_type=<class 'valo_api.responses.match_details_raw.MatchDetailsRawV1'>, versions=('v1',), method='POST', kwargs=OrderedDict([('version', <class 'str'>), ('value', typing.Optional[str]), ('region', typing.Optional[str]), ('queries', typing.Optional[dict])]), query_args=OrderedDict([('type', 'matchdetails'), ('value', '{value}'), ('region', '{region}'), ('queries', '{queries}')]), data_response=False)
RAW_MATCH_HISTORY = Endpoint(path='/valorant/{version}/raw', f_name='get_raw_match_history_data', return_type=<class 'valo_api.responses.match_history_raw.MatchHistoryRawV1'>, versions=('v1',), method='POST', kwargs=OrderedDict([('version', <class 'str'>), ('value', typing.Optional[str]), ('region', typing.Optional[str]), ('queries', typing.Optional[dict])]), query_args=OrderedDict([('type', 'matchhistory'), ('value', '{value}'), ('region', '{region}'), ('queries', '{queries}')]), data_response=False)
RAW_MMR = Endpoint(path='/valorant/{version}/raw', f_name='get_raw_mmr_data', return_type=<class 'valo_api.responses.mmr_raw.MMRRawV1'>, versions=('v1',), method='POST', kwargs=OrderedDict([('version', <class 'str'>), ('value', typing.Optional[str]), ('region', typing.Optional[str]), ('queries', typing.Optional[dict])]), query_args=OrderedDict([('type', 'mmr'), ('value', '{value}'), ('region', '{region}'), ('queries', '{queries}')]), data_response=False)
RAW_COMPETITIVE_UPDATES = Endpoint(path='/valorant/{version}/raw', f_name='get_raw_competitive_updates_data', return_type=<class 'valo_api.responses.competitive_updates_raw.CompetitiveUpdatesRawV1'>, versions=('v1',), method='POST', kwargs=OrderedDict([('version', <class 'str'>), ('value', typing.Optional[str]), ('region', typing.Optional[str]), ('queries', typing.Optional[dict])]), query_args=OrderedDict([('type', 'competitiveupdates'), ('value', '{value}'), ('region', '{region}'), ('queries', '{queries}')]), data_response=False)
CONTENT = Endpoint(path='/valorant/{version}/content', f_name='get_content', return_type=<class 'valo_api.responses.content.ContentV1'>, versions=('v1',), method='GET', kwargs=OrderedDict([('version', <class 'str'>), ('locale', typing.Optional[str])]), query_args=OrderedDict([('locale', '{locale}')]), data_response=False)
STORE_OFFERS = Endpoint(path='/valorant/{version}/store-offers', f_name='get_store_offers', return_type=<class 'valo_api.responses.store_offers.StoreOffersV2'>, versions=['v2'], method='GET', kwargs=OrderedDict([('version', <class 'str'>)]), query_args=None, data_response=True)
STATUS = Endpoint(path='/valorant/{version}/status/{region}', f_name='get_status', return_type=<class 'valo_api.responses.status.StatusV1'>, versions=('v1',), method='GET', kwargs=OrderedDict([('version', <class 'str'>), ('region', <class 'str'>)]), query_args=None, data_response=True)
VERSION_INFO = Endpoint(path='/valorant/{version}/version/{region}', f_name='get_version_info', return_type=<class 'valo_api.responses.version_info.VersionInfoV1'>, versions=('v1',), method='GET', kwargs=OrderedDict([('version', <class 'str'>), ('region', <class 'str'>)]), query_args=None, data_response=True)
WEBSITE = Endpoint(path='/valorant/{version}/website/{countrycode}', f_name='get_website', return_type=typing.List[valo_api.responses.website.WebsiteBannerV1], versions=('v1',), method='GET', kwargs=OrderedDict([('version', <class 'str'>), ('countrycode', <class 'str'>)]), query_args=None, data_response=True)
LEADERBOARD = Endpoint(path='/valorant/{version}/leaderboard/{region}', f_name='get_leaderboard', return_type=typing.Union[valo_api.responses.leaderboard.LeaderboardV2, typing.List[valo_api.responses.leaderboard.LeaderboardPlayerV1]], versions=['v1', 'v2'], method='GET', kwargs=OrderedDict([('version', <class 'str'>), ('region', <class 'str'>), ('puuid', typing.Optional[str]), ('name', typing.Optional[str]), ('tag', typing.Optional[str]), ('season_id', typing.Optional[str]), ('start', typing.Optional[int])]), query_args=OrderedDict([('puuid', '{puuid}'), ('name', '{name}'), ('tag', '{tag}'), ('season_id', '{season_id}'), ('start', '{start}')]), data_response=False)
ACCOUNT_BY_NAME = Endpoint(path='/valorant/{version}/account/{name}/{tag}', f_name='get_account_details_by_name', return_type=<class 'valo_api.responses.account_details.AccountDetailsV1'>, versions=('v1',), method='GET', kwargs=OrderedDict([('version', <class 'str'>), ('name', <class 'str'>), ('tag', <class 'str'>), ('force_update', <class 'bool'>)]), query_args=OrderedDict([('force', '{force_update}')]), data_response=True)
ACCOUNT_BY_PUUID = Endpoint(path='/valorant/{version}/by-puuid/account/{puuid}', f_name='get_account_details_by_puuid', return_type=<class 'valo_api.responses.account_details.AccountDetailsV1'>, versions=('v1',), method='GET', kwargs=OrderedDict([('version', <class 'str'>), ('puuid', <class 'str'>), ('force_update', <class 'bool'>)]), query_args=OrderedDict([('force', '{force_update}')]), data_response=True)
MATCH_DETAILS = Endpoint(path='/valorant/{version}/match/{match_id}', f_name='get_match_details', return_type=<class 'valo_api.responses.match_history.MatchHistoryPointV3'>, versions=['v2'], method='GET', kwargs=OrderedDict([('version', <class 'str'>), ('match_id', <class 'str'>)]), query_args=None, data_response=True)
MMR_DETAILS_BY_PUUID = Endpoint(path='/valorant/{version}/by-puuid/mmr/{region}/{puuid}', f_name='get_mmr_details_by_puuid', return_type=<class 'valo_api.responses.mmr_details.MMRDetailsV2'>, versions=['v1', 'v2'], method='GET', kwargs=OrderedDict([('version', <class 'str'>), ('region', <class 'str'>), ('puuid', <class 'str'>)]), query_args=None, data_response=True)
MMR_DETAILS_BY_NAME = Endpoint(path='/valorant/{version}/mmr/{region}/{name}/{tag}', f_name='get_mmr_details_by_name', return_type=<class 'valo_api.responses.mmr_details.MMRDetailsV2'>, versions=['v2'], method='GET', kwargs=OrderedDict([('version', <class 'str'>), ('region', <class 'str'>), ('name', <class 'str'>), ('tag', <class 'str'>)]), query_args=None, data_response=True)
MMR_HISTORY_BY_PUUID = Endpoint(path='/valorant/{version}/by-puuid/mmr-history/{region}/{puuid}', f_name='get_mmr_history_by_puuid', return_type=typing.List[valo_api.responses.mmr_history.MMRHistoryPointV1], versions=('v1',), method='GET', kwargs=OrderedDict([('version', <class 'str'>), ('region', <class 'str'>), ('puuid', <class 'str'>)]), query_args=None, data_response=True)
MMR_HISTORY_BY_NAME = Endpoint(path='/valorant/{version}/mmr-history/{region}/{name}/{tag}', f_name='get_mmr_history_by_name', return_type=typing.List[valo_api.responses.mmr_history.MMRHistoryPointV1], versions=('v1',), method='GET', kwargs=OrderedDict([('version', <class 'str'>), ('region', <class 'str'>), ('name', <class 'str'>), ('tag', <class 'str'>)]), query_args=None, data_response=True)
MATCH_HISTORY_BY_PUUID = Endpoint(path='/valorant/{version}/by-puuid/matches/{region}/{puuid}', f_name='get_match_history_by_puuid', return_type=typing.List[valo_api.responses.match_history.MatchHistoryPointV3], versions=['v3'], method='GET', kwargs=OrderedDict([('version', <class 'str'>), ('region', <class 'str'>), ('puuid', <class 'str'>), ('size', typing.Optional[int]), ('map', typing.Optional[str]), ('game_mode', typing.Optional[str])]), query_args=OrderedDict([('size', '{size}'), ('map', '{map}'), ('filter', '{game_mode}')]), data_response=True)
MATCH_HISTORY_BY_NAME = Endpoint(path='/valorant/{version}/matches/{region}/{name}/{tag}', f_name='get_match_history_by_name', return_type=typing.List[valo_api.responses.match_history.MatchHistoryPointV3], versions=['v3'], method='GET', kwargs=OrderedDict([('version', <class 'str'>), ('region', <class 'str'>), ('name', <class 'str'>), ('tag', <class 'str'>), ('size', typing.Optional[int]), ('map', typing.Optional[str]), ('game_mode', typing.Optional[str])]), query_args=OrderedDict([('size', '{size}'), ('map', '{map}'), ('filter', '{game_mode}')]), data_response=True)
LIFETIME_MATCHES_BY_PUUID = Endpoint(path='/valorant/{version}/by-puuid/lifetime/matches/{region}/{puuid}', f_name='get_lifetime_matches_by_puuid', return_type=typing.List[valo_api.responses.lifetime_match.LifetimeMatchV1], versions=('v1',), method='GET', kwargs=OrderedDict([('version', <class 'str'>), ('region', <class 'str'>), ('puuid', <class 'str'>), ('mode', typing.Optional[str]), ('map', typing.Optional[str]), ('page', typing.Optional[int]), ('size', typing.Optional[int])]), query_args=OrderedDict([('mode', '{mode}'), ('map', '{map}'), ('page', '{page}'), ('size', '{size}')]), data_response=True)
LIFETIME_MATCHES_BY_NAME = Endpoint(path='/valorant/{version}/lifetime/matches/{region}/{name}/{tag}', f_name='get_lifetime_matches_by_name', return_type=typing.List[valo_api.responses.lifetime_match.LifetimeMatchV1], versions=('v1',), method='GET', kwargs=OrderedDict([('version', <class 'str'>), ('region', <class 'str'>), ('name', <class 'str'>), ('tag', <class 'str'>), ('mode', typing.Optional[str]), ('map', typing.Optional[str]), ('page', typing.Optional[int]), ('size', typing.Optional[int])]), query_args=OrderedDict([('mode', '{mode}'), ('map', '{map}'), ('page', '{page}'), ('size', '{size}')]), data_response=True)
CROSSHAIR = Endpoint(path='/valorant/{version}/crosshair/generate', f_name='get_crosshair', return_type=<class 'PIL.Image.Image'>, versions=('v1',), method='GET', kwargs=OrderedDict([('version', <class 'str'>), ('crosshair_id', <class 'str'>)]), query_args=OrderedDict([('id', '{crosshair_id}')]), data_response=True)

Module contents

This is a Valorant API Wrapper for https://github.com/Henrik-3/unofficial-valorant-api

Functions:

set_api_key(api_key)

Sets the API key to use for all API requests.

set_api_key(api_key)

Sets the API key to use for all API requests.

Parameters:

api_key (str) – The API key to use.