hongkong-beach-waterquality
v1.0.0
Published
Node.js module to get water pollution for Hong Kong Beaches.
Downloads
16
Maintainers
Readme
Hong Kong Beach Water Quality API
What is this for?
TThis module gets the current pollution level at various beaches around Hong Kong.
Install
npm install --save hongkong-beach-waterquality
Usage
var BeachWaterQuality = require("hongkong-beach-waterquality");
var bwq = BeachWaterQuality();
bwq.getBeachForcastLevels().then(function(forecast) {
console.log(forecast);
});
Supported Methods
getAllBeachDetails()
getBeachDetails(beach_code)
- Takes an array or stringgetBeachForcastLevels()
getBeachForcastLevel(beach_code)
getBeachImage(beach_code)
getBeachImageCodePair(beach_code)
getBeachImageWithName(beach_code)
Example data
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" } ]
Other Handy Modules
- hongkong-weather - For Hong Kong Weather Information.
- hongkong-pollution - For Hong Kong Pollution Information.
- hongkong-trams - For Hong Kong Tram Information.
Contributing
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