npm.io
0.0.2 • Published 7 years ago

geo-time-getter

Licence
ISC
Version
0.0.2
Deps
2
Size
156 kB
Vulns
25
Weekly
0

get google api key: https://developers.google.com/maps/documentation/timezone/start#get-a-key

Usage Example:

import geoTimeGetter from 'geo-time-getter';

const gtg = new geoTimeGetter({
    GOOGLE: { apiKey: "<your key>" }
});

const result = await gtg.get('Novosibirsk');

options:

GOOGLE: {
    HOST: String,
    apiKey: String
},
YANDEX: {
    HOST: String,
    apiKey: String
},
cache: false || Object {
    strategy: String, // cacheFirst || apiFirst,
    stdTTL: 60 * 60 * 24 * 30, // 1 month
}