This is a PHP library for interacting with the Doopla platform. It provides a simple and easy-to-use interface for making requests to the Doopla API.
This library can be installed via Composer:
composer require punksolid/dooplaFirst, you need to instantiate the Doopla class with an instance of HttpClientInterface. You can use the MockHttpClient for testing purposes.
use Punksolid\Doopla\Doopla;
use Symfony\Component\HttpClient\MockHttpClient;
$client = new MockHttpClient();
$doopla = new Doopla($client);You can set the user's email and password using the setEmail and setPassword methods respectively.
$doopla->setEmail('user@example.com');
$doopla->setPassword('password');To log in, simply call the login method.
$doopla->login();You can get the account balance by calling the getBalance method.
$balance = $doopla->getBalance();This library comes with a set of unit tests. You can run these tests using PHPUnit.
vendor/bin/phpunitContributions are welcome. Please submit a pull request with any enhancements.
This library is open-sourced software licensed under the MIT license.