|
4 | 4 |
|
5 | 5 | This package provides an easy access to [Etherpad Lite](https://github.com/ether/etherpad-lite) throw there built-in [HTTP API](http://etherpad.org/doc/v1.2.11/#index_http_api).
|
6 | 6 |
|
| 7 | +**Supported API Version: 1.2.13 (Release: 1.6.1)** |
| 8 | + |
7 | 9 | ## Installation
|
8 | 10 |
|
9 | 11 | Install the package via Composer
|
10 | 12 |
|
11 |
| - composer require 0x46616c6b/etherpad-lite-client |
| 13 | + composer require 0x46616c6b/etherpad-lite-client |
12 | 14 |
|
13 | 15 | Example (after install)
|
14 | 16 |
|
15 |
| - <?php |
16 |
| - |
17 |
| - $client = new \EtherpadLite\Client($apikey); |
18 |
| - // if you don't use http://localhost:9001 |
19 |
| - //$client = new \EtherpadLite\Client($apikey, 'http://example.com:9001'); |
20 |
| - |
21 |
| - /** @var $response \EtherpadLite\Response */ |
22 |
| - $response = $client->checkToken(); |
23 |
| - |
24 |
| - echo $response->getCode(); |
25 |
| - echo $response->getMessage(); |
26 |
| - echo $response->getData(); |
| 17 | + <?php |
| 18 | + |
| 19 | + $client = new \EtherpadLite\Client($apikey); |
| 20 | + // if you don't use http://localhost:9001 |
| 21 | + //$client = new \EtherpadLite\Client($apikey, 'http://example.com:9001'); |
| 22 | + |
| 23 | + /** @var $response \EtherpadLite\Response */ |
| 24 | + $response = $client->checkToken(); |
| 25 | + |
| 26 | + echo $response->getCode(); |
| 27 | + echo $response->getMessage(); |
| 28 | + echo $response->getData(); |
| 29 | + |
| 30 | +## Testing |
| 31 | + |
| 32 | + vendor/bin/phpunit |
| 33 | + |
| 34 | + # Integration Tests |
| 35 | + # > requires a running etherpad lite instance |
| 36 | + # |
| 37 | + # Environment Variables: |
| 38 | + # ---------------------- |
| 39 | + # API_KEY=cqOtzCYEUyzR23s8tftePVo8HHO |
| 40 | + # BASE_URL=http://localhost:9001 |
| 41 | + |
| 42 | + vendor/bin/behat -f progress |
27 | 43 |
|
28 | 44 | ## Contributing
|
29 | 45 |
|
|
0 commit comments