|
@@ 58-69 (lines=12) @@
|
| 55 |
|
* |
| 56 |
|
* @return mixed |
| 57 |
|
*/ |
| 58 |
|
public function execPostRequest($requestOptions, $resourceUrl, $returnData = false) |
| 59 |
|
{ |
| 60 |
|
$data = ['options' => $requestOptions]; |
| 61 |
|
$postString = Request::createQuery($data); |
| 62 |
|
$response = $this->request->exec($resourceUrl, $postString); |
| 63 |
|
|
| 64 |
|
if ($returnData) { |
| 65 |
|
return $this->response->getData($response); |
| 66 |
|
} |
| 67 |
|
|
| 68 |
|
return $this->response->checkResponse($response); |
| 69 |
|
} |
| 70 |
|
|
| 71 |
|
public function execGetRequest($requestOptions, $resourceUrl, $needsPagination = false, $bookmarks = []) |
| 72 |
|
{ |
|
@@ 71-83 (lines=13) @@
|
| 68 |
|
return $this->response->checkResponse($response); |
| 69 |
|
} |
| 70 |
|
|
| 71 |
|
public function execGetRequest($requestOptions, $resourceUrl, $needsPagination = false, $bookmarks = []) |
| 72 |
|
{ |
| 73 |
|
$query = Request::createQuery( |
| 74 |
|
['options' => $requestOptions], '', $bookmarks |
| 75 |
|
); |
| 76 |
|
|
| 77 |
|
$response = $this->request->exec($resourceUrl . "?{$query}"); |
| 78 |
|
if ($needsPagination) { |
| 79 |
|
return $this->response->getPaginationData($response); |
| 80 |
|
} |
| 81 |
|
|
| 82 |
|
return $this->response->getData($response); |
| 83 |
|
} |
| 84 |
|
|
| 85 |
|
/** |
| 86 |
|
* @return Request |