shahinbdboy / google-api-php-client

Automatically exported from code.google.com/p/google-api-php-client
Apache License 2.0
0 stars 0 forks source link

Trouble inserting task #191

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Trying to insert a task into the default list.

Working from the example, my current code is:

  $task = new Google_Task();
  $task->setTitle('New Task');
  $task->setNotes('Please complete me');
  $task->setDue('2012-10-15T12:00:00.000Z');
  $result = $tasksService->insertTasks('@default', $task);

It all works fine until the last line then the function insertTasks doesn't 
seem to exist. Can you see what I'm doing wrong?

Original issue reported on code.google.com by p...@magpiecomms.com on 11 Sep 2012 at 4:45

GoogleCodeExporter commented 8 years ago
Managed to rectify it by trying various things. The code that works is:

  $taskN = new Google_Task();
  $taskN->setTitle('New Task');
  $taskN->setNotes('Please complete me');
  $taskN->setDue(date(DATE_RFC3339));
  $result = $tasksService->tasks->insert('@default', $taskN);

Original comment by p...@magpiecomms.com on 11 Sep 2012 at 4:57

GoogleCodeExporter commented 8 years ago

Original comment by ianbar...@google.com on 22 Mar 2013 at 3:33