Skip to content
Desmond Morris edited this page Jan 25, 2015 · 3 revisions

This library pre-1.x is comprised of patterns and an API that has been mostly un-changed since its inception. The 1.x branch is an effort to:

Migrating to 1.x

There are two major changes in 1.x:

An updated callback pattern

This has been the most popular feature request in this project and rightfully so.

The new callback pattern is as follows:

/**
* I am a callback.
*
* error An error object
* body The payload from the API request
* response The raw response object from the oauth request.  We will keep this in case folks are using it in some way.
*/
function(error, body, response) {}

Previously, the error and payload arguments were ambigous (in the same argument position), causing all sorts of mayhem.

Deprecate the helper modules

So .getFavorites(callback) becomes .get('favorites/list').

Why? Because the helper methods do not scale, meaning - as the API changes we will need to update the helper methods accordingly.

Deprecate the authentication strategy

I suggest taking a looking at the Passport's Twitter strategy if you are looking to use Twitter as an authentication method.

Clone this wiki locally