atereshchuk/bestchange-api

用于处理bestchage.ru伪API的简单包

dev-master 2024-06-09 22:01 UTC

This package is auto-updated.

Last update: 2024-09-09 22:28:37 UTC


README

用于处理bestchage.ru伪API的简单包

特性

  • 使用生成器节省内存

要求

安装

composer require korkoshko/bestchange-api

用法

初始

$bestChange = new BestChange();
$bestChange->setArchivePath(__DIR__); // If param is not set, a tmp directory is used 

$bestChange->download(); // Downloading archive with data

获取API的基本信息

foreach($bestChange->getInfo() as $info) { // The generator returns (https://php.ac.cn/manual/ru/language.generators.php)
    var_dump($info);
}

// Or using sugar method

var_dump(
    $bestChange->getArray(InfoMethod::class);
);

获取兑换者

foreach ($bestChange->getExchangers() as $exchanger) {
    var_dump($exchanger);
}

许可证

MIT