Adding changeset and followers support to node BitBucket.

Published on Nov 04, 2012

In version 0.0.4 I made a change on the node-bitbucket api to make sure that callbacks all respond to the cb(err, result) format.

I refactored the code a bit more and moved the transport concerns into it’s own module, so I hope to remove the dependency on curl at some point without having the need to touch the parser.

The code to parse the response was also moved into it’s own module. At the moment it’s very crude and I will need to spend some time on it once all the end points are implemented.

As always install with npm.


    npm install bitbucket-api

Changesets

The repository has two methods .changesets() and .changeset(hash).

The changesets() return an object with two methods to get a list of changesets or details on an individual one.

The changeset(hash) needs the full hash a given changeset and will give you access to stats, diff, likes and comments for the changeset.

The comments() method returns and object that allow you to create, list, upddate or delete comments for the changeset.

Followers

As an extra, I added suport for the repository followers end-point. Very simple, just takes a cb and returns and object with the count and an array of followers for a given repository.