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

Implement the Limits API #3

Open
arcanericky opened this issue Jul 19, 2019 · 0 comments
Open

Implement the Limits API #3

arcanericky opened this issue Jul 19, 2019 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@arcanericky
Copy link
Owner

The Pushover Limits API is simple and has a very short writeup at https://pushover.net/api#limits. It uses only a single parameter (token) and can be viewed with:

$ curl https://api.pushover.net/1/apps/limits.json?token=apitoken
{"limit":7500,"remaining":7405,"reset":1564635600,"status":1,"request":"7e3888b4-0bc8-4525-b567-d30e11b68d92"}

Implement this API in a limits.go module, including appropriate comments for GoDoc and unit tests. Use the Messages and Validate API as examples.

Use this API in the Pushover CLI utility with a limits commmand. An example might be:

$ pushover limits --token apitoken
Request
Token:       apitoken

Response
HTML Status:      200 OK
HTML Status Code: 200
API Status:       1
Request ID:       7e3888b4-0bc8-4525-b567-d30e11b68d92
Limit:            7500
Remaining:        7405
Reset:            1564635600
Response Body: {"status":1,"group":0,"devices":["pixel2xl"],"licenses":["Android"],"request":"a5669be9-1160-40cb-b680-36dde650bc28"}

Include unit tests for the CLI functionality.

@arcanericky arcanericky added enhancement New feature or request good first issue Good for newcomers labels Jul 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant