PHP 8 / Composer Library for Twister P2P
composer require twisterarmy/twister
Twister client communication toolkit
$client = new \Twisterarmy\Twister\Client('http', 'localhost', 28332, 'user', 'pwd');
var_dump(
$client->getPosts(
[
'twisterarmy'
]
)
);
Currently not documented, please visit src/Client.php for details
- importWallet
- getBlockHash
- getBlock
- getPosts
- getPostK
- follow
- unFollow
- getFollowing
- getDHTProfileRevisions
- getDHTAvatarRevisions
- putDHT
- createWalletUser
- sendNewUserTransaction
- newPostMessage
- newRetwistMessage
Useful to create twister news bot
Read remote URL and convert response to formatted twister messages
$array = \Twisterarmy\Twister\Tools\Rss::feed('url');
url
- feed addressformat
-{title} {link}
by default{nl}
- new line{title}
- item title{link}
- target link
length
-256
by defaulterrors
- array of errors
[
time: int,
message: string
],
...