It is PHP API client for Steem/GOLOS blockchain
Github or packagist with MIT license. Author @t3ran13 and active helper
@semaspring
Sometimes you need checking of work some calls or debug them but you can't do you in the php-graphene-node-client library. To do it you need some project. Debugger was created for this goal - you can copy files to php-graphene-node-client library and develope/debug it on the fly (without install to any project).
git clone [email protected]:t3ran13/php-graphene-node-client.git and copy files there (or if you have a project with php-graphene-node-client than make reserve copy and copy files there)cd prodect_dirdocker-compose up -d (to stop use docker-compose stop)docker-compose exec --user www-data php-fpm bash -c "composer install"cd prodect_dirdocker-compose downcd prodect_dirdocker-compose up -d (to stop use docker-compose stop)docker-compose exec --user www-data php-fpm bash -c "php Debug/Test.php" and see answer<?php
namespace GrapheneNodeClient\Debug;
use GrapheneNodeClient\Commands\CommandQueryData;
use GrapheneNodeClient\Commands\Login\GetApiByNameCommand;
use GrapheneNodeClient\Debug\Connectors\WebSocket\GolosWSConnector;
use GrapheneNodeClient\Debug\Connectors\WebSocket\SteemitWSConnector;
use GrapheneNodeClient\Debug\TestCommand;
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
define('PATH', __DIR__ . '/..');
require __DIR__ . "/Autoloader.php"; // only in GrapheneNodeClient project
require __DIR__ . '/../vendor/autoload.php';
$command = new GetApiByNameCommand(new SteemitWSConnector());
$commandQueryData = new CommandQueryData();
$commandQueryData->setParams(
['follow_api']
);
$answer = $command->execute(
$commandQueryData
);
echo ''
. print_r($answer, true) . ''
;
//Or Broadcast Operation
$answer = OpVote::doSynchronous(
ConnectorInterface::PLATFORM_STEEMIT,
'guest123',
'5JRaypasxMx1L97ZUX7YuC5Psb5EAbF821kkAGtBj7xCJFQcbLg',
'firepower',
'steemit-veni-vidi-vici-steemfest-2016-together-we-made-it-happen-thank-you-steemians',
10000
);
echo ''
. print_r($answer, true) . ''
; die;
You can use Debug\TestCommand.php as Template for your own commands
<?php
// code as above
use GrapheneNodeClient\Debug\TestCommand;
$command = new TestCommand(new GolosWSConnector());
$commandQueryData = new CommandQueryData();
$commandQueryData->setParams(
['follow_api']
);
$command->execute(
$commandQueryData
);
It is better with each commit
Commits were done by me