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

Create requests_wifi_adafruit_status.py #204

Closed
wants to merge 2 commits into from
Closed

Conversation

DJDevon3
Copy link
Contributor

@DJDevon3 DJDevon3 commented Aug 23, 2024

An API for checking downtime on adafruit services.

Code.py output example

Connecting to WiFi...
📡 Wifi!

Headers:
Request Timestamp: Fri, 23 Aug 2024 19:45:24 GMT
Rate Limit Remaining: 58
Content Type: application/json

JSON: 
Response Status: ok
Total Monitors: 15Monitor: AccountsMonitor: Accounts - Default Queue LatencyMonitor: Accounts - Mailer Queue LatencyMonitor: Accounts - Profiles Queue LatencyMonitor: Accounts - Queue RetriesMonitor: Adafruit DailyMonitor: BlogMonitor: ForumsMonitor: IO - APIMonitor: IO - Default Queue LatencyMonitor: IO - MQTTMonitor: IO - Primary Queue LatencyMonitor: IO - WebMonitor: LearnMonitor: Shop

Capture

An API for checking downtime on adafruit services.
small value description change
@DJDevon3
Copy link
Contributor Author

I have no idea if this will work every day or if the api url is only for today. Issue came up today where Adafruit posted a link to their status page. https://www.adafruitstatus.com/ So obviously I was curious about the API running it and came up with a quick example for requests that seems to work.

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think an adafruit-playground.com would be a better place for this. Going forwards we'll want example code to demonstrate unique features of a library instead of external things such as unique API endpoints.

Maybe we want to add links out to playgrounds instead?

@DJDevon3
Copy link
Contributor Author

I can see how trying to maintain all of the examples whenever there is an API change might require unnecessary time and effort better spent elsewhere for Adafruit staff. I can host them in a personal repo as I enjoy adding more examples. I'm perfectly fine with that and gives me the added benefit of not having to fight with pylint, black, or ruff. :P

I've made a new repo here: https://github.com/DJDevon3/CircuitPython_Requests-Online-API-Examples
In the same vein as Todbots Tips & Tricks there comes a time when it's just too much for Adafruit to maintain and I completely understand. I've saved the examples I wrote so you can reduce or remove the expanded directory if you want.

@tannewt
Copy link
Member

tannewt commented Aug 28, 2024

I've made a new repo here: https://github.com/DJDevon3/CircuitPython_Requests-Online-API-Examples
In the same vein as Todbots Tips & Tricks there comes a time when it's just too much for Adafruit to maintain and I completely understand.

Perfect! Thank you!

@tannewt tannewt closed this Aug 28, 2024
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

Successfully merging this pull request may close these issues.

2 participants