Skip to contents

Retrieves the daily rating history across performance types. Note that Lichess generates up-to-date rating history on-demand for authenticated requests.

Usage

lic_user_rating_history(username, perf_type = NULL, token = lic_token())

lic_rating_history(username, perf_type = NULL, token = lic_token())

Arguments

username

Lichess username.

perf_type

Optional filter for performance types (e.g. "bullet", "blitz").

token

API access token. By default, retrieved via lic_token().

Value

A tibble::tibble with columns username, perf, date, and rating.

Details

Lichess API Endpoint: GET /api/user/{username}/rating-history

Official Documentation: https://lichess.org/api#tag/Users/operation/apiUserRatingHistory

Rating history is generated on demand for authenticated requests (OAuth token). Unauthenticated requests return a cached version if available, otherwise an empty dataset.

Examples

lic_user_rating_history("h8gi", perf_type = "bullet")
#>  Rating history returned empty. Lichess requires an authenticated request (API
#>   token) to generate rating history on demand.
#>  Set `LICHESS_API_TOKEN` environment variable or provide `token` argument.
#> # A tibble: 0 × 4
#> # ℹ 4 variables: username <chr>, perf <chr>, date <date>, rating <int>