| @@ 111-119 (lines=9) @@ | ||
| 108 | * |
|
| 109 | * @return Ticker |
|
| 110 | */ |
|
| 111 | public function getTickerByCoinId(string $id): Ticker |
|
| 112 | { |
|
| 113 | $response = $this->httpClient->request( |
|
| 114 | 'GET', |
|
| 115 | $this->getEndpointUrl(sprintf('ticker/%s', $id)) |
|
| 116 | ); |
|
| 117 | ||
| 118 | return $this->deserializeResponse($response, Ticker::class); |
|
| 119 | } |
|
| 120 | ||
| 121 | /** |
|
| 122 | * Get coins list |
|
| @@ 130-136 (lines=7) @@ | ||
| 127 | * |
|
| 128 | * @return array|Coin[] |
|
| 129 | */ |
|
| 130 | public function getCoins(): array |
|
| 131 | { |
|
| 132 | $response = $this->httpClient->request('GET', $this->getEndpointUrl('coins')); |
|
| 133 | ||
| 134 | return $this->deserializeResponse($response, sprintf('array<%s>', Coin::class)); |
|
| 135 | ||
| 136 | } |
|
| 137 | ||
| 138 | /** |
|
| 139 | * Get the endpoint URL. |
|