Comparing version 3.0.1 to 3.0.2
14
index.js
@@ -352,2 +352,16 @@ /** | ||
/** | ||
* Request entries from a user's link history in reverse chronological order | ||
* @param {Function=} cb The callback function | ||
* @return {Promise|void} | ||
*/ | ||
Bitly.prototype.history = function(cb) { | ||
var query = { | ||
// @todo Implement optional parameters: | ||
// http://dev.bitly.com/user_info.html#v3_user_link_history | ||
}; | ||
return this._doRequest(this._generateNiceUrl(query, 'user/link_history'), cb); | ||
}; | ||
/** | ||
* Edit an existing link's metadata | ||
@@ -354,0 +368,0 @@ * @param {String|Array} metadata_field Metadata field to edit (title, note, private, user_ts or archived). To edit |
@@ -10,3 +10,3 @@ { | ||
], | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"author": "Tane Piper <piper.tane@gmail.com>", | ||
@@ -31,2 +31,6 @@ "contributors": [ | ||
"email": "coaxial@cxial.tk" | ||
}, | ||
{ | ||
"name": "Ildar Sagdejev", | ||
"email": "specious@gmail.com" | ||
} | ||
@@ -33,0 +37,0 @@ ], |
@@ -9,3 +9,3 @@ node-bitly - Bitly API for nodejs | ||
This module provides calls to the [Bitly](http://bitly.com) API for [Nodejs](http://nodejs.org). | ||
For more information on the API request and responses visit the [Bitly API docs](http://code.google.com/p/bitly-api/wiki/ApiDocumentation) | ||
For more information on the API request and responses visit the [Bitly API docs](http://dev.bitly.com/api.html) | ||
@@ -20,32 +20,33 @@ Installation | ||
----- | ||
var Bitly = require('bitly'); | ||
var bitly = new Bitly('<YOUR ACCESS TOKEN>'); | ||
// To get your access token, visit https://bitly.com/a/oauth_apps (under Generic Access Token) | ||
```js | ||
var Bitly = require('bitly'); | ||
var bitly = new Bitly('<YOUR ACCESS TOKEN>'); | ||
// To get your access token, visit https://bitly.com/a/oauth_apps (under Generic Access Token) | ||
/** | ||
* With callback | ||
*/ | ||
bitly.shorten('https://github.com/tanepiper/node-bitly', function(err, response) { | ||
if (err) throw err; | ||
/** | ||
* With callback | ||
*/ | ||
bitly.shorten('https://github.com/tanepiper/node-bitly', function(err, response) { | ||
if (err) throw err; | ||
// See http://dev.bitly.com/ for format of returned object | ||
var short_url = response.data.url | ||
// See http://dev.bitly.com/ for format of returned object | ||
var short_url = response.data.url | ||
// Do something with data | ||
}); | ||
/** | ||
* With promise | ||
*/ | ||
bitly.shorten('https://github.com/tanepiper/node-bitly') | ||
.then(function(response) { | ||
// See http://dev.bitly.com/ for format of returned object | ||
var short_url = response.data.url | ||
// Do something with data | ||
}); | ||
// Do something with data | ||
}, function(error) { | ||
throw error; | ||
}); | ||
/** | ||
* With promise | ||
*/ | ||
bitly.shorten('https://github.com/tanepiper/node-bitly') | ||
.then(function(response) { | ||
// See http://dev.bitly.com/ for format of returned object | ||
var short_url = response.data.url | ||
// Do something with data | ||
}, function(error) { | ||
throw error; | ||
}); | ||
``` | ||
Tests | ||
@@ -67,2 +68,3 @@ ----- | ||
* info | ||
* history | ||
* link_edit |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
126487
1244
68
17