dev-master
9999999-devCoingecko REST API php client
MIT
The Requires
The Development Requires
api rest coingecko
1.0.0
1.0.0.0Coingecko REST API php client
MIT
The Requires
The Development Requires
api rest coingecko
Coingecko REST API php client
![Build Status][testing-image]
[
][coverage-link]
, (*1)
This API client will help you interact with Coingecko data., (*2)
MIT License, (*3)
To create new endpoint - create issue or create pull request, (*4)
composer require madmis/coingecko-api 1.0.*
$api = new CoingeckoApi(); $timestamp = $api->shared()->priceCharts(Api::BASE_ETH, Api::QUOTE_USD, Api::PERIOD_24HOURS, true));
Each endpoint response can be received as array
or as object
., (*5)
To use mapping response to object
set parameter $mapping
to true
., (*6)
$issue = $api->shared()->priceCharts(Api::BASE_ETH, Api::QUOTE_USD, Api::PERIOD_24HOURS, true)); // Result [ { class madmis\CoingeckoApi\Model\Price { protected $price => 379.62131925945 protected $date => DateTime } }, ... ]
Each client request errors wrapped to custom exception madmis\ExchangeApi\Exception\ClientException, (*7)
class madmis\ExchangeApi\Exception\ClientException { private $request => class GuzzleHttp\Psr7\Request private $response => NULL protected $message => "cURL error 7: Failed to connect to 127.0.0.1 port 8080: Connection refused (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)" ... }
ClientException contains original request object and response object if response available, (*8)
class madmis\ExchangeApi\Exception\ClientException { private $request => class GuzzleHttp\Psr7\Request private $response => class GuzzleHttp\Psr7\Response { private $reasonPhrase => "Unauthorized" private $statusCode => 401 ... } protected $message => "Client error: 401" ... }
To run the tests, you'll need to install phpunit. Easiest way to do this is through composer., (*9)
composer install
php vendor/bin/phpunit -c phpunit.xml.dist
Coingecko REST API php client
MIT
api rest coingecko
Coingecko REST API php client
MIT
api rest coingecko