问题
I've just started using the Asana API to make myself a little tool to get an overview of all tasks assigned to me.
I can do all kinds of things, like getting all Workgroups, Projects, Users, Tasks by Project etc. But somehow I cannot find how to get all Tasks per user.
When you login to Asana, you get an overview of all tasks assigned to you. That's what I try to achieve using the API. Below you'll find the GitHub project I'm using right now.
Reference
Github: Asana API
回答1:
I think I understand what you're asking. From the documentation, under Querying for Tasks, it suggests using the assignee
parameter for filtering for this purpose. The adjacent example entitled Show tasks assigned to me in a workspace or organization seems particularly useful. You would make a request to:
/tasks?workspace=14916&assignee=me
If you want all tasks across all workspaces, you'll have to iterate over your workspaces and make this kind of query.
来源:https://stackoverflow.com/questions/28091680/how-to-get-tasks-by-user-in-asana