keen / keen-analysis.js

A light JavaScript client for Keen
https://keen.io/docs/compute/
MIT License
40 stars 15 forks source link

Upgrade to Bluebird.js (core) for cancelable HTTP requests #1

Closed dustinlarimer closed 8 years ago

dustinlarimer commented 8 years ago
dustinlarimer commented 8 years ago

Example usage:

// assume var client = new Keen({ ... });
var req = client.query('count', {
    event_collection: 'pageviews',
    timeframe: 'this_14_days'
  })
  then(function(res){
    // handle res
  });

// Nevermind, close it down!
req.cancel();
// XHR request canceled