You can either use Composer or directly use the git source.
To install via composer follow the installation instructions if you do not already have composer installed.
Once composer is installed, execute the following command in your project root to install this library:
$ composer require addressix/addressixapi-client-php
Be sure to include the composer autoload in your project
require_once '/path/to/your-project/vendor/autoload.php';
$ [email protected]:addressix/addressixapi-client-php.git
$client = new \AddressixAPI\Client(
array('clientid' => '<CLIENTID>',
'secret' => '<SECRET>',
'redirect_uri' => '<REDIRECT_URI>'
));
The Client takes a config array with the following mandatory parameters:
- clientid (String): your apps client id
- secret (String): your apps secret
- redirect_uri (String): the oauth2callback url (which must be registered)
Optional options:
- endpoint (String): Overwrite the default Addressix API endpoint
- verifyssl (boolean): wheter to verify the SSL peer (default true)
Obtain the Apps Client ID and Secret on Create API Application