get_ladder_data {SC2API}R Documentation

Ladder Data

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

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


### 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)
})


[Package SC2API version 1.0.0 Index]