TThis module gets the current pollution level at various beaches around Hong Kong.
npm install --save hongkong-beach-waterquality
var BeachWaterQuality = require("hongkong-beach-waterquality");
var bwq = BeachWaterQuality();
bwq.getBeachForcastLevels().then(function(forecast) {
console.log(forecast);
});
getAllBeachDetails()
getBeachDetails(beach_code)
- Takes an array or stringgetBeachForcastLevels()
getBeachForcastLevel(beach_code)
getBeachImage(beach_code)
getBeachImageCodePair(beach_code)
getBeachImageWithName(beach_code)
All methods return JSON, please see the examples linked above for more info on how to call each method. Here is an example of what you get with the getBeachForcastLevels()
method.
[ { "AlertType": "-1",
"BeachCode": "TWM",
"BeachForecastDate": "2016-06-24T10:00:00",
"BeachForecastLevel": "1",
"DataDate": "2013-08-04T00:00:00",
"ImageDate": "2011-02-18T00:00:00" },
{ "AlertType": "-1",
"BeachCode": "CW2",
"BeachForecastDate": "2016-06-24T10:00:00",
"BeachForecastLevel": "1",
"DataDate": "2013-08-04T00:00:00",
"ImageDate": "2011-02-10T00:00:00" } ]
- hongkong-weather - For Hong Kong Weather Information.
- hongkong-pollution - For Hong Kong Pollution Information.
- hongkong-trams - For Hong Kong Tram Information.
Feel free to submit any pull requests or add functionality, I"m usually pretty responsive.
If you like the module, please consider donating some bitcoin or litecoin.
Bitcoin
LiteCoin