@@ 46-53 (lines=8) @@ | ||
43 | * |
|
44 | * @return array|bool |
|
45 | */ |
|
46 | public function get($uri, $key = null, array $options = []) |
|
47 | { |
|
48 | $options = $this->getOptions($options); |
|
49 | $response = $this->client->request('GET', $this->getUri($uri), $options); |
|
50 | $decoded = $this->processResponse($response, $key); |
|
51 | ||
52 | return $decoded; |
|
53 | } |
|
54 | ||
55 | /** |
|
56 | * @param string $uri |
|
@@ 62-69 (lines=8) @@ | ||
59 | * |
|
60 | * @return array|bool |
|
61 | */ |
|
62 | public function post($uri, $key = null, array $options = []) |
|
63 | { |
|
64 | $options = $this->getOptions($options); |
|
65 | $response = $this->client->request('POST', $this->getUri($uri), $options); |
|
66 | $decoded = $this->processResponse($response, $key); |
|
67 | ||
68 | return $decoded; |
|
69 | } |
|
70 | ||
71 | /** |
|
72 | * @param string $uri |
|
@@ 78-85 (lines=8) @@ | ||
75 | * |
|
76 | * @return array|bool |
|
77 | */ |
|
78 | public function put($uri, $key = null, array $options = []) |
|
79 | { |
|
80 | $options = $this->getOptions($options); |
|
81 | $response = $this->client->request('PUT', $this->getUri($uri), $options); |
|
82 | $decoded = $this->processResponse($response, $key); |
|
83 | ||
84 | return $decoded; |
|
85 | } |
|
86 | ||
87 | /** |
|
88 | * @param string $uri |
|
@@ 94-101 (lines=8) @@ | ||
91 | * |
|
92 | * @return array|bool |
|
93 | */ |
|
94 | public function delete($uri, $key = null, array $options = []) |
|
95 | { |
|
96 | $options = $this->getOptions($options); |
|
97 | $response = $this->client->request('DELETE', $this->getUri($uri), $options); |
|
98 | $decoded = $this->processResponse($response, $key); |
|
99 | ||
100 | return $decoded; |
|
101 | } |
|
102 | ||
103 | /** |
|
104 | * @param ResponseInterface $response |