node-toggl-api icon indicating copy to clipboard operation
node-toggl-api copied to clipboard

getProjectTasks() returning undefined

Open g33k5z opened this issue 11 years ago • 3 comments

Hi.

I have been using your npm package for over a month without issues before this. So first up thank you.

My Issue:

getProjectTasks(projectId, callback)

I am unable to get this function to return task data. It only seems to return undefined.

Again all other functions work as expected so I'm inclined to believe this is a mistake on my end, but I don't see where.

Steps taken so far:

  • Remade code:
 router.get('/getProjectTasks/:id', function(req, res) {
        toggl.getProjectTasks(req.params.id, function(err, tasks){ 
              res.json(tasks); 
            });
    });
  • Updated npm package
  • Verified I can get data directly via https://www.toggl.com/api/v8/projects/8{projectId}/tasks?api_token={my_token} and also with cURL
  • Current workaround: Using getWorkspaceTasks(wId, options, callback) and then flittering tasks per project as needed

g33k5z avatar Jan 14 '15 17:01 g33k5z

Hello! You're right. Fixing.

estliberitas avatar Jan 14 '15 18:01 estliberitas

Published 0.0.3. You can do now:

npm install [email protected] --save

estliberitas avatar Jan 14 '15 18:01 estliberitas

Thank you!

g33k5z avatar Jan 14 '15 18:01 g33k5z