<commit_before># php-graphene-node-client
PHP client for connection to Graphene node


## Install Via Composer
```
composer require t3ran13/php-graphene-node-client
```

## Basic Usage
```php
<?php

use GrapheneNodeClient\Commands\GetTrendingCategoriesCommand;
use GrapheneNodeClient\Connectors\WebSocket\GolosWSConnector;

$command = new GetTrendingCategoriesCommand(new GolosWSConnector());

$trendingTags = $command->execute(
    [
        "", //'after'
        2 //'limit'
    ]
);
// will return
// [
//      "id" => 2,
//      "result" => [
//            [
//                "name" => "ru--zhiznx",
//                "total_payouts": "410233.942 GBG",
//                ...
//            ],
//            ...
//      ]
// ]
  
$trendingTags = $command->execute(
    [
        "", //'after'
        2 //'limit'
    ],
    'result',
    GolosWSConnector::ANSWER_FORMAT_ARRAY // or GolosWSConnector::ANSWER_FORMAT_OBJECT
);
// will return
// [
//      [
//          "name" => "ru--zhiznx",
//          "total_payouts": "410233.942 GBG",
//          ...
//      ],
//      ...
// ]


```
  
   

## Implemented Commands List

namespace: GrapheneNodeClient\Commands;

- GetContentCommand
- GetDiscussionsByAuthorBeforeDateCommand
- GetDiscussionsByBlogCommand
- GetDiscussionsByCreatedCommand
- GetTrendingCategoriesCommand
  
   

## Implemented Connectors List

namespace: GrapheneNodeClient\Connectors\WebSocket;

- GolosWSConnector
- SteemitWSConnector

switch between connetors <commit_msg>README.md<commit_after># php-graphene-node-client
PHP client for connection to Graphene node


## Install Via Composer
```
composer require t3ran13/php-graphene-node-client
```

## Basic Usage
```php
<?php

use GrapheneNodeClient\Commands\GetTrendingCategoriesCommand;
use GrapheneNodeClient\Connectors\WebSocket\GolosWSConnector;

$command = new GetTrendingCategoriesCommand(new GolosWSConnector());

$trendingTags = $command->execute(
    [
        "", //'after'
        2 //'limit'
    ]
);
// will return
// [
//      "id" => 2,
//      "result" => [
//            [
//                "name" => "ru--zhiznx",
//                "total_payouts": "410233.942 GBG",
//                ...
//            ],
//            ...
//      ]
// ]
  
$trendingTags = $command->execute(
    [
        "", //'after'
        2 //'limit'
    ],
    'result',
    GolosWSConnector::ANSWER_FORMAT_ARRAY // or GolosWSConnector::ANSWER_FORMAT_OBJECT
);
// will return
// [
//      [
//          "name" => "ru--zhiznx",
//          "total_payouts": "410233.942 GBG",
//          ...
//      ],
//      ...
// ]


```
  
   

## Implemented Commands List

namespace: GrapheneNodeClient\Commands;

- GetContentCommand
- GetDiscussionsByAuthorBeforeDateCommand
- GetDiscussionsByBlogCommand
- GetDiscussionsByCreatedCommand
- GetTrendingCategoriesCommand
  
   

## Implemented Connectors List

namespace: GrapheneNodeClient\Connectors\WebSocket;

- GolosWSConnector
- SteemitWSConnector

switch between connectors 
{'fraction_non_alphanumeric': 0.14754098360655737, 'fraction_numerical': 0.01605888256942121, 'mean_word_length': 2.24295010845987, 'pattern_counts': {'":': 4, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '690911', 'n_tokens_mistral': 1046, 'n_tokens_neox': 998, 'n_words': 156}