문제

On the Google Tasks API website > Reference > Tasks > (https://developers.google.com/google-apps/tasks/v1/reference/tasks) scroll down to 'Resource Representations'.

It looks like I can add a link to my tasks (like Gmail does when you set an email as a task). ApiTaskService.php also includes a class for that: TaskLinks. But when I try it, the added url just won't show up in the Task. Am I doing something wrong? What 'type' should I set the TaskLink to?

Code:

$linkid = array_push($links,new TaskLinks())-1;
$links[$linkid]->setType("website");
$links[$linkid]->setLink($issue_url);
$links[$linkid]->setDescription("{$issue['id']}");

$task = new Task();
$task->setTitle($title);
$task->setNotes($notes);
$task->setDue($due);
$task->setLinks($links);

It doesn't return any errors, but it doesn't change the task either...

도움이 되었습니까?

해결책

This page says that links collection is read-only, so apparently there's no way to set links for now. However some libraries do provide slugs to implement this feature in the future.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top