what3words-api-nodejs-client
what3words-api-nodejs-client is Node.js client library for what3words API.
Work In Progress : It exposes a subset of what3words API methods.
what3words API key
This library allows to use an environment variable (W3W_API_KEY
) to send requests on what3words API. Otherwise the what3words API keyr is a parameter of each requests.
$ export W3W_API_KEY=YOUR-API-KEY
or
what3words;
browser ?
what3words already maintains a dedicated client side JavaScript library
Get started
- what3words api
-
installation
$ npm install what3words-api-nodejs-client
-
configure
$ export W3W_API_KEY=YOUR-API-KEY
-
Enjoy #3wordadresses
API
forward(options)
This function wraps what3words API method forward It returns a Promise resolved by API payload.
const what3words = ; what3words;
reverse(options)
This function wraps what3words API method reverse It returns a Promise resolved by API payload.
const what3words = ; what3words;
languages()
This function wraps what3words API method languages It returns a Promise resolved by what3words API payload.
const what3words = ; what3words;
standardblend(options)
This function wraps what3words API method standardblend It returns a Promise resolved by API payload.
const what3words = ; what3words;
autosuggest(options)
This function wraps what3words API method autosuggest It returns a Promise resolved by API payload.
const what3words = ; what3words;
autosuggestML(options)
This function wraps what3words API method autosuggest It returns a Promise resolved by API payload.
const what3words = ; what3words;
grid(options)
This function wraps what3words API method grid It returns a Promise resolved by API payload.
const what3words = ; what3words;
Build and test
setup
$ npm i
unit test
$ npm test
coverage
$ npm run-script coverage
report is available with :
$ open coverage/lcov-report/index.html
Contributing
Anyone and everyone is welcome to contribute.
Issues
Find a bug or want to request a new feature? Please let me know by submitting an issue.
Licensing
Licensed under the MIT License
A copy of the license is available in the repository's LICENSE file.