aBird.co
Simple wrapper for the aBird.co API -The world's most awesome content shortening service. Please make sure you visit (and read) the API documentation for more specific details.
Using this module can't be made any easier:
Install aBird.co
npm install abird.co
Require aBird.co
var abird = require('abird.co').fly(options);
The options
object may contain:
env
- Which environment is being used;PRO
orDEV
. Defaults toPRO
.apiKey
- Your API key, obtained from your aBird.co profile page. Providing an API key is only required when using theshrink
method.timeout
- API request timeout, in milliseconds. Defaults to3600
.
And you are ready to use this awesome API.
API
- .shrink(object, callback)
- .expand(mask, callback)
- .stats(mask, callback)
- .delete(mask [, deleteType], callback)
In all cases the callback
has this signature:
{ }
Some examples
The examples listed in this document assume that Express is being used.
Shrink content
var content = "data": "type": "url" "value": "http://abird.co" ; abird;
Expand content
var mask = 'a';abird;
Basic content statistics
var mask = 'a';abird;
Delete content
var mask = 'a';abird;