get_ladder_data: Ladder Data

Description Usage Arguments Note References See Also Examples

View source: R/game_data.R

Description

Provides data of players in a particular ladder. This includes MMR, points, win/loss record, time of joining, time of a player's last game, and more.

Usage

1
get_ladder_data(ladder_id, host_region = "us")

Arguments

ladder_id

A unique identifier for a particular ladder. With the exception of grandmaster, leagues (bronze, silver, etc.), are separated into tiers (1,2,3) which are further separated into divisions. These divisions, or ladders, each have a unique identifier.

host_region

The host region that the API call will be sent to. For get_ladder_data, the host region MUST be the region that the ladder is a part of. Must be one of "us", "eu", "kr", "tw", "cn". For more information on regionality, refer to Regionality and APIs.

Note

For get_ladder_data, the host region MUST be the region that the ladder is a part of.

References

See Also

Other game data API calls: get_league_data(), get_season_data()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
### Obtain battle tags and MMR of players in a particular ladder.

#Get full ladder data
try({
    data <- get_ladder_data(ladder_id = 289444, host_region = "us")

    # Player ratings
    ratings <- data$team$rating

    # Get battle tags using list indexing with sapply
    tags <- sapply(data$team$member, function(x) x$character_link$battle_tag)
})

SC2API documentation built on Oct. 23, 2020, 7:10 p.m.