It is but it seems to be a problem with the tournament endpoint so it wont work.
Tournament url-id
the endpoint for tournaments that are in progress, registered, or finished is https://api.chess.com/pub/player/{username}/tournaments
data format:
{
"finished": [
{
"url": "URL", // link to the PubAPI URL of the tournament
"@id": "URL", // link to the Web URL of the tournament
"wins": 3, //number of wins
"losses": 5, //number of losses
"draws": 0, //number of draws
"points_awarded": 0, //pints awarded
"placement": 4, //placement
"status": "eliminated", //final status of the player in this tourmanent {winner, eliminated, withdrew, removed}
"total_players": 5 //number of total players
} /* array of finished tournaments */
],
"in_progress": [
{
"url": "URL", // link to the PubAPI URL of the tournament
"@id": "URL", // link to the Web URL of the tournament
"status": "eliminated", //final status of the player in this tourmanent {winner, eliminated, withdrew, removed}
} /* array of in progress tournaments */
],
"registered": [
{
"url": "URL", // link to the PubAPI URL of the tournament
"@id": "URL", // link to the Web URL of the tournament
"status": "invited" //current status of user {invited, registered}
} /* array of registered tournaments */
]
}
Tournament urls are like this: https://www.chess.com/tournament/2020-chess-com-daily-chess-championship
https://www.chess.com/tournament/chess-animals-division-3
the @id is: https://api.chess.com/pub/tournament/2020-chess-com-daily-chess-championship
https://api.chess.com/pub/tournament/sahf-3-championship-1079749
the endpoint for tournaments that are in progress, registered, or finished is https://api.chess.com/pub/player/{username}/tournaments
data format:
That's very useful thanks all.
{ "finished": [ { "url": "URL", // link to the PubAPI URL of the tournament "@id": "URL", // link to the Web URL of the tournament "wins": 3, //number of wins "losses": 5, //number of losses "draws": 0, //number of draws "points_awarded": 0, //pints awarded "placement": 4, //placement "status": "eliminated", //final status of the player in this tourmanent {winner, eliminated, withdrew, removed} "total_players": 5 //number of total players } /* array of finished tournaments */ ], "in_progress": [ { "url": "URL", // link to the PubAPI URL of the tournament "@id": "URL", // link to the Web URL of the tournament "status": "eliminated", //final status of the player in this tourmanent {winner, eliminated, withdrew, removed} } /* array of in progress tournaments */ ], "registered": [ { "url": "URL", // link to the PubAPI URL of the tournament "@id": "URL", // link to the Web URL of the tournament "status": "invited" //current status of user {invited, registered} } /* array of registered tournaments */ ] }
Apologies if this is obvious but how do I find a live tournament's url-id?
For example, for the recent women's SCC the tournament url is this:
https://www.chess.com/live#t=1273143
But I don't think that's the same as the url-id?
Thanks in advance!