PHP code example of reinaldomendes / changelly-json-rpc
1. Go to this page and download the library: Download reinaldomendes/changelly-json-rpc library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
reinaldomendes / changelly-json-rpc example snippets
use Rbm\Changelly\JsonRpc\Factory as ApiFactory;
$apiFactory = new ApiFactory();
$factoryOptions = [];
$api = $apiFactory->factory($factoryOptions);
use Rbm\Changelly\JsonRpc\Factory as ApiFactory;
$apiFactory = new ApiFactory();
$apiFactory->factory([
'config' => 'env' // Rbm\Changelly\JsonRpc\Config\Env - this is the default behavior
]);
namespace MyOwnConfig{
use Rbm\Changelly\JsonRpc\Contracts\Config as ConfigContract;
class config implements ConfigContract{
public function getApiKey(){
//... do something
return $myApiKey;
}
public function getApiSecret(){
//... do something
return $myApiSecret;
}
}
}
////
////
use Rbm\Changelly\JsonRpc\Factory as ApiFactory;
$apiFactory = new ApiFactory();
$apiFactory->factory([
'config' => MyOwnConfig\Config::class
]);
use Rbm\Changelly\JsonRpc\Factory as ApiFactory;
$apiFactory = new ApiFactory();
$apiFactory->factory([
'driver' => 'v2' // Rbm\Changelly\JsonRpc\Driver\V2 - this is the default behavior
]);