mirror of
https://github.com/twisterarmy/twister-php.git
synced 2025-08-26 14:32:07 +00:00
update readme
This commit is contained in:
parent
7604ca4942
commit
1a20f3e04a
54
README.md
54
README.md
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user