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 to serve puzzles by ID #11770

Closed
khanalizadeh opened this issue Oct 24, 2022 · 4 comments
Closed

API to serve puzzles by ID #11770

khanalizadeh opened this issue Oct 24, 2022 · 4 comments
Assignees

Comments

@khanalizadeh
Copy link

khanalizadeh commented Oct 24, 2022

As far as I know, currently there is no way to receive puzzle information through an API. The current way to get this information is by downloading the whole puzzle database and looking it up locally.

For many use cases in which one needs to get a small number of puzzles by ID, this method is pretty unreasonable. Also, keeping the data updated is a hassle.

It would be a useful feature to have an API method that serves puzzle based on ID (Or depending on performance considerations, other reasonable queries).

@ornicar
Copy link
Collaborator

ornicar commented Oct 25, 2022

What's your use case?

@khanalizadeh
Copy link
Author

khanalizadeh commented Oct 25, 2022

What's your use case?

This specific time, I'm trying to feed the puzzles that I failed to a spaced repetition system. I can get my own puzzle activity from the API but not the puzzle itself.

I can think of more use cases for this, and I believe this has been asked several times before.

@benediktwerner
Copy link
Member

Is there any particular reason why downloading the puzzle database is "unreasonable"? The puzzle database is only a few hundred MB so it seems totally fine to just download it whole. Keeping it updated also doesn't seem particularly challenging. It doesn't change that often anyway and you could even just re-download it automatically once you encounter an unknown puzzle.

@ornicar
Copy link
Collaborator

ornicar commented Oct 25, 2022

The DB is only updated once a month, so there is a chance that a puzzle is missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants