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