Wizcorp / node-pivotal

NodeJS API library for PivotalTracker
44 stars 20 forks source link

Added toArray factory function & isEmptyObject check function #22

Closed MRdNk closed 9 years ago

MRdNk commented 11 years ago

One option for turning whatever is returned into an array.

This could then be used like this...

pivotal.getStories = function (projectId, filters, cb) {
    pivotal.apiCall("GET", ["projects", projectId, "stories"], filters, null, null, function (err, data) {
        if (err) {
            cb(err)
        } else {
            cb(null, pivotal.toArray(data, 'story'))
        }
    });
};
MRdNk commented 9 years ago

Closed as no movement on PR

stelcheck commented 9 years ago

Sorry, I think you might not have received this, but: https://github.com/Wizcorp/node-pivotal/issues/35