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

Song request response should return timeout duration remaining #237

Open
kenellorando opened this issue Feb 24, 2023 · 0 comments
Open

Song request response should return timeout duration remaining #237

kenellorando opened this issue Feb 24, 2023 · 0 comments
Assignees
Labels
domain: cadence-api Relates to cadence API domain: cadence-db Relates to cadence database

Comments

@kenellorando
Copy link
Owner

When a call to /api/request/id or api/request/bestmatch is made, the body should return a TimeRemaining field representing the rounded integer seconds until they can make another request.

For example, if the server administrator sets a timeout of 180, and the user tries to make a request five seconds after they just made their first request, the response field of the code 429 should include TimeRemaining: 175.

This would enable us to do things like have the UI disable and re-enable the request buttons automatically, and allow other clients like CadenceBot to report to users how much longer they have to wait until they can make another request. We had this feature in v4, so this issue will mostly be a re-implementation on the new Redis rate limit database.

@kenellorando kenellorando added domain: cadence-api Relates to cadence API domain: cadence-db Relates to cadence database labels Feb 24, 2023
@kenellorando kenellorando self-assigned this Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: cadence-api Relates to cadence API domain: cadence-db Relates to cadence database
Projects
None yet
Development

No branches or pull requests

1 participant