A PHP package to access the Zadarma API by a comprehensive way.
The preferred way to install this extension is through composer.
With Composer installed, you can then install the extension using the following commands:
$ php composer.phar require jlorente/zadarma-php-sdk
or add
...
"require": {
"jlorente/zadarma-php-sdk": "*"
}
to the require
section of your composer.json
file.
You can set the api keys as environment variables or add them later on Zadarma class instantiation.
The name of the environment variables are ZADARMA_API_KEY and ZADARMA_API_SECRET.
Endpoints calls must done through the Zadarma class.
If you haven't set the environment variables previously, remember to provide them on instantiation.
$zadarma = new \Jlorente\Zadarma\Zadarma($apiKey, $apiSecret);
$zadarma->api()->getBalance();
All the API methods are well documented in the Jlorente\Zadarma\Api class.
Copyright © 2019 José Lorente Martín [email protected].
Licensed under the BSD 3-Clause License. See LICENSE.txt for details.