Learn R Programming

vald.extractor (version 0.1.1)

fetch_vald_metadata: Retrieve Athlete Profiles and Group Assignments

Description

Authenticates with VALD API using OAuth2 client credentials flow and retrieves complete athlete profile and group membership data. This function handles token management, pagination, and robust JSON parsing.

Usage

fetch_vald_metadata(
  client_id,
  client_secret,
  tenant_id,
  region = "aue",
  verbose = TRUE
)

Value

A list containing two data frames:

profiles

Complete athlete profile data

groups

Group/team membership data

Arguments

client_id

Character. Your VALD API client ID.

client_secret

Character. Your VALD API client secret.

tenant_id

Character. Your VALD tenant ID.

region

Character. VALD region code (e.g., "aue" for Australia East). Default is "aue".

verbose

Logical. If TRUE, prints progress messages. Default is TRUE.

Details

Fetch VALD Metadata via OAuth2

Examples

Run this code
# \donttest{
if (FALSE) {
  metadata <- fetch_vald_metadata(
    client_id = "your_client_id",
    client_secret = "your_client_secret",
    tenant_id = "your_tenant_id"
  )

  profiles <- metadata$profiles
  groups <- metadata$groups
}
# }

Run the code above in your browser using DataLab