| @@ 41-47 (lines=7) @@ | ||
| 38 | * @return array |
|
| 39 | * @throws Exception |
|
| 40 | */ |
|
| 41 | public function get(string $uri, array $query = []): array |
|
| 42 | { |
|
| 43 | $response = $this->client->request('GET', $this->endpoint . $this->version |
|
| 44 | . $uri, ['query' => $query]); |
|
| 45 | ||
| 46 | return $this->transformer->transform($response); |
|
| 47 | } |
|
| 48 | ||
| 49 | /** |
|
| 50 | * @param string $uri |
|
| @@ 55-61 (lines=7) @@ | ||
| 52 | * @return array |
|
| 53 | * @throws Exception |
|
| 54 | */ |
|
| 55 | public function post(string $uri, array $query = []): array |
|
| 56 | { |
|
| 57 | $response = $this->client->request('POST', $this->endpoint . $this->version |
|
| 58 | . $uri, ['query' => $query]); |
|
| 59 | ||
| 60 | return $this->transformer->transform($response); |
|
| 61 | } |
|
| 62 | ||
| 63 | /** |
|
| 64 | * @param string $uri |
|
| @@ 69-75 (lines=7) @@ | ||
| 66 | * @return array |
|
| 67 | * @throws Exception |
|
| 68 | */ |
|
| 69 | public function delete(string $uri, array $query = []): array |
|
| 70 | { |
|
| 71 | $response = $this->client->request('DELETE', $this->endpoint . $this->version |
|
| 72 | . $uri, ['query' => $query]); |
|
| 73 | ||
| 74 | return $this->transformer->transform($response); |
|
| 75 | } |
|
| 76 | } |
|
| 77 | ||