Skip to content

Commit

Permalink
upd ws connector
Browse files Browse the repository at this point in the history
phpdoc was updated and fix request body to jsonrpc 2.0
  • Loading branch information
t3ran13 committed Mar 17, 2018
1 parent a63cd94 commit b8b0099
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Connectors/WebSocket/SteemitWSConnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ class SteemitWSConnector extends WSConnectorAbstract
/**
* wss or ws server
*
* if you set several nodes urls, if with first node will be trouble
* it will connect after $maxNumberOfTriesToCallApi tries to next node
*
* @var string
*/
protected $nodeURL = 'wss://steemd.steemit.com';
protected $nodeURL = ['wss://steemd.minnowsupportproject.org'];
}
4 changes: 4 additions & 0 deletions Connectors/WebSocket/WSConnectorAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ abstract class WSConnectorAbstract implements ConnectorInterface
/**
* current node url, for example 'wss://ws.golos.io'
*
* if you set several nodes urls, if with first node will be trouble
* it will connect after $maxNumberOfTriesToCallApi tries to next node
*
* @var string
*/
private $currentNodeURL;
Expand Down Expand Up @@ -150,6 +153,7 @@ public function doRequest($apiName, array $data, $answerFormat = self::ANSWER_FO
{
$requestId = $this->getNextId();
$data = [
'jsonrpc' => '2.0',
'id' => $requestId,
'method' => 'call',
'params' => [
Expand Down

0 comments on commit b8b0099

Please sign in to comment.