Asana / ruby-asana

Official Ruby client library for the Asana API v1
MIT License
76 stars 53 forks source link

Question about using project as an option with tasks.find_all #38

Open saagar opened 8 years ago

saagar commented 8 years ago

Hey guys!

I'm trying to use tasks.find_all to get all tasks in a project that haven't been completed. I'm having some trouble though; it seems like project isn't an accepted default param (assignee and workspace are, but tag and project aren't). I made a change locally to add project in as a parameter, which works, but I'm also having trouble getting all tasks that are incomplete (options: {completed_since: "now" }). Did I forget something/misread the documentation?

[27] pry(main)> ASANA.tasks.find_all(options:{projectId:"id"}) Asana::Errors::InvalidRequest: Must specify exactly one of project, tag, or assignee + workspace

┆Issue is synchronized with this Asana task

saagar commented 8 years ago

@agnoster @txus looks like this might be caused by the same opt_ issue as https://github.com/Asana/ruby-asana/issues/16

saagar commented 8 years ago

(so instead, I've done response = ASANA.get("/tasks", params: {limit: 20, project: chosen_project, completed_since: "now"}))

jonahx commented 8 years ago

thanks for posting your workaround

voghDev commented 6 years ago

btw, how does "project id" parameter look like? is it a numeric identifier like 66205418094428?

smtlaissezfaire commented 6 years ago

Thanks @saagar . I monkey patched: https://gist.github.com/smtlaissezfaire/df12ee5ad75dba86bc7d2c345ec192fa