lichess-org / api

Lichess API documentation and examples
https://lichess.org/api
GNU Affero General Public License v3.0
442 stars 147 forks source link

fix arena tournament example #202

Closed schlawg closed 2 years ago

benediktwerner commented 2 years ago

This is actually not so simple. The reason it's currently wrong is because the tournament object is referenced in multiple endpoints even though their responses aren't always the same. The "tournaments of the team" endpoint does return variants like it is currently documented.

Realistically, the proper solution would be to check the source code and properly document the responses for all the endpoints. I've started doing this on a train ride a little while ago but haven't really gotten around to finishing it.

But I guess you could at least make it two examples for now and ideally just make a real call to each endpoint and use that as the example for each.

schlawg commented 2 years ago

for compatibility i guess this should not be changed, but out of curiosity is there a reason for the difference?

schlawg commented 2 years ago

I just took a look at tournament/ApiJsonView and tournament/JsonView. I think I will wait for your next train ride.

schlawg commented 2 years ago

hope this helps for now