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

New API #85

Merged
merged 7 commits into from
Dec 15, 2023
Merged

New API #85

merged 7 commits into from
Dec 15, 2023

Conversation

skalnik
Copy link
Owner

@skalnik skalnik commented Nov 3, 2023

To be fair, they did email me, but I also forgot.


Closes #84

Copy link

vercel bot commented Nov 3, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
aqi-wtf ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 15, 2023 0:22am

@skalnik
Copy link
Owner Author

skalnik commented Nov 3, 2023

This now works, but due to how the API is paid for now, each sensor and field returned is counted against you. I need to adjust this to get a bounding box of your area for the sensors and maybe bust the cache if you're further than like 5km from one or something.

@skalnik
Copy link
Owner Author

skalnik commented Nov 6, 2023

https://github.com/davidwood/node-geopoint/blob/master/geopoint.js#L123-L159 can maybe borrow this MIT open source impl

@skalnik
Copy link
Owner Author

skalnik commented Dec 14, 2023

https://github.com/davidwood/node-geopoint/blob/master/geopoint.js#L123-L159 can maybe borrow this MIT open source impl

I ended up using ChatGPT for this

@@ -37,13 +42,18 @@
if (sensor_data == null) {
throw "Sensor data not cached";
}
if (sensor_data.version !== 1) {
if (sensor_data.version !== 2) {
Copy link
Owner Author

Choose a reason for hiding this comment

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

I wonder how long this has been busted 💀

@skalnik
Copy link
Owner Author

skalnik commented Dec 15, 2023

Imma leave this up in preview for a day so I can see how much my testing cost in terms of tokens and then merge it

@skalnik skalnik merged commit 7544252 into main Dec 15, 2023
2 checks passed
@skalnik skalnik deleted the new-api-who-dis branch December 15, 2023 17:10
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.

New API and thus everything is broken
1 participant