update readme

This commit is contained in:
twisterarmy 2025-04-22 00:17:36 +03:00
parent 7604ca4942
commit 1a20f3e04a

View File

@ -1,6 +1,6 @@
# twister-php # twister-php
PHP 8 / Composer Library for Twister P2P PHP 8 / Composer tools for twister P2P JSON-RPC API
## Install ## Install
@ -10,9 +10,9 @@ PHP 8 / Composer Library for Twister P2P
### Client ### Client
Twister client communication toolkit Implements JSON-RPC API
``` ``` php
$client = new \Twisterarmy\Twister\Client('http', 'localhost', 28332, 'user', 'pwd'); $client = new \Twisterarmy\Twister\Client('http', 'localhost', 28332, 'user', 'pwd');
var_dump( var_dump(
@ -26,35 +26,35 @@ var_dump(
#### Methods #### Methods
Currently not documented, please visit src/Client.php for details See the `src/Client.php` source for more details!
* importWallet * `importWallet`
* getBlockHash * `getBlockHash`
* getBlock * `getBlock`
* getPosts * `getPosts`
* getPostK * `getPostK`
* follow * `follow`
* unFollow * `unFollow`
* getFollowing * `getFollowing`
* getDHTProfileRevisions * `getDHTProfileRevisions`
* getDHTAvatarRevisions * `getDHTAvatarRevisions`
* putDHT * `putDHT`
* createWalletUser * `createWalletUser`
* sendNewUserTransaction * `sendNewUserTransaction`
* newPostMessage * `newPostMessage`
* newRetwistMessage * `newRetwistMessage`
### Tools ### Tools
#### Atom
``` php
$array = \Twisterarmy\Twister\Tools\Atom::feed('url');
```
#### RSS #### RSS
Useful to create twister news bot ``` php
##### Feed
Read remote URL and convert response to formatted twister messages
```
$array = \Twisterarmy\Twister\Tools\Rss::feed('url'); $array = \Twisterarmy\Twister\Tools\Rss::feed('url');
``` ```
@ -70,7 +70,7 @@ $array = \Twisterarmy\Twister\Tools\Rss::feed('url');
###### Response ###### Response
``` ``` php
[ [
time: int, time: int,
message: string message: string