| @@ 415-426 (lines=12) @@ | ||
| 412 | * |
|
| 413 | * @return array výsledek |
|
| 414 | */ |
|
| 415 | public function saveToFlexiBee($data = null) |
|
| 416 | { |
|
| 417 | if (is_null($data)) { |
|
| 418 | $data = $this->getData(); |
|
| 419 | } |
|
| 420 | ||
| 421 | $jsonizedData = $this->jsonizeData($data); |
|
| 422 | ||
| 423 | curl_setopt($this->curl, CURLOPT_POSTFIELDS, $jsonizedData); |
|
| 424 | ||
| 425 | return $this->performRequest($this->agenda.'.'.$this->format, 'PUT'); |
|
| 426 | } |
|
| 427 | ||
| 428 | /** |
|
| 429 | * Převede data do Json formátu pro FlexiBee. |
|
| @@ 454-463 (lines=10) @@ | ||
| 451 | * |
|
| 452 | * @return array odpověď |
|
| 453 | */ |
|
| 454 | public function insertToFlexiBee($data = null) |
|
| 455 | { |
|
| 456 | if (is_null($data)) { |
|
| 457 | $data = $this->getData(); |
|
| 458 | } |
|
| 459 | $jsonizedData = $this->jsonizeData($data); |
|
| 460 | curl_setopt($this->curl, CURLOPT_POSTFIELDS, $jsonizedData); |
|
| 461 | ||
| 462 | return $this->performRequest($this->agenda.'.'.$this->format, 'PUT'); |
|
| 463 | } |
|
| 464 | ||
| 465 | /** |
|
| 466 | * Test if given record ID exists in FlexiBee. |
|