Please consider this library is under active development and, it's not ready to use in production.
This is a PHP wrapper for the Virgool API.
This wrapper relies on HTTPlug, which defines how HTTP message should be sent and received. You can use any library to send HTTP messages that implements php-http/client-implementation.
composer require nekofar/virgool:^1.0@dev
To install with cURL you may run the following command:
composer require nekofar/virgool:^1.0@dev php-http/curl-client:^1.0
Use your username and password to access your own account.
use \Nekofar\Virgool\Client;
$config = Config::create('username', 'password');
$client = Client::create($config);
try {
$user = $client->getUser();
echo 'Name: ' . $user->name . PHP_EOL;
echo 'User: ' . $user->username . PHP_EOL;
} catche (\Exception $e) {
echo 'Error: ' . $e->getMessage();
}
The test suite is built using PHPUnit. Run the suite of unit tests by running
the phpunit
command or this composer script.
composer test