| @@ 399-410 (lines=12) @@ | ||
| 396 | * |
|
| 397 | * @return array výsledek |
|
| 398 | */ |
|
| 399 | public function saveToFlexiBee($data = null) |
|
| 400 | { |
|
| 401 | if (is_null($data)) { |
|
| 402 | $data = $this->getData(); |
|
| 403 | } |
|
| 404 | ||
| 405 | $jsonizedData = $this->jsonizeData($data); |
|
| 406 | ||
| 407 | curl_setopt($this->curl, CURLOPT_POSTFIELDS, $jsonizedData); |
|
| 408 | ||
| 409 | return $this->performRequest($this->agenda.'.json', 'PUT'); |
|
| 410 | } |
|
| 411 | ||
| 412 | /** |
|
| 413 | * Převede data do Json formátu pro FlexiBee. |
|
| @@ 438-447 (lines=10) @@ | ||
| 435 | * |
|
| 436 | * @return array odpověď |
|
| 437 | */ |
|
| 438 | public function insertToFlexiBee($data = null) |
|
| 439 | { |
|
| 440 | if (is_null($data)) { |
|
| 441 | $data = $this->getData(); |
|
| 442 | } |
|
| 443 | $jsonizedData = $this->jsonizeData($data); |
|
| 444 | curl_setopt($this->curl, CURLOPT_POSTFIELDS, $jsonizedData); |
|
| 445 | ||
| 446 | return $this->performRequest($this->agenda.'.json', 'PUT'); |
|
| 447 | } |
|
| 448 | ||
| 449 | /** |
|
| 450 | * Test if given record ID exists in FlexiBee |
|