Skip to content

Commit 7c94374

Browse files
committed
Update README.md
1 parent 2bde5b5 commit 7c94374

File tree

1 file changed

+26
-14
lines changed

1 file changed

+26
-14
lines changed

README.md

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ See also the [examples](examples).
4444

4545
### Factory
4646

47-
The `Factory` class is responsible for constructing the [`Client`][#client] instance.
47+
The `Factory` class is responsible for constructing the [`Client`](#client) instance.
4848
It also registers everything with the main [`EventLoop`](https://github.com/reactphp/event-loop#usage).
4949

5050
```php
@@ -73,26 +73,38 @@ Only `user` and `pass` have to be set explicitly, the `Factory` assumes defaults
7373

7474
The `Client` class is responsible for communication with the remote SolusVM API.
7575

76-
#### reboot()
76+
#### Actions
7777

78-
The `reboot()` method can be used to reboot your VPS.
78+
All public methods resemble their respective SolusVM Client API actions.
7979

80-
#### boot()
81-
82-
The `boot()` method can be used to boot your VPS.
83-
84-
#### shutdown()
80+
```php
81+
$client->reboot();
82+
$client->boot();
83+
$client->shutdown();
8584

86-
The `shutdown()` method can be used to shutdown your VPS.
85+
$client->status();
86+
$client->info($ipaddr = true, $hdd = true, $mem = true, $bw = true);
87+
```
8788

88-
#### status()
89+
Listing all available actions is out of scope here, please refer to the [class outline](src/Client.php).
8990

90-
The `status()` method can be used to get the status (online/offline) of your VPS.
91+
#### Processing
9192

92-
#### info()
93+
Issuing actions is async (non-blocking), so you can actually send multiple action requests in parallel.
94+
The SolusVM API service will respond to each request with a response value. The order is not guaranteed.
95+
Sending requests uses a [Promise](https://github.com/reactphp/promise)-based interface that makes it easy to react to when a request is *fulfilled*
96+
(i.e. either successfully resolved or rejected with an error):
9397

94-
The `info($ipaddr = true, $hdd = true, $mem = true, $bw = true)` method can be used to retrieve
95-
some information about your VPS.
98+
```php
99+
$client->status()->then(
100+
function ($result) {
101+
// response received for status action
102+
},
103+
function (Exception $e) {
104+
// an error occured while executing the status action
105+
}
106+
});
107+
```
96108

97109
## Install
98110

0 commit comments

Comments
 (0)