Skip to content

Releases: t3ran13/php-graphene-node-client

New commands and bugs fixes

14 Aug 08:22
Compare
Choose a tag to compare

fixed commands:

  • BroadcastTransactionCommand
  • BroadcastTransactionSynchronousCommand

added commands:

  • GetWitnessesByVoteCommand
  • GetActiveWitnessesCommand

New API, commands and bug fix

11 Aug 15:43
Compare
Choose a tag to compare
  • CommandQueryData.php bug was fixed
  • new API
  • new commands

new API and commands

login_api

  • GetVersionCommand
  • LoginCommand

broadcast_api

  • BroadcastTransactionCommand
  • BroadcastTransactionSynchronousCommand

New APIs and updates

10 Aug 06:48
Compare
Choose a tag to compare
  • updated abstract commands classes
  • APIs commands updates
  • added new Reputation viewer tool

New APIs commands

database_api

  • GetAccountCommand
  • GetBlockCommand
  • GetDynamicGlobalPropertiesCommand

login_api

  • GetApiByNameCommand

follow_api

  • GetFollowersCommand

New DB commands added

22 May 06:18
Compare
Choose a tag to compare

New Database commands was added

  • GetDiscussionsByFeedCommand
  • GetDiscussionsByTrendingCommand

Data Transfer Object CommandQueryData for all DataBase commands

11 May 22:12
Compare
Choose a tag to compare

Changes

  • Data Transfer Object CommandQueryData for all DataBase commands
  • DataBase commands in own namespace

Basic Usage

<?php

use GrapheneNodeClient\Commands\CommandQueryData;
use GrapheneNodeClient\Commands\DataBase\GetDiscussionsByCreatedCommand;
use GrapheneNodeClient\Connectors\WebSocket\GolosWSConnector;
use GrapheneNodeClient\Connectors\WebSocket\SteemitWSConnector;


//Set params for query
$commandQuery = new CommandQueryData();
$data = [
    [
        'limit'       => $limit,
        'select_tags' => ['golos'], // for GOLOS
        'tag'         => 'steemit', // for STEEMIT     
    ]
];
$commandQuery->setParams($data);

//OR 
$commandQuery = new CommandQueryData();
$commandQuery->setParamByKey('0:limit', $limit);
$commandQuery->setParamByKey('0:select_tags', [$tag]);
$commandQuery->setParamByKey('0:tag', $tag);

$command = new GetDiscussionsByCreatedCommand(new GolosWSConnector());
$golosPosts = $command->execute(
    $commandQuery
);
// will return
// [
//      "id" => 1,
//      "result" => [
//            [
//                "id": 466628,
//                "author": "piranya",
//                "permlink": "devyatyi-krug",
//                ...
//            ],
//            ...
//      ]
// ]
  
$command = new GetDiscussionsByCreatedCommand(new SteemitWSConnector());
$steemitPosts = $command->execute(
    $commandQuery,
    'result',
    SteemitWSConnector::ANSWER_FORMAT_ARRAY // or SteemitWSConnector::ANSWER_FORMAT_OBJECT
);
// will return
// [
//      [
//          "id": 466628,
//          "author": "piranya",
//          "permlink": "devyatyi-krug",
//          ...
//      ],
//      ...
// ]

Transliterator was dded

26 Mar 11:37
Compare
Choose a tag to compare

Tools

Transliterator

<?php

use GrapheneNodeClient\Tools\Transliterator;


//Encode tags
$tag = Transliterator::encode('пол', Transliterator::LANG_RU); // return 'pol';


//Decode tags
$tag = Transliterator::encode('ru--pol', Transliterator::LANG_RU); // return 'пол';

start project

04 Mar 21:40
Compare
Choose a tag to compare

Implemented Commands List

  • GetContentCommand
  • GetDiscussionsByAuthorBeforeDateCommand
  • GetDiscussionsByBlogCommand
  • GetDiscussionsByCreatedCommand
  • GetTrendingCategoriesCommand

Implemented Connectors List

  • GolosWSConnector (wss://ws.golos.io)
  • SteemitWSConnector (wss://ws.steemit.com)