Exemplo n.º 1
0
 /**
  * Load all data
  * @return \Todoist\Todoist
  */
 public function loadAll()
 {
     if (isset($this->projects)) {
         return $this;
     }
     $data = $this->getApiResponse('sync', array('seq_no' => 0, 'seq_no_global' => 0, 'resource_types' => json_encode(array('items', 'projects'))));
     $this->projects = new Projects($data['Projects']);
     $this->projects->setEngine($this);
     $this->tasks = new Tasks($data['Items']);
     $this->tasks->setEngine($this);
     return $this;
 }