1.0.0 • Published 6 years ago

onwater v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

OnWater

Build Status

This is a simple API client that queries and returns results from onwater.io.

Usage

See example.js for more details.

const OnWater = require('onwater');

const apiKey = 'your-api-key';
const onWater = new OnWater(apiKey);

const lat = 40.70736894164633;
const lng = -73.97963314829899;

await onWater.results(lat, lng);

API

All methods return a promise. lat and lng should be floating point values of coordinates.

  • .results(lat, lng) - returns raw results from onwater.io
  • .isWater(lat, lng) - yields water which is a boolean from results.