adafruit / Adafruit_CircuitPython_Requests

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

Update OpenSky-Network Public Single Flight API Example #172

Closed DJDevon3 closed 2 months ago

DJDevon3 commented 3 months ago

Public API, no credentials required. Instructions in code comments. Less daily calls than Private API.

Added

Serial output example:

Connecting to WiFi...
✅ Wifi!
 | Attempting to GET OpenSky-Network Single Public Flight JSON!
 | Website Credentials NOT Required! Less daily calls than Private.
 | ✅ OpenSky-Network Public JSON!
 |  | Last Contact: 03/19/2024 10:05:55
 |  | Transponder: 88044d
 |  | Callsign: AIQ351  
 |  | Squawk: None
 |  | Origin: Thailand
 |  | Longitude: 100.836
 |  | Latitude: 12.3921
 |  | Barometric Altitude: 8572.5
 |  | Velocity: 224.03
 |  | Vertical Rate: 2.6
✂️ Disconnected from OpenSky-Network API

Finished!
Board Uptime: 1.2 days
Next Update: 30 minutes
===============================
DJDevon3 commented 3 months ago

This was the PR that I accidentally merged with the private example. Recommend merging the private single flight example first and then merge this one on top of it. That should allow this public api example to overwrite the one included in the private example? That should fix everything.

DJDevon3 commented 2 months ago

@FoamyGuy This one is good to go as well.

FoamyGuy commented 2 months ago

@DJDevon3 There are merge conflicts that prevent merge on this one. It looks to me like the same changes were already brought in from #167

Were there any specific other changes in this one?

DJDevon3 commented 2 months ago

@FoamyGuy 167 is the private example and this one (172) is the public example. Don't worry about it I can go back through commit history if necessary and repull the right one if it gets lost and recommit.

FoamyGuy commented 2 months ago

167 contained changes to both public and private, I know it wasn't the original intent, but those changes were there. You can see the list of changes here: https://github.com/adafruit/Adafruit_CircuitPython_Requests/pull/167/files

DJDevon3 commented 2 months ago

@FoamyGuy The private example here has been updated with the most recent merged version (merged previously today). Merging it again should have no effect as it should be the same file. I updated the "Coded for" section to Circuit Python 9.x

I made sure the public example here is the correct public single flight example and is good to merge.

This PR can merge both now with no conflicts or at least the intention is cleaned up in both of these files now.