-
Notifications
You must be signed in to change notification settings - Fork 12
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 #82
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Is it Kosher to stick your api key in version control like this? if so, I’m +1 to merge |
🤷 This app is all client side so it'll be in accessible to end users easily, no matter what. I'm leaning on yolo yes and see what happens. It is, at least, read only, which helps. |
for (const sensor of json.data) { | ||
// Ignore sensors which are either indoor or updated over 5 minutes ago | ||
if (sensor[fields["indoor"]] === 0 && sensor[fields["age"]] < 5) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now done server side, via location_type=0&max_age=300
appended to the full sensor list API requests 🎉
announceState("Calculating AQI"); | ||
|
||
for (const subsensor of sensor.results) { | ||
if (!bustedSensor(subsensor)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We get a lot less information from PurpleAir now, making this check a lot simpler, so I brought it inline. If we ever want, we can request more data from them and bring this back.
works for me. |
PurpleAir updated their API! It's new and shiny, and much like the old, but slightly not. This PR updates AQI WTF to use it.