@spikkl/spikkl-js-node-client
v1.0.1
Published
Spikkl API client library for NodeJS
Downloads
8
Maintainers
Readme
Prerequisites
Spikkl API client requires Node 6.14.x or higher to be installed.
Requirements
To use the Spikkl API client, the following things are required:
- Get yourself a free Spikkl account. No sign up costs.
- Follow a few steps to enable a suitable subscription to talk to the API.
- A valid API key which can be generated from your Spikkl dashboard.
Installation
Using npm:
npm install @spikkl/spikkl-js-node-client --save
Or using yarn:
yarn add @spikkl/spikkl-js-node-client
This will add @spikkl/spikkl-js-node-client
to your project's dependencies.
You may also git checkout or [download all the files](https://github.com/spiCheck the releases page to know which versions are available.kkl/spikkl-js-node-client/archive/master.zip), and include the Spikkl API client manually.
Check the releases page to know which versions are available.
Getting Started
Import the Spikkl API Client, and setting up your API key.
CommonJS-style:
const { createSpikklClient } = require('@spikkl/spikkl-js-node-client');
const spikklClient = createSpikklClient({ apiKey: 'API_KEY' });
Using Javascript modules:
import createSpikklClient from '@spikkl/spikkl-js-node-client';
const spikklClient = createSpikklClient({ apiKey: 'API_KEY' });
Lookup a location resource
spikklClient.lookup({
postalCode: '2611HB',
streetNumber: '175'
})
.then( result => {
// Use the address location(s)
})
.catch( error => {
// Handle the error
});
Reverse lookup a location resource
spikklClient.reverse({
longitude: '4.354901',
latitude: '52.012133'
})
.then( result => {
// Use the address location(s)
})
.catch( error => {
// Handle the error
});
API documentation
If you wish to learn more about our API, please visit the Spikkl API Documentation.
License
BSD (Berkeley Software Distribution) License. Copyright (c) 2020, Spikkl
Support
Contact: www.spikkl.nl — [email protected]