Giles, problems with that endpoint apart, don't we have all the information we need in the team match endpoint? I can't immediately see what the match/board endpoint adds.
Although I'm starting to see problems now I'm getting closer to writing my own script. For example pairing up the two players on each board in order to adjust team scores & allot penalty points for closed accounts. That's not to say it's particularly difficult to solve, just that it's going to be a bit clumsy.
Hi,
I'm using the per-board team match URL:
https://api.chess.com/pub/match/876452/13
That's a tricky example, as both players were closed for fair play violations.
The returned data begins:
That's all well and good, but:
1. The match from which this example comes is Oracle "team1" vs Canichess Alumni "team2" but the order has been reversed, as @bishop_ate was playing for Oracle and @nmarvel for Canichess Alumni (and <your favourite programming language>'s JSON support might or might not preserve order anyway)
2. If the two teams both clean out closed accounts then a lookup of their current team members will find neither name [Edit: closed accounts don't show in team member lists via api.chess.com, so this point is moot. ]
3. The solution should be to ignore "board_result" and look at the individual games, each of which is specified to include a "team" url for each player so that I know who belonged (or maybe belongs, but I don't want to care about "now", I care about when the match was started) just as the documentation says:
https://www.chess.com/news/view/published-data-api#pubapi-endpoint-match-board
Unfortunately, I'm not seeing the "team" included:
I can't tell about Canichess Alumni and @NMarvel, but I am an admin in Oracle and it appears that @Bishop_ate has been purged from the list of closed accounts.
Now I'm kinda stuck: the website can tell who played for which team, provide links to the games with the actual result, show the chess.com adjusted result in the match page ... but some of that data I don't see how to get to.
Background (may/may not help):
I am writing a script to score TMCL matches. TMCL has a cutoff date; before that date all results are provisional, and while it will rarely if ever make a difference I want to match the 2018 rules which give 0:0 when both accounts are closed due to fair play violations, so that my script matches people's manual checks, and believe me, some people will check!
There's also the fact that 0:0 might not be exactly the same as 1/2-1/2 when tie-breaks come into the picture, but that's not my problem today.