lichess-org / api

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

Fix challengeCreate #277

Closed SergioGlorias closed 6 months ago

SergioGlorias commented 10 months ago

Can't choose any time

niklasf commented 10 months ago

If I understand correctly there are more valid choices:

https://github.com/lichess-org/lila/blob/2c8ea10841badf237ccbd33e1e47368248e5ecee/modules/setup/src/main/ApiConfig.scala#L43-L44

SergioGlorias commented 10 months ago

I've tried to base it as it is on creating the Swiss tournament

https://github.com/lichess-org/api/blob/master/doc/specs/lichess-api.yaml#L2771-L2808

I tried to create some invitations yesterday and only those with that time were accepted

benediktwerner commented 10 months ago

No, for example 960 also works and isn't on the list. If you check the code Niklas linked to, it allows all full minutes between 2 and 180 (in addition to the list of partial minutes at the start). Most of those are missing from the list and those are probably a bit too many options to list them completely in the docs, so it probably makes more sense to mention the restrictions in the description of the parameter.