每当我使用getTasks()
它都会返回Invalid Request
但是,当我使用getTasksForProject
它时,它会返回值。
获取任务()
$tasks = $asana_client->tasks->getTasks(["opt_fields" => "name,due_on"]);
foreach ($tasks as $task) {
var_dump($task);//will return error
}
getTasksForProject
$tasks = $asana_client->tasks->getTasksForProject($projects[12]->gid, ["opt_fields" => "name,due_on"]);
foreach ($tasks as $task) {
var_dump($task);
}
object(stdClass)#312 (3) { ["gid"]=> string(16) "**8**3*31**73173" ["due_on"]=> string(10) "2020-06-26" ["name"]=> string(15) "Navbar Settings" }
是什么导致了这个错误,在文档下它没有说需要 projectid 的参数?