get_season_data {SC2API}R Documentation

Season Data

Description

Provides start and ending times for a given season.

Usage

get_season_data(season_id, host_region = "us")

Arguments

season_id

A numeric argument indicating a particular ladder season. Currently, league data is only available for season 28 and higher (i.e. data prior to this season is inaccessible).

host_region

The host region that the API call will be sent to. For get_season_data, the host region affects the data you will receive (i.e. different regions will result in different data). Must be one of "us", "eu", "kr", "tw", "cn". For more information on regionality, refer to Regionality and APIs.

Note

Season data is only available for season 28 and higher.

References

See Also

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

Examples


# Get season start and end times for season 35 in the European region.
try({
    data <- get_season_data(season_id = 35, host_region = "eu")
    as.POSIXct(data$start_timestamp, origin = "1970-01-01")
    as.POSIXct(data$end_timestamp, origin = "1970-01-01")
})


[Package SC2API version 1.0.0 Index]