Wizcorp / node-pivotal

NodeJS API library for PivotalTracker
44 stars 20 forks source link

Get stories always array #17

Closed MRdNk closed 11 years ago

MRdNk commented 11 years ago

Stories are always returned as an array.

No story, 1 story or multiple stories - all array of story :: {story: []}

No story

callback: { '0': null, '1': { story: [] } }

1 Story

callback: { '0': null, '1': { story: [ [Object] ] } }

2 Stories

callback: { '0': null, '1': { story: [ [Object], [Object] ] } }
stelcheck commented 11 years ago

Will take a look at the code kater today, but maybe it would be more convenient to return the array directly instead of the object.

Kind regards, On Jun 6, 2013 6:41 AM, "Duncan Angus Wilkie" notifications@github.com wrote:

Stories are always returned as an array.

No story, 1 story or multiple stories - all array of story :: {story: []}

No story

callback: { '0': null, '1': { story: [] } }

1 Story

callback: { '0': null, '1': { story: [ [Object] ] } }

2 Stories

callback: { '0': null, '1': { story: [ [Object], [Object] ] } }


You can merge this Pull Request by running

git pull https://github.com/MRdNk/node-pivotal getStoriesAlwaysArray

Or view, comment on, or merge it at:

https://github.com/Wizcorp/node-pivotal/pull/17 Commit Summary

  • Patch version bump to 0.1.4
  • double cb now single cb
  • Tests: change text for no stories in project
  • Added try, catch back in
  • Merge branch 'no_owner'
  • Merge branch 'xml_type_attr'
  • Merge branch 'master' into doublecb
  • Test fixes
  • Removed try, catch
  • getStories now always array

File Changes

  • M index.jshttps://github.com/Wizcorp/node-pivotal/pull/17/files#diff-0(57)
  • M package.jsonhttps://github.com/Wizcorp/node-pivotal/pull/17/files#diff-1(2)
  • M tests/tests.jshttps://github.com/Wizcorp/node-pivotal/pull/17/files#diff-2(24)

Patch Links:

stelcheck commented 11 years ago

I see you have both the Array Stories and try-catch removal here. Could you separate those two sets of commits so that they could be dealt with separately?

MRdNk commented 11 years ago

Yeah sorry about that, it was getting near the end of the hack night.

I'll tidy up the commit tonight.

On 6 Jun 2013, at 04:43, "Marc Trudel" notifications@github.com wrote:

I see you have both the Array Stories and try-catch removal here. Could you separate those two sets of commits so that they could be dealt with separately?

— Reply to this email directly or view it on GitHub.

stelcheck commented 11 years ago

No worries :)

On Thu, Jun 6, 2013 at 5:10 PM, Duncan Angus Wilkie < notifications@github.com> wrote:

Yeah sorry about that, it was getting near the end of the hack night.

I'll tidy up the commit tonight.

  • Duncan

On 6 Jun 2013, at 04:43, "Marc Trudel" notifications@github.com wrote:

I see you have both the Array Stories and try-catch removal here. Could you separate those two sets of commits so that they could be dealt with separately?

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/Wizcorp/node-pivotal/pull/17#issuecomment-19030631 .

http://www.wizcorp.jp/Marc Trudel-Belisle

Chief Technology Officer | Wizcorp Inc. http://www.wizcorp.jp/

TECH . GAMING . OPEN-SOURCE WIZARDS+ 81 3-4550-1448|Websitehttp://www.wizcorp.jp/ |Twitter https://twitter.com/Wizcorp|Facebookhttp://www.facebook.com/Wizcorp |LinkedIn http://www.linkedin.com/company/wizcorp

MRdNk commented 11 years ago

Closed to create cleaner commit.