response-tap
Node wrapper for response-tap API
Last updated 3 months ago by ecwyne .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install response-tap 
SYNC missed versions from official npm registry.

response-tap

API under active development. Substantially different API after 1.0.0. - Read source for details.

Install

npm install response-tap

Use

var rTap = require('response-tap');
rTap.initialize('ACCOUNT_NUMBER', 'API_KEY');
rTap.getContacts(callbackFunction); //pass a callback. See docs for method specific arguments

About

This is a simple, extensible wrapper around the responseTap API. To learn more about responseTap's call tracking service you can visit their website and sign up for a demo.

Documentation

Official responseTap REST endpoint documentation. Package specific documentation to follow, in the meantime feel free to read the source.

Extend

The global rTap object can easily be extended to fit your specific needs. See the example below. Extend method can take either a string method name and function or an object with functions. See source for more examples.

var rTap = require('response-tap')
//this method will retrieve the nth call for today using the internal getFullCallRecords method
rTap.extend('todaysNthCall', function(callNum, callback){
    var today = new Date().toISOString().substr(0,10); //dates formated as YYYY-MM-DD
    //'this' is the global rTap object
    this.getFullCallRecords(today, callNum, callback);
});

Rate-Limiting

By default the package will not rate limit your requests, but you can easily set a custom rate limit for all requests using the following syntax. This is a lossless limit, all requests will eventually be processed in the order they were executed.

var rTap = require('response-tap');
rTap.setRateLimit(1, 1000); //1 request per second

ToDO

Currently all GET endpoints are available. My current needs to not require any POST DELETE or PUT endpoints, but pull requests are welcome!

Current Tags

  • 2.0.0-beta.2                                ...           beta (3 months ago)
  • 2.0.0-beta.1                                ...           latest (3 months ago)

12 Versions

  • 2.0.0-beta.2                                ...           3 months ago
  • 2.0.0-beta.1                                ...           3 months ago
  • 2.0.0-beta.0                                ...           3 months ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
  • 0.0.7                                ...           5 years ago
  • 0.0.6                                ...           5 years ago
  • 0.0.5                                ...           5 years ago
  • 0.0.4                                ...           5 years ago
  • 0.0.3                                ...           5 years ago
  • 0.0.2                                ...           5 years ago
  • 0.0.1                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 3
Dependencies (5)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |