Node BitBucket adds support for the user and users endpoint.

Published on Dec 04, 2012

The internals have been refactored even more in this release and the remove(cb) method always returns a null result in the callback.

This change makes the API more consistent.

User

This endpoint supports a series of operations in the logged user.
In all the examples below, client is a new bitbucket client.


  var client = bitbucket.createClient(options);

You can get a list of repositories the user follows with:


  client.user().follows(cb);

If you need to access the user details and his repositories, use the get method.


  client.user().get(cb);

We can update some of the users properties calling the update method.


  client.user().update({"first_name": "Joe"}, cb);
  // Changes the first name for the user to Joe.

User repositories.

You can get information about all to all the user repositories using the same endpoint.


  client.user().repositories().getAll(cb);

If you want to get some details on the repositories the use is following you call the following method on the repositories.


  client.user().repositories().following(cb);

Finally, dashboard return the same information you see in a user dashboard when visiting BitBucket.


  client.user().repositories().dashboard(cb);

Users end point.

Partially implemented at the moment, only support for account and emails have been implemented.

Improved documentation

The documentation have been updated to cover the current API and have been significantly simplified.