2.0.0 • Published 10 years ago

gmaps-signature v2.0.0

Weekly downloads
39
License
LGPL-3.0
Repository
github
Last release
10 years ago

Google Maps Signature

Travis CI NPM Codecov VersionEye

Signs Google Maps requests. Works with both general and Google Maps for Work.

Installation

With npm...

npm install --save gmaps-signature

Usage

// Load the module
var GS = require('gmaps-signature');

// Add your Google Maps key
GS.GOOGLE_API_KEY = 'MY KEY';
// Or for Google Maps API for Work
GS.GMAPS_CLIENT_ID = 'MY CLIENT ID';
GS.GMAPS_PRIVATE_KEY = 'MY PRIVATE KEY';

// and then you can start signing urls...
var url = GS.sign('https://maps.googleapis.com/maps/api/geocode/json?address=New+York');

Env variables

You can also set the required keys using env variables. Like so:

GOOGLE_API_KEY=THIS_IS_MY_KEY node .
GMAPS_CLIENT_ID=THIS_IS_MY_ID GMAPS_PRIVATE_KEY=THIS_IS_MY_PK node .
2.0.0

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago