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

Update OpenSky-Network Public Single Flight API Example #172

Merged
merged 5 commits into from
Apr 15, 2024

Conversation

DJDevon3
Copy link
Contributor

@DJDevon3 DJDevon3 commented Mar 19, 2024

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

Added

  • pretty serial hierarchy view
  • general code cleanup and improvements
  • improved endpoints with server side failure messages
  • improved and streamlined debugging
  • shouty constants to make Pylint happy.
  • imports sorted
  • doc strings for functions
  • uses settings.toml by default
  • using Connection Manager by default

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
Copy link
Contributor Author

DJDevon3 commented Mar 19, 2024

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
Copy link
Contributor Author

@FoamyGuy This one is good to go as well.

@FoamyGuy
Copy link
Contributor

@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
Copy link
Contributor Author

@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
Copy link
Contributor

#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

This file is now updated with the same version as in the Single Flight Private API Example.  This should hopefully fix any conflicts.
@DJDevon3
Copy link
Contributor Author

@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.

# Conflicts:
#	examples/wifi/expanded/requests_wifi_api_openskynetwork_private.py
#	examples/wifi/expanded/requests_wifi_api_openskynetwork_public.py
Copy link
Contributor

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

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

I merged main and resolved the conflicts locally then pushed the result to this branch. I think the main part it was having trouble with was the version numbers at the top of the files in the comments.

These changes are looking good to me now. I tested the updated public example on a feather S3 TFT

@FoamyGuy FoamyGuy merged commit 12e6b47 into adafruit:main Apr 15, 2024
1 check passed
@DJDevon3 DJDevon3 deleted the DJDevon3-openskynetwork_public branch April 15, 2024 16:32
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Apr 16, 2024
Updating https://github.com/adafruit/Adafruit_CircuitPython_HTTPServer to 4.5.8 from 4.5.7:
  > Merge pull request adafruit/Adafruit_CircuitPython_HTTPServer#94 from michalpokusa/connection-manager-and-ap-examples

Updating https://github.com/adafruit/Adafruit_CircuitPython_Requests to 3.2.5 from 3.2.4:
  > Merge pull request adafruit/Adafruit_CircuitPython_Requests#172 from DJDevon3/DJDevon3-openskynetwork_public

Updating https://github.com/adafruit/Adafruit_CircuitPython_TemplateEngine to 2.0.0 from 1.2.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_TemplateEngine#4 from michalpokusa/template-syntax-error-rework

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Updated download stats for the libraries
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