2.0.0-beta.1 • Published 5 years ago

response-tap v2.0.0-beta.1

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

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!

2.0.0-beta.2

5 years ago

2.0.0-beta.1

5 years ago

2.0.0-beta.0

5 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.0.7

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago