private function update($object)
 {
     $attr = $object->getAttributes();
     $data = $this->encodeResponse($attr);
     $url = $this->getMethodUrl(array('id' => $object->id));
     $req = new HttpRequest();
     $req->setUrl($url);
     $req->setParam('data', $data);
     $req->setMethod('POST');
     $response = $req->perform();
     $result = $this->decodeResponse($response);
     return $this->validateResponse($result);
 }
 public function findWithOptions($options)
 {
     $req = new HttpRequest();
     $url = $this->getMethodUrl($options);
     $req->setUrl($url);
     $req->setParams($options);
     $response = $req->perform();
     $result = $this->decodeResponse($response);
     if (isset($result['error'])) {
         throw new RemoteException($result['error']);
     }
     return $this->createResultDataSet($result);
 }
 public function removeUser($id)
 {
     $url = $this->makeServiceURL(self::API_USER_BASE_URL, '/user/' . $id);
     $req = new HttpRequest();
     $req->setUrl($url);
     $req->setMethod('DELETE');
     return $req->perform();
 }