@cimpress/ct-node-looker
API wrapper for Looker API3 - OAuth2
Last updated 2 years ago by ctmex .
Apache-2.0 · Repository · Original npm · Tarball · package.json
$ cnpm install @cimpress/ct-node-looker 
SYNC missed versions from official npm registry.

ct-node-looker

Introduction

This package is being developed since belt (v4.3) endpoints will not work with Looker.

Getting Started


var looker = require('ct-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) ✗

Current Tags

  • 1.0.0                                ...           latest (2 years ago)

1 Versions

  • 1.0.0                                ...           2 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (6)
Dev Dependencies (16)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |