PHP 8 / Composer Library for Twister
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
961 B

11 months ago
# twister-php
11 months ago
11 months ago
PHP 8 / Composer Tools for Twister API
11 months ago
## Install
11 months ago
`composer require twisterarmy/twister`
## Features
### Client
Twister client communication toolkit
#### Methods
Currently not documented, please visit src/Client.php for details
* importWallet
* getBlockHash
* getBlock
* getPosts
* follow
* unFollow
* getFollowing
* getDHTProfileRevisions
* getDHTAvatarRevisions
* putDHT
* createWalletUser
* sendNewUserTransaction
* newPostMessage
* newRetwistMessage
11 months ago
### RSS
11 months ago
Useful to create twister news bot
11 months ago
#### Methods
* feed
11 months ago
#### Feed
11 months ago
11 months ago
Read remote URL and convert response to formatted twister messages
11 months ago
```
11 months ago
$array = \Twisterarmy\Twister\Rss::feed('url');
11 months ago
```
11 months ago
##### Request
11 months ago
11 months ago
* `url` - feed address
* `format` - `{title} {link}` by default
+ `{nl}` - new line
+ `{title}` - item title
11 months ago
+ `{link}` - target link
11 months ago
* `length` - `256` by default
* `errors` - array of errors
11 months ago
11 months ago
##### Response
11 months ago
```
11 months ago
[
time: int,
message: string
],
...
```