adafruit / Adafruit_CircuitPython_Requests

Requests-like interface for web interfacing
MIT License
51 stars 37 forks source link

add Queue-Times API Example #182

Closed DJDevon3 closed 5 months ago

DJDevon3 commented 6 months ago

Used for Disney theme park queue times. Public API. Runs infinitely until time to update. The way this one works is slightly different from most examples. It's designed for a small display to take to the theme park and get updates on queue times.

Here's an example on a display.

Inspired by Reddit user Fishing_Quiet asked for help getting this API working on a display.

FoamyGuy commented 5 months ago

I think removing the extra infinite looping of the printouts when there isn't new data is the only thing left to change on this one. Everything else is looking good to me at this point.

If you'd prefer I can work on that change and commit it here, let me know.

DJDevon3 commented 5 months ago

@FoamyGuy I missed working on this one last night sorry! If you would like to do it go for it. I have bursted irrigation pipes to deal with for the next couple of days. Not a water main but something that will cost me money if I don't address immediately.

Prior to last week I was the only person working on these examples. It's really really nice to see others take an interest in helping to clean them up. By all means go for it! Will take a load off my shoulders.

DJDevon3 commented 5 months ago

@FoamyGuy ready for another review. removed infinite loop and added Justins suggested change to use with. Cleaned up serial prints to be more legible. Since Disneyland (Orlando) is currently open it's populating with actual queue times.

Land: Fantasyland
 |  | Ride: "it's a small world"
 |  | Queue Time: 10 Minutes
 |  | Status: Open

 |  | Ride: Alice in Wonderland
 |  | Queue Time: 30 Minutes
 |  | Status: Open

 |  | Ride: Casey Jr. Circus Train
 |  | Queue Time: 25 Minutes
 |  | Status: Open

 |  | Ride: Dumbo the Flying Elephant
 |  | Queue Time: 40 Minutes
 |  | Status: Open

 |  | Ride: King Arthur Carrousel
 |  | Queue Time: 5 Minutes
 |  | Status: Open

etc...