1
0
Fork 0
mirror of https://github.com/joostfaassen/vndb-client-php.git synced 2024-04-29 23:59:25 +03:00

Create README.md

Initial README.md
This commit is contained in:
Joost Faassen 2015-01-03 13:25:54 +01:00
parent d6797bca95
commit 9c42d4a76c

33
README.md Normal file
View file

@ -0,0 +1,33 @@
# vndb-client-php
A vndb.org client for PHP. It can be used both as a PHP library and as a stand-alone CLI tool
## Library usage:
```php
use VndbClient\Client;
$client = new Client();
$client->connect();
$client->login($username, $password);
$res = $client->sendCommand('dbstats'); // send raw command
$res = $client->getVisualNovelDataById(5);
$res = $client->getReleaseDataById(21446);
$res = $client->getProducerDataById(24);
$res = $client->getCharacterDataById(537);
```
All methods return a `VndbClient\Response` object, containing `->getType()` and `->getData()` methods to read the response.
## CLI usage
```
./bin/vndb-client vndb:getbyid your_username your_password vn 5
./bin/vndb-client vndb:getbyid your_username your_password release 5
./bin/vndb-client vndb:getbyid your_username your_password producer 5
./bin/vndb-client vndb:getbyid your_username your_password character 5
```