php: fetch: prices: generalize crypto APIs' filename, namespace refactor
This commit is contained in:
@@ -27,7 +27,7 @@
|
|||||||
namespace docker_finance\prices
|
namespace docker_finance\prices
|
||||||
{
|
{
|
||||||
require_once('prices/internal/base.php');
|
require_once('prices/internal/base.php');
|
||||||
require_once('prices/internal/prices/coingecko.php');
|
require_once('prices/internal/prices/crypto.php');
|
||||||
require_once('utils/utils.php');
|
require_once('utils/utils.php');
|
||||||
|
|
||||||
use docker_finance\utils as utils;
|
use docker_finance\utils as utils;
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
//! @since docker-finance 1.0.0
|
//! @since docker-finance 1.0.0
|
||||||
|
|
||||||
namespace docker_finance\prices\internal\prices\coingecko
|
namespace docker_finance\prices\internal\prices\crypto
|
||||||
{
|
{
|
||||||
require_once('prices/internal/base.php');
|
require_once('prices/internal/base.php');
|
||||||
require_once('utils/utils.php');
|
require_once('utils/utils.php');
|
||||||
@@ -214,7 +214,7 @@ namespace docker_finance\prices\internal\prices\coingecko
|
|||||||
return 'max';
|
return 'max';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // namespace docker_finance\prices\internal\prices\coingecko
|
} // namespace docker_finance\prices\internal\prices\crypto
|
||||||
|
|
||||||
//! @since docker-finance 1.0.0
|
//! @since docker-finance 1.0.0
|
||||||
|
|
||||||
@@ -232,11 +232,11 @@ namespace docker_finance\prices\internal\prices
|
|||||||
*/
|
*/
|
||||||
final class CoinGecko extends \docker_finance\prices\API
|
final class CoinGecko extends \docker_finance\prices\API
|
||||||
{
|
{
|
||||||
private coingecko\CoinGecko $api; //!< Internal API
|
private crypto\CoinGecko $api; //!< Internal API
|
||||||
|
|
||||||
public function __construct(utils\Env $env)
|
public function __construct(utils\Env $env)
|
||||||
{
|
{
|
||||||
$this->api = new coingecko\CoinGecko($env);
|
$this->api = new crypto\CoinGecko($env);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function fetch(): void
|
public function fetch(): void
|
||||||
Reference in New Issue
Block a user