Endpoints¶
-
class
d2api.
APIWrapper
(api_key=None, parse_response=True)[source]¶ Wrapper initialization requires either environment variable
D2_API_KEY
be set, orapi_key
be provided as an argument.Parameters: - api_key (str) – Steam API key
- parse_response (bool, optional) – set to
False
to get an unparsed json string (defaultTrue
)
-
get_broadcaster_info
(**kwargs)[source]¶ Get the broadcasting status of a user.
Parameters: - account_id (int) – 32/64-bit account ID
- steam_account (SteamAccount) – Used in place of account_id
Return type:
-
get_game_items
(**kwargs)[source]¶ A list of items in Dota 2.
Parameters: language (string, optional) – The language to provide hero names in Return type: GameItems
-
get_heroes
(**kwargs)[source]¶ A list of heroes in Dota 2.
Parameters: - language (string, optional) –
The language to provide hero names in
- itemizedonly (bool, optional) – Return a list of itemized heroes only
Return type: - language (string, optional) –
-
get_live_league_games
(**kwargs)[source]¶ A list of in-progress league matches, as well as their details at the time of query.
Return type: LiveLeagueGames
-
get_match_details
(match_id, **kwargs)[source]¶ Detailed information about a particular match.
Parameters: match_id (int, string) – Match ID Return type: MatchDetails
-
get_match_history
(**kwargs)[source]¶ A list of matches, filterable by various parameters.
Parameters: - hero_id (int, optional) – A list of hero IDs can be fetched via the
get_heroes()
method - hero (Hero, optional) – Used in place of hero_id
- game_mode (int, optional) – Games of this game mode are fetched
- skill (int, optional) – Skill bracket for the matches (Ignored if an account ID is specified)
- min_players (int, optional) – Minimum amount of players in a match for the match to be returned.
- account_id (int, optional) – 32/64-bit account ID
- steam_account (SteamAccount, optional) – Used in place of account_id
- league_id (int, optional) – Only return matches from this league. get_league_listing() has been discontinued
- start_at_match_id (int, optional) – Start searching for matches equal to or older than this match ID
- matches_requested (int, optional) – Defaults to 100
- tournament_games_only (int, optional) – 0 = False, 1 = True
Return type: - hero_id (int, optional) – A list of hero IDs can be fetched via the
-
get_match_history_by_sequence_num
(**kwargs)[source]¶ A list of matches ordered by sequence number. Uses a parser similar to that of
get_match_history()
methodParameters: - start_at_match_seq_num (int) – The match sequence number to start returning results from
- matches_requested (int, optional) – Defaults to 100
Return type:
-
get_player_summaries
(**kwargs)[source]¶ Get Steam details of users.
Parameters: - account_ids (list(int)) – 32/64-bit account ID
- steam_accounts (list(SteamAccount)) – Used in place of account IDs
Return type:
-
get_team_info_by_team_id
(**kwargs)[source]¶ A list of teams’ information.
Parameters: - start_at_team_id (int, optional) – The team id to start returning results from
- teams_requested (int, optional) – The amount of teams to return
Return type:
-
get_top_live_game
(partner=0, **kwargs)[source]¶ Details of on-going live games.
Parameters: partner (int, optional) – Which partner’s games to use (default 0) Return type: TopLiveGame
-
get_tournament_prize_pool
(**kwargs)[source]¶ The current prizepool of specific tournaments.
Parameters: leagueid (int) – The ID of the league to get the prize pool of Return type: TournamentPrizePool