Beispiel #1
0
 /**
  * Save the list item.
  *
  * @return mix
  */
 public function save()
 {
     $request = new ApiRequest();
     if ($this->id) {
         return $request->newPut("lists/{$this->listId}/listitems/{$this->id}", $this);
     } else {
         $result = $request->newPost("lists/{$this->listId}/listitems/", $this);
         if ($result->id) {
             $this->id = $result->id;
         }
     }
 }