Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API: /api/challenge/open response doesn't match the documentation #868

Open
Pikrass opened this issue Sep 27, 2024 · 0 comments
Open

API: /api/challenge/open response doesn't match the documentation #868

Pikrass opened this issue Sep 27, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@Pikrass
Copy link

Pikrass commented Sep 27, 2024

Exact URL where the bug happened

https://lishogi.org/api/challenge/open

Steps to reproduce the bug

Make a request to the endpoint. Mine is a POST request with "Accept: application/json" and the following parameters in the body as a x-www-form-urlencoded:

rated=true
clock.limit=1800
clock.byoyomi=60
clock.increment=0
clock.periods=1
variant=standard

What did you expect to happen?

The documentation specifies an output where "urlSente" and "urlGote" are on the same level as other challenge parameters.

What happened instead?

This is the output I get:

{

	"challenge": {
		"id": "kq0A2SEO",
		"url": "https://lishogi.org/kq0A2SEO",
		"status": "created",
		"challenger": null,
		"destUser": null,
		"variant":  {
			"key": "standard",
			"name": "Standard"
		},
		"rated": false,
		"speed": "classical",
		"timeControl":  {
			"type": "clock",
			"limit": 1800,
			"increment": 0,
			"byoyomi": 60,
			"periods": 1,
			"show": "30|60"
		},
		"color": "random",
		"perf":  {
			"icon": "+",
			"name": "Classical"
		}
	},
	"socketVersion": 0,
	"urlSente":  "https://lishogi.org/kq0A2SEO?color=sente",
	"urlGote": "https://lishogi.org/kq0A2SEO?color=gote"
}

Most of the parameters, except for "urlSente" and "urlGote", are bundled in an "challenge" object.

(As an aside, I notice the "rated" parameter is not taken into account)

@Pikrass Pikrass added the bug Something isn't working label Sep 27, 2024
@WandererXII WandererXII self-assigned this Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants