Type: Package
Title: An R Steam API Client for Valve's Dota2
Version: 0.1.6
URL: https://github.com/LyzandeR/RDota2
BugReports: https://github.com/LyzandeR/RDota2/issues
Depends: R (≥ 3.2.0)
Imports: httr, jsonlite
Description: An R API Client for Valve's Dota2. RDota2 can be easily used to connect to the Steam API and retrieve data for Valve's popular video game Dota2. You can find out more about Dota2 at http://store.steampowered.com/app/570/.
License: MIT + file LICENSE
LazyData: TRUE
RoxygenNote: 5.0.1
Suggests: testthat, knitr, rmarkdown
VignetteBuilder: knitr
NeedsCompilation: no
Packaged: 2016-10-30 11:38:10 UTC; teoboot
Author: Theo Boutaris [aut, cre, cph]
Maintainer: Theo Boutaris <teoboot2007@hotmail.com>
Repository: CRAN
Date/Publication: 2016-10-30 16:58:04

Event Stats for Accounts

Description

Event Stats for Accounts.

Usage

get_event_stats_for_account(eventid, accountid, dota_id = 570,
  language = "en", key = NULL)

Arguments

eventid

The league id of the compendium.

accountid

The account id.

dota_id

Can take one of three values.

  • 570 - Dota 2 (default)

  • 816 - Dota 2 Internal Test

  • 205790 - Dota 2 Beta Test

language

The ISO639-1 language code for returning all the information in the corresponding language. If the language is not supported, english will be returned. For a complete list of the ISO639-1 language codes please visit https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes.

key

The api key obtained from Steam. If you don't have one please visit https://steamcommunity.com/dev in order to do so. For instructions on the correct way to use this key please visit https://github.com/LyzandeR/RDota2 and check the readme file. You can also see the examples. A key can be made available to all the functions by using key_actions. The key argument in individual functions should only be used in case the user needs to work with multiple keys.

Details

A list will be returned that contains three elements. The content, the url and the response received from the api. Event points and actions seem to be returned from the api but none of them have been documented in the api.

Value

A dota_api object containing the elements described in the details.

Steam API Documentation

https://wiki.teamfortress.com/wiki/WebAPI/GetEventStatsForAccount

Examples

## Not run: 
get_event_stats_for_account(eventid = 65006, accountid = 89550641)

## End(Not run)


Dota Items

Description

Dota Items.

Usage

get_game_items(dota_id = 570, language = "en", key = NULL)

Arguments

dota_id

Can take one of three values.

  • 570 - Dota 2 (default)

  • 816 - Dota 2 Internal Test

  • 205790 - Dota 2 Beta Test

language

The ISO639-1 language code for returning all the information in the corresponding language. If the language is not supported, english will be returned. For a complete list of the ISO639-1 language codes please visit https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes.

key

The api key obtained from Steam. If you don't have one please visit https://steamcommunity.com/dev in order to do so. For instructions on the correct way to use this key please visit https://github.com/LyzandeR/RDota2 and check the readme file. You can also see the examples. A key can be made available to all the functions by using key_actions. The key argument in individual functions should only be used in case the user needs to work with multiple keys.

Details

A list will be returned that contains three elements. The content, the url and the response received from the api.

The content element of the list contains a data.frame with all the items. Each row of the data.frame is an item and the following columns are included:

Value

A dota_api object containing the elements described in the details.

Steam API Documentation

https://wiki.teamfortress.com/wiki/WebAPI/GetGameItems

Examples

## Not run: 
get_game_items()
get_game_items(dota_id = 570, language = 'en', key = NULL)
get_game_items(dota_id = 570, language = 'en', key = 'xxxxxxxxxxx')

## End(Not run)


Dota Heroes

Description

A data.frame of Dota2 Heroes.

Usage

get_heroes(dota_id = 570, language = "en", key = NULL)

Arguments

dota_id

Can take one of three values.

  • 570 - Dota 2 (default)

  • 816 - Dota 2 Internal Test

  • 205790 - Dota 2 Beta Test

language

The ISO639-1 language code for returning all the information in the corresponding language. If the language is not supported, english will be returned. For a complete list of the ISO639-1 language codes please visit https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes.

key

The api key obtained from Steam. If you don't have one please visit https://steamcommunity.com/dev in order to do so. For instructions on the correct way to use this key please visit https://github.com/LyzandeR/RDota2 and check the readme file. You can also see the examples. A key can be made available to all the functions by using key_actions. The key argument in individual functions should only be used in case the user needs to work with multiple keys.

Details

A list will be returned that contains three elements. The content, the url and the response received from the api.

The content element of the list contains a data.frame with all the heroes. Each row of the data.frame is a hero and the following columns are included:

Value

A dota_api object containing the elements described in the details.

Steam API Documentation

https://wiki.teamfortress.com/wiki/WebAPI/GetHeroes

Examples

## Not run: 
get_heroes()
get_heroes(language = 'en', key = NULL)
get_heroes(language = 'en', key = 'xxxxxxxxxxx')

## End(Not run)


Icon Paths for items

Description

Icon Paths for items.

Usage

get_item_icon_path(iconname, icontype = c("0", "1", "3"), dota_id = 570,
  language = "en", key = NULL)

Arguments

iconname

The item icon name.

icontype

(optional) The type of image you want.

  • 0 - normal

  • 1 - large

  • 3 - ingame

dota_id

Can take one of three values.

  • 570 - Dota 2 (default)

  • 816 - Dota 2 Internal Test

  • 205790 - Dota 2 Beta Test

language

The ISO639-1 language code for returning all the information in the corresponding language. If the language is not supported, english will be returned. For a complete list of the ISO639-1 language codes please visit https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes.

key

The api key obtained from Steam. If you don't have one please visit https://steamcommunity.com/dev in order to do so. For instructions on the correct way to use this key please visit https://github.com/LyzandeR/RDota2 and check the readme file. You can also see the examples. A key can be made available to all the functions by using key_actions. The key argument in individual functions should only be used in case the user needs to work with multiple keys.

Details

A list will be returned that contains three elements. The content, the url and the response received from the api.

There is no documentation for the result of the request as it is still in the TODO (at the moment of writing). Please see the Steam API Documentation below.

Value

A dota_api object containing the elements described in the details.

Steam API Documentation

https://wiki.teamfortress.com/wiki/WebAPI/GetItemIconPath


Information about DotaTV-supported leagues

Description

Information about DotaTV-supported leagues.

Usage

get_league_listing(dota_id = 570, language = "en", key = NULL)

Arguments

dota_id

Can take one of three values.

  • 570 - Dota 2 (default)

  • 816 - Dota 2 Internal Test

  • 205790 - Dota 2 Beta Test

language

The ISO639-1 language code for returning all the information in the corresponding language. If the language is not supported, english will be returned. For a complete list of the ISO639-1 language codes please visit https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes.

key

The api key obtained from Steam. If you don't have one please visit https://steamcommunity.com/dev in order to do so. For instructions on the correct way to use this key please visit https://github.com/LyzandeR/RDota2 and check the readme file. You can also see the examples. A key can be made available to all the functions by using key_actions. The key argument in individual functions should only be used in case the user needs to work with multiple keys.

Details

A list will be returned that contains three elements. The content, the url and the response received from the api.

The content is probably the most useful part for the user since it is a data.frame containing the information about the DotaTV-supported leagues. It consists of the five following columns:

Value

A dota_api object containing the elements described in the details.

Steam API Documentation

https://wiki.teamfortress.com/wiki/WebAPI/GetLeagueListing

Examples

## Not run: 
get_league_listing()
get_league_listing(language = 'en', key = NULL)
get_league_listing(language = 'en', key = 'xxxxxxxxxxx')

## End(Not run)


Information about Live League Matches

Description

In-game League Matches and Information about them.

Usage

get_live_league_games(dota_id = 570, language = "en", key = NULL)

Arguments

dota_id

Can take one of three values.

  • 570 - Dota 2 (default)

  • 816 - Dota 2 Internal Test

  • 205790 - Dota 2 Beta Test

language

The ISO639-1 language code for returning all the information in the corresponding language. If the language is not supported, english will be returned. For a complete list of the ISO639-1 language codes please visit https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes.

key

The api key obtained from Steam. If you don't have one please visit https://steamcommunity.com/dev in order to do so. For instructions on the correct way to use this key please visit https://github.com/LyzandeR/RDota2 and check the readme file. You can also see the examples. A key can be made available to all the functions by using key_actions. The key argument in individual functions should only be used in case the user needs to work with multiple keys.

Details

A list will be returned that contains three elements. The content (a huge list with all the games), the url and the response received from the api.

The content element of the list contains a games list which has information about the live league games. Each element of the games list is a game. Each game consists of the following sections (list elements):

Value

A dota_api object containing the elements described in the details.

Steam API Documentation

https://wiki.teamfortress.com/wiki/WebAPI/GetLiveLeagueGames

Examples

## Not run: 
get_live_league_games()
get_live_league_games(language = 'en', key = NULL)
get_live_league_games(language = 'en', key = 'xxxxxxxxxxx')

## End(Not run)


Information about a specific match

Description

Player and Game information about a specific match ID.

Usage

get_match_details(match_id, dota_id = 570, language = "en", key = NULL)

Arguments

match_id

The match ID you want to get information about. Can be either numeric or .character

dota_id

Can take one of three values.

  • 570 - Dota 2 (default)

  • 816 - Dota 2 Internal Test

  • 205790 - Dota 2 Beta Test

language

The ISO639-1 language code for returning all the information in the corresponding language. If the language is not supported, english will be returned. For a complete list of the ISO639-1 language codes please visit https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes.

key

The api key obtained from Steam. If you don't have one please visit https://steamcommunity.com/dev in order to do so. For instructions on the correct way to use this key please visit https://github.com/LyzandeR/RDota2 and check the readme file. You can also see the examples. A key can be made available to all the functions by using key_actions. The key argument in individual functions should only be used in case the user needs to work with multiple keys.

Details

A list will be returned that contains three elements. The content, the url and the response received from the api.

The content element is a list that contains information about the players participating in a match and also information about the match. The first element of the content list contains information about the players. The following details are included:

The rest of the elements of the content list contain information about the match. The following details are included:

Value

A dota_api object containing the elements described in the details.

Steam API Documentation

https://wiki.teamfortress.com/wiki/WebAPI/GetMatchDetails

Examples

## Not run: 
get_match_details(match_id = 2686721815)
get_match_details(match_id = 2686721815, language = 'en', key = NULL)
get_match_details(match_id = 2686721815, language = 'en', key = 'xxxxxxxxxxx')

## End(Not run)


A list of Matches

Description

A list of matches based on various parameters.

Usage

get_match_history(hero_id = NULL, game_mode = NULL, skill = NULL,
  date_min = NULL, date_max = NULL, min_players = NULL,
  account_id = NULL, league_id = NULL, start_at_match_id = NULL,
  matches_requested = NULL, tournament_games_only = NULL, tz = "",
  dota_id = 570, language = "en", key = NULL)

Arguments

hero_id

(optional) The hero id. A list of hero ids can be found via the get_heroes function.

game_mode

(optional) The game mode:

  • 0 - None

  • 1 - All Pick

  • 2 - Captain's Mode

  • 3 - Random Draft

  • 4 - Single Draft

  • 5 - All Random

  • 6 - Intro

  • 7 - Diretide

  • 8 - Reverse Captain's Mode

  • 9 - The Greeviling

  • 10 - Tutorial

  • 11 - Mid Only

  • 12 - Least Played

  • 13 - New Player Pool

  • 14 - Compendium Matchmaking

  • 16 - Captain's Draft

No 15 does not exist

skill

(optional) Skill bracket.

  • 0 - Any

  • 1 - Normal

  • 2 - High

  • 3 - Very High

date_min

(optional) Minimum date range for returned matches (yyyy-mm-dd HH:MM:SS).

date_max

(optional) Maximum date range for returned matches (yyyy-mm-dd HH:MM:SS).

min_players

(optional) Minimum number of players in match.

account_id

(optional) Account ID.

league_id

(optional) League ID.

start_at_match_id

(optional) Matches equal or older than this ID.

matches_requested

(optional) Amount of matches to return (defaults to 25).

tournament_games_only

(optional) Binary (0 or 1). Whether to return tournament matches.

tz

A time zone specification if date_min and/or date_max are used. See as.POSIXct. "" (default) is the current time zone and "GMT" is UTC.

dota_id

Can take one of three values.

  • 570 - Dota 2 (default)

  • 816 - Dota 2 Internal Test

  • 205790 - Dota 2 Beta Test

language

The ISO639-1 language code for returning all the information in the corresponding language. If the language is not supported, english will be returned. For a complete list of the ISO639-1 language codes please visit https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes.

key

The api key obtained from Steam. If you don't have one please visit https://steamcommunity.com/dev in order to do so. For instructions on the correct way to use this key please visit https://github.com/LyzandeR/RDota2 and check the readme file. You can also see the examples. A key can be made available to all the functions by using key_actions. The key argument in individual functions should only be used in case the user needs to work with multiple keys.

Details

A list will be returned that contains three elements. The content, the url and the response received from the api.

The content element of the list contains a list called matches. Each element of matches list is a match. Each match contains the following sections:

Value

A dota_api object containing the elements described in the details.

Steam API Documentation

https://wiki.teamfortress.com/wiki/WebAPI/GetMatchHistory

Examples

## Not run: 
get_match_history(matches_requested = 2)
get_match_history(matches_requested = 2, date_min = '2015-01-01 16:00:00', hero_id = 1)
get_match_history(language = 'en', key = NULL)
get_match_history(language = 'en', key = 'xxxxxxxxxxx')

## End(Not run)


A list of Matches

Description

A list of matches ordered by a sequence number.

Usage

get_match_history_by_sequence_num(start_at_match_seq_num = NULL,
  matches_requested = NULL, dota_id = "570", language = "en",
  key = NULL)

Arguments

start_at_match_seq_num

(Optional) The match sequence number to start returning results from.

matches_requested

(Optional) The number of matches to return.

dota_id

Can take one of three values.

  • 570 - Dota 2 (default)

  • 816 - Dota 2 Internal Test

  • 205790 - Dota 2 Beta Test

language

The ISO639-1 language code for returning all the information in the corresponding language. If the language is not supported, english will be returned. For a complete list of the ISO639-1 language codes please visit https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes.

key

The api key obtained from Steam. If you don't have one please visit https://steamcommunity.com/dev in order to do so. For instructions on the correct way to use this key please visit https://github.com/LyzandeR/RDota2 and check the readme file. You can also see the examples. A key can be made available to all the functions by using key_actions. The key argument in individual functions should only be used in case the user needs to work with multiple keys.

Details

A list will be returned that contains three elements. The content, the url and the response received from the api.

The content element of the list contains information about the matches. Each match follows exactly the same structure as the match retrieved from get_match_details. Please check that function's help for detailed information.

Value

A dota_api object containing the elements described in the details.

Steam API Documentation

https://wiki.teamfortress.com/wiki/WebAPI/GetMatchHistoryBySequenceNum

Examples

## Not run: 
get_match_history_by_sequence_num()
get_match_history_by_sequence_num(matches_requested = 2, start_at_match_seq_num = 250)
get_match_history_by_sequence_num(language = 'en', key = NULL)
get_match_history_by_sequence_num(language = 'en', key = 'xxxxxxxxxxx')

## End(Not run)


Dota Store Item Rarities

Description

A data.frame of Dota2 Store Item Rarities.

Usage

get_rarities(dota_id = "570", language = "en", key = NULL)

Arguments

dota_id

Can take one of three values.

  • 570 - Dota 2 (default)

  • 816 - Dota 2 Internal Test

  • 205790 - Dota 2 Beta Test

language

The ISO639-1 language code for returning all the information in the corresponding language. If the language is not supported, english will be returned. For a complete list of the ISO639-1 language codes please visit https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes.

key

The api key obtained from Steam. If you don't have one please visit https://steamcommunity.com/dev in order to do so. For instructions on the correct way to use this key please visit https://github.com/LyzandeR/RDota2 and check the readme file. You can also see the examples. A key can be made available to all the functions by using key_actions. The key argument in individual functions should only be used in case the user needs to work with multiple keys.

Details

A list will be returned that contains three elements. The content, the url and the response received from the api.

The content element of the list contains a data.frame with all the store item rarities. Each row of the data.frame is an store item rarity and the following columns are included:

Value

A dota_api object containing the elements described in the details.

Steam API Documentation

https://wiki.teamfortress.com/wiki/WebAPI/GetRarities

Examples

## Not run: 
get_rarities(language = 'en', key = NULL)
get_rarities(language = 'en', key = 'xxxxxxxxxxx')

## End(Not run)


The engine of the request functions

Description

The function used to fetch the response content inside the the API functions.

Usage

get_response(dota_id, dota_api_method, dota_api_category, api_version, args)

Arguments

dota_id

Can take one of three values.

  • 570 - Dota 2 (default)

  • 816 - Dota 2 Internal Test

  • 205790 - Dota 2 Beta Test

dota_api_method

The api method.

dota_api_category

One of IDOTA2Match or IEconDOTA2.

api_version

The api version.

args

The query arguments for GET.

Details

This function is of no particular use to the user, but might be useful for anyone who would like to dive deeper into the package development. This function is used to GET the response's content from Steam's API. The function is the core function of the rest of the get_* family functions.

Value

A response to be used in the rest of the get_* family functions.


Scheduled League Games

Description

A list of scheduled league matches.

Usage

get_scheduled_league_games(date_min = NULL, date_max = NULL, tz = "",
  dota_id = "570", language = "en", key = NULL)

Arguments

date_min

(optional) A date of the format "yyyy-mm-dd HH:MM:SS". See examples for details. Return games from this date onwards.

date_max

(optional) A date of the format "yyyy-mm-dd HH:MM:SS". See examples for details. Return games up to this date

tz

A time zone specification if date_min and/or date_max are used. See as.POSIXct. "" (default) is the current time zone and "GMT" is UTC.

dota_id

Can take one of three values.

  • 570 - Dota 2 (default)

  • 816 - Dota 2 Internal Test

  • 205790 - Dota 2 Beta Test

language

The ISO639-1 language code for returning all the information in the corresponding language. If the language is not supported, english will be returned. For a complete list of the ISO639-1 language codes please visit https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes.

key

The api key obtained from Steam. If you don't have one please visit https://steamcommunity.com/dev in order to do so. For instructions on the correct way to use this key please visit https://github.com/LyzandeR/RDota2 and check the readme file. You can also see the examples. A key can be made available to all the functions by using key_actions. The key argument in individual functions should only be used in case the user needs to work with multiple keys.

Details

A list will be returned that contains three elements. The content, the url and the response received from the api.

The content element of the list contains a games list with information about the matches. Each element of the games list is a game. Each game consists of (some) of the following sections:

Value

A dota_api object containing the elements described in the details.

Steam API Documentation

https://wiki.teamfortress.com/wiki/WebAPI/GetScheduledLeagueGames

Examples

## Not run: 
get_scheduled_league_games()
get_scheduled_league_games(language = 'en', key = NULL)
get_scheduled_league_games(language = 'en', key = 'xxxxxxxxxxx')
get_scheduled_league_games(date_min = '2016-06-01 00:00:00',
                           date_max = '2016-09-07 00:00:00')

## End(Not run)


Team Information

Description

Team information from team id.

Usage

get_team_info_by_team_id(start_at_team_id = NULL, teams_requested = NULL,
  dota_id = 570, language = "en", key = NULL)

Arguments

start_at_team_id

(optional) Team id to start returning results from .

teams_requested

(optional) The number of teams to return.

dota_id

Can take one of three values.

  • 570 - Dota 2 (default)

  • 816 - Dota 2 Internal Test

  • 205790 - Dota 2 Beta Test

language

The ISO639-1 language code for returning all the information in the corresponding language. If the language is not supported, english will be returned. For a complete list of the ISO639-1 language codes please visit https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes.

key

The api key obtained from Steam. If you don't have one please visit https://steamcommunity.com/dev in order to do so. For instructions on the correct way to use this key please visit https://github.com/LyzandeR/RDota2 and check the readme file. You can also see the examples. A key can be made available to all the functions by using key_actions. The key argument in individual functions should only be used in case the user needs to work with multiple keys.

Details

A list will be returned that contains three elements. The content, the url and the response received from the api.

The content element of the list contains the teams list of which each element is a team. For each team different information is provided. Usually the following are included:

Value

A dota_api object containing the elements described in the details.

Steam API Documentation

https://wiki.teamfortress.com/wiki/WebAPI/GetTeamInfoByTeamID

Examples

## Not run: 
get_team_info_by_team_id()
get_team_info_by_team_id(teams_requested = 10)
get_team_info_by_team_id(language = 'en', key = NULL)
get_team_info_by_team_id(language = 'en', key = 'xxxxxxxxxxx')

## End(Not run)


Top Live Games

Description

Returns the top live games by MMR.

Usage

get_top_live_game(partner = 1, dota_id = 570, language = "en",
  key = NULL)

Arguments

partner

The documentation does not specify what this parameter should be but it seems like numbers from 1-3 return results of live games.

dota_id

Can take one of three values.

  • 570 - Dota 2 (default)

  • 816 - Dota 2 Internal Test

  • 205790 - Dota 2 Beta Test

language

The ISO639-1 language code for returning all the information in the corresponding language. If the language is not supported, english will be returned. For a complete list of the ISO639-1 language codes please visit https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes.

key

The api key obtained from Steam. If you don't have one please visit https://steamcommunity.com/dev in order to do so. For instructions on the correct way to use this key please visit https://github.com/LyzandeR/RDota2 and check the readme file. You can also see the examples. A key can be made available to all the functions by using key_actions. The key argument in individual functions should only be used in case the user needs to work with multiple keys.

Details

A list will be returned that contains three elements. The content, the url and the response received from the api.

The content element of the list contains a games_list list which contains information about the top live games. The following information is provided for each game (Categories are not documented at the time of the release - please check the Steam API Documentation link below:

Value

A dota_api object containing the elements described in the details.

Steam API Documentation

https://wiki.teamfortress.com/wiki/WebAPI/GetTopLiveGame

Examples

## Not run: 
get_top_live_game(partner = 1)
get_top_live_game(partner = 1, language = 'en', key = NULL)
get_top_live_game(partner = 2, language = 'en', key = 'xxxxxxxxxxx')

## End(Not run)


Tournament Player Stats

Description

Tournament Player Stats.

Usage

get_tournament_player_stats(account_id, league_id = NULL, hero_id = NULL,
  time_frame = NULL, dota_id = 570, language = "en", key = NULL)

Arguments

account_id

Player's account id.

league_id

(optional) The league id. Only the International is supported (65006).

hero_id

(optional) A hero id.

time_frame

(optional) Only return stats between this time frame (The parameter format is not yet known i.e. it is not in use just yet according to the API's documentation).

dota_id

Can take one of three values.

  • 570 - Dota 2 (default)

  • 816 - Dota 2 Internal Test

  • 205790 - Dota 2 Beta Test

language

The ISO639-1 language code for returning all the information in the corresponding language. If the language is not supported, english will be returned. For a complete list of the ISO639-1 language codes please visit https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes.

key

The api key obtained from Steam. If you don't have one please visit https://steamcommunity.com/dev in order to do so. For instructions on the correct way to use this key please visit https://github.com/LyzandeR/RDota2 and check the readme file. You can also see the examples. A key can be made available to all the functions by using key_actions. The key argument in individual functions should only be used in case the user needs to work with multiple keys.

Details

A list will be returned that contains three elements. The content, the url and the response received from the api.

The content element of the list contains information about the matches the player played and information about global stats.

Value

A dota_api object containing the elements described in the details.

Steam API Documentation

https://wiki.teamfortress.com/wiki/WebAPI/GetTournamentPlayerStats

Examples

## Not run: 
get_tournament_player_stats(account_id = 89550641, league_id = 65006)

## End(Not run)


Dota Tournament Prizes

Description

Dota Tournament Prizes.

Usage

get_tournament_prize_pool(leagueid = NULL, dota_id = 570, language = "en",
  key = NULL)

Arguments

leagueid

(optional) The league id to get prize information about.

dota_id

Can take one of three values.

  • 570 - Dota 2 (default)

  • 816 - Dota 2 Internal Test

  • 205790 - Dota 2 Beta Test

language

The ISO639-1 language code for returning all the information in the corresponding language. If the language is not supported, english will be returned. For a complete list of the ISO639-1 language codes please visit https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes.

key

The api key obtained from Steam. If you don't have one please visit https://steamcommunity.com/dev in order to do so. For instructions on the correct way to use this key please visit https://github.com/LyzandeR/RDota2 and check the readme file. You can also see the examples. A key can be made available to all the functions by using key_actions. The key argument in individual functions should only be used in case the user needs to work with multiple keys.

Details

A list will be returned that contains three elements. The content, the url and the response received from the api.

The content element of the list contains a data.frame tournament prizes. Each row of the data.frame is a tournament and the following columns are included:

Value

A dota_api object containing the elements described in the details.

Steam API Documentation

https://wiki.teamfortress.com/wiki/WebAPI/GetTournamentPrizePool

Examples

## Not run: 
get_tournament_prize_pool(leagueid = 40)
get_tournament_prize_pool(leagueid = 65006)
get_tournament_prize_pool(language = 'en', key = NULL)
get_tournament_prize_pool(language = 'en', key = 'xxxxxxxxxxx')

## End(Not run)


This function makes the key accessible to all functions.

Description

key_actions will allow the user to register (set), get (retrieve) or delete the key.

Usage

key_actions(action = c("register_key", "get_key", "delete_key"),
  value = NULL)

Arguments

action

Which action to perform. Check the details.

value

The steam key to use. It is used only in the register_key action. If you do not have a key, you can get one at https://steamcommunity.com/dev.

Details

There are three actions that can be performed in this function:

Value

A dota_api object containing the elements described in the details.

Examples

## Not run: 
key_actions(action = 'register_key', value = Sys.getenv('RDota_KEY'))
key_actions(action = 'register_key', value = 'xxxxxxxxxxxxx')
key_actions(action = 'get_key')
key_actions(action = 'delete_key')

## End(Not run)


print method for dota_api class

Description

print method for dota_api class

Usage

## S3 method for class 'dota_api'
print(x, ...)

Arguments

x

A dota_api object.

...

further arguments passed to or from other methods. See ?print.

Details

A method to print a dota_api object. Only the content will be printed on screen for a dota_api object because this is of interest to the user. The dota_api object will usually be a list of three elements containing the request url and the response apart from the content.

Value

Prints the content element of the dota_api list.