Identifiers nomenclature is changing at Sportradar, and this is highly relevant for users of Sportradar widgets.
Widgets follow old nomenclature, the tournament related properties are named tournamentId and uniqueTournamentId, but most backend data sources mentioned in this document already follow new nomenclature, where these two identifiers are respectively named simpleTournamentId and tournamentId
This means that if you get tournamentId from e.g. Coverage feed, you must pass it to a widget as uniqueTournamentId, and if you read simpleTournamentId from the same source, you pass it to a widget as tournamentId.
| property from API source | property passed to widgets |
|---|---|
simpleTournamentId | tournamentId |
tournamentId | uniqueTournamentId |
Below is a code example showing a hypothetical fetching of tourname properties from an API and passing them to the widget loading SIR() function.
// Browser example: call a REST endpoint, display results,
// then map tournamentId/simpleTournamentId for SIR().
async function loadTournamentData() {
const endpoint = "https://example-api.sportradar.com/tournament"; // this is a bogus exmaple endpoint
// Equivalent curl command for reference:
// curl -s "https://example-api.sportradar.com/tournament"
const response = await fetch(endpoint, {
method: "GET",
headers: {
Accept: "application/json",
},
});
if (!response.ok) {