1 | <?php |
||
27 | class GuzzleClient extends BaseClient implements ClientInterface |
||
28 | { |
||
29 | /** |
||
30 | * Request method. |
||
31 | * |
||
32 | * Generic format for HTTP client request method. |
||
33 | * |
||
34 | * @param string $requestMethod GET/POST/PUT/DELETE |
||
35 | * @param string $path full path to REST resource without domain, ex. 'contacts' |
||
36 | * @param array $params optional params for GET/POST request |
||
37 | * @param string $accessToken Access Token for Wrike access |
||
38 | * |
||
39 | * @see \Zibios\WrikePhpLibrary\Enum\Api\RequestMethodEnum |
||
40 | * @see \Zibios\WrikePhpLibrary\Enum\Api\RequestPathFormatEnum |
||
41 | * |
||
42 | * @throws \Throwable |
||
43 | * @throws ApiException |
||
44 | * |
||
45 | * @return ResponseInterface |
||
46 | */ |
||
47 | 12 | public function executeRequestForParams( |
|
61 | |||
62 | /** |
||
63 | * Main method for calculating request params. |
||
64 | * |
||
65 | * @param string $requestMethod |
||
66 | * @param array $params |
||
67 | * @param string $accessToken |
||
68 | * |
||
69 | * @throws \InvalidArgumentException |
||
70 | * |
||
71 | * @return array |
||
72 | */ |
||
73 | 11 | protected function calculateOptionsForParams(string $requestMethod, array $params, string $accessToken): array |
|
106 | |||
107 | /** |
||
108 | * @param string $accessToken |
||
109 | * |
||
110 | * @throws \InvalidArgumentException |
||
111 | * |
||
112 | * @return array |
||
113 | */ |
||
114 | 11 | protected function prepareBaseOptions(string $accessToken): array |
|
123 | } |
||
124 |