haydenw/nzbcx-api

NZBCX API 库

dev-master 2015-07-30 03:50 UTC

This package is not auto-updated.

Last update: 2024-09-28 18:27:58 UTC


README

这是一个为NZBCX API编写的PHP包装库

安装

使用 Composer 安装。

composer require haydenw/nzbcx-api:dev-master

认证

修改 $apiKey$apiSecret$userId 为您的API详细信息。请确保这些信息被安全保管。

$apiKey = "W8X7nzwDxifU8HYo56TzSXqVRhAFhsUc8RWo";
$apiSecret = "PDmYdflwnE4jQhdvnlDkK3gBQ0E1qmSdX0sL";
$userId = "1234567";

基本用法

$nzbcx = new NZBCX($apiKey, $apiSecret, $userId, true); // Create NZBCX instance in test mode

// Make calls to NZBCX functions and use the results returned
$accountBalance = $nzbcx->accountBalance();
if ($accountBalance) {
	echo "BTC Balance: ".$accountBalance->BTC_balance."\n";
	echo "NZD Balance: ".$accountBalance->NZD_balance."\n";
}

请参阅 example.php 获取更详细的代码用法。