Wizcorp / node-pivotal

NodeJS API library for PivotalTracker
44 stars 20 forks source link

useToken example not working #9

Closed aesnyder closed 10 years ago

aesnyder commented 11 years ago

the api calls are all failing because passing the result of getToken to useToken isn't right, it needs to be result.guid: (note the differences of the second line in each segment below)

FAILS: pivotal.getToken result.email, result.password, (err, token) -> pivotal.useToken token pivotal.getProjects (err, projects)-> console.log projects

passes: pivotal.getToken result.email, result.password, (err, token) -> pivotal.useToken token.guid pivotal.getProjects (err, projects)-> console.log projects

Not sure whether the best option is to ammend .getApi or to just make note of this in the docs.

Thanks for the hard work!

MRdNk commented 11 years ago

Documentation should change, as the API just reflects the Pivotal Tracker API.

stelcheck commented 11 years ago

Wow. I suck at maintaining this repository.

Give me a day or two, will fix the doc.

Thanks!

stelcheck commented 11 years ago

@aesnyder sorry, but could you point to me where in the doc modifications should be applied? I don't think I see any places where we specify to use the return value of getToken and pass it straight in useToken.

In fact, the example code shows how to print the token on screen (see examples/examples/getToken.js)

stelcheck commented 10 years ago

@aesnyder closing, please feel free to reopen if you can provide more details