I was looking for a nice and simple module to display the air quality index (AQI), but all the modules I found were not really updated, or not using an API, or you couldn’t have several instances of it, or were not international, etc, so… I created my own.
This module gets the Air Quality Index (AQI) using the World Air Quality Index project API.
@ryck Great module.
One question: in your config.section, you wrote that is possible to insert the city_ID instead of the city_name. Where can I find the ID list?
Yes, looks very nice. I love the minimalist presentation.
Was browsing over China… OMG! The sensors were overloaded showing 999 and far above 200 otehrwise. crazy!
Hi great module !
But i have another city !!! when i write my city name i have another result “barrie in ontario” ???
where to find city ID ?
To find the city id you can search for it using the API itself: http://aqicn.org/json-api/doc/#api-Search-SearchByName
The API is quite picky with the names, so in my experience is always better to use the id or just the keyword here
@ryck AFAICT you can’t even search without an API key.
@E3V3A Yep, but you can use the same token you are using for the module, ie:
(you can just type that URL in your browser)
Sorry but geoloc “here” is so bad !
name of city don’t work
and don’t understand how find @id …
@Fonfon I added more info in the README, but is basically enter the URL above in your browser (using your token and your city, of course) an then just look for your city in the response and write down the “uid” value, that’s the id you are looking for.