blockmove.io/blockmove-api-php
Blockmove.io服务的PHP API库
1.2.1
2020-03-03 12:40 UTC
Requires
- php: >=5.4
- ext-curl: *
- ext-json: *
This package is auto-updated.
Last update: 2024-09-09 21:12:21 UTC
README
文档可在网站https://docs.blockmove.io找到。
本包中包含示例。
通过composer安装包
composer require blockmove.io/blockmove-api-php
示例
require_once '../src/APIClient.php'; require_once '../src/APIException.php'; require_once '../src/APIRequestException.php'; use BlockmoveAPI\APIClient; use BlockmoveAPI\APIException; use BlockmoveAPI\APIRequestException; // Generated API Key from your Blockmove.io Wallet $apiKey = 'YOUR_API_KEY'; // Generated API Secret Key from your Blockmove.io Wallet $apiSecret = 'YOUR_API_SECRET'; // Wallet ID $walletId = 'WALLET_ID'; try { $result = APIClient::init($apiKey, $apiSecret) ->getWalletBalance($walletId); var_dump($result); } catch (APIException $e) { echo 'API Error: ' . $e->getMessage(); } catch (APIRequestException $e) { echo 'API Request failed: ' . $e->getMessage(); }