For more information regarding the api, see https://api-docs.upsales.com/#/reference/gettingStarted/
- php 7.0+
- composer
Add a repository to your composer.json like so:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/VinniaAB/upsales.git"
}
]
}And then require the package with composer:
composer require vinnia/upsalesA complete html example is located in example.php.
use Vinnia\Upsales\Client;
$client = Client::make('access_token');
$response = $client->getClients();
$data = json_decode((string) $response->getBody(), $assoc = true);
var_dump($data);Copy env.sample.php into env.php and enter a valid access token. Then run the tests:
vendor/bin/codecept runhttps://integration.upsales.com/api/v2/accounts/?token={TOKEN_WITHOUT_BRACES}&custom.fieldId=1&custom.value=556933-9251