1 | <?php |
||
27 | class CoinGeckoClient |
||
28 | { |
||
29 | protected const BASE_URI = 'https://api.coingecko.com'; |
||
30 | |||
31 | /** @var Client */ |
||
32 | private $httpClient; |
||
33 | 49 | ||
34 | /** @var ResponseInterface|null */ |
||
35 | 49 | protected $lastResponse; |
|
36 | 49 | ||
37 | public function __construct(?Client $client = null) |
||
41 | |||
42 | public function getHttpClient(): Client |
||
46 | |||
47 | 1 | /** |
|
48 | * @return array |
||
49 | 1 | * @throws Exception |
|
50 | */ |
||
51 | public function ping(): array |
||
55 | |||
56 | public function simple(): Simple |
||
60 | |||
61 | public function coins(): Coins |
||
65 | |||
66 | public function contract(): Contract |
||
70 | |||
71 | public function exchanges(): Exchanges |
||
75 | |||
76 | public function finance(): Finance |
||
80 | |||
81 | public function indexes(): Indexes |
||
85 | |||
86 | public function derivatives(): Derivatives |
||
90 | |||
91 | public function statusUpdates(): StatusUpdates |
||
95 | |||
96 | public function events(): Events |
||
100 | |||
101 | public function exchangeRates(): ExchangeRates |
||
105 | |||
106 | public function globals(): Globals |
||
110 | |||
111 | public function setLastResponse(ResponseInterface $response) |
||
115 | |||
116 | public function getLastResponse(): ?ResponseInterface |
||
120 | } |
||
121 |