1 | <?php |
||
7 | class Json implements JsonInterface |
||
8 | { |
||
9 | /** |
||
10 | * @var HttpClient |
||
11 | */ |
||
12 | private $httpClient; |
||
13 | |||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | private $endpoint = ''; |
||
18 | |||
19 | /** |
||
20 | * @var array |
||
21 | */ |
||
22 | private $additionalOptions = []; |
||
23 | |||
24 | /** |
||
25 | * @param array $options |
||
26 | */ |
||
27 | 10 | public function __construct(array $options = []) |
|
49 | |||
50 | /** |
||
51 | * @return string |
||
52 | */ |
||
53 | 1 | public function getEndpoint() |
|
57 | |||
58 | 3 | public function get($path, array $params = []) |
|
62 | |||
63 | 2 | public function post($path, array $postData = []) |
|
67 | |||
68 | 1 | public function put($path, array $putData = []) |
|
72 | |||
73 | 1 | public function delete($endpoint, array $data = []) |
|
77 | |||
78 | 1 | public function patch($endpoint, array $data = []) |
|
82 | |||
83 | /** |
||
84 | * @param string $method |
||
85 | * @param string $path |
||
86 | * @param array $options |
||
87 | * |
||
88 | * @return array |
||
89 | */ |
||
90 | 5 | private function request($method, $path, $options) |
|
100 | } |
||
101 |