@cimpress/node-looker
v1.0.2
Published
API wrapper for Looker API3 - OAuth2
Downloads
2
Keywords
Readme
node-looker
Introduction
This package is being developed since belt (v4.3) endpoints will not work with Looker.
Getting Started
var looker = require('@cimpress/node-looker')({
clientId: 'yourclientid',
clientSecret: 'yourclientsecret',
// the rest are optional
baseUrl: 'https://api.looker.cimba.cimpress.io:19999/api/3.0/', // default
ttlOffset: 60, // expires the cached access token 60 seconds before it actually expires (default = 60)
timeout: 60000, // number of milliseconds before timing out a looker query
loginTimeout: 60000 // number of milliseconds before timing out a looker login request
});
looker({
uri: '/user'
})
.then(res => {
console.log(res.body);
});
Testing
Install dependencies yarn install
, then run yarn run gulp
.
➜ ct-node-looker git:(master) ✗ yarn run gulp
[14:15:57] Using gulpfile ~/git/ct-node-looker/gulpfile.js
[14:15:57] Starting 'test'...
[14:15:57] Finished 'test' after 7.78 ms
[14:15:57] Starting 'default'...
[14:15:57] Finished 'default' after 9.56 μs
LookerClient
✓ should login only once
1 passing (48ms)
➜ ct-node-looker git:(master) ✗