pica9 / campaign-drive-api-client
1.2.1
2016-05-03 21:37 UTC
Requires
- php: >=5.3.3
- ext-curl: *
- ext-json: *
- ext-mbstring: *
Requires (Dev)
- phpunit/phpunit: ~4.0
- satooshi/php-coveralls: ~0.6.1
- squizlabs/php_codesniffer: ~2.0
This package is not auto-updated.
Last update: 2024-10-26 19:32:30 UTC
README
Usage
require_once 'autoload.php'; $api = new Pica9\CampaignDrive\ApiClient\DefaultApi; $api->getApiClient()->getConfig() ->setHost('https://your-campaign-drive-domain.com'); try { $token = $api->createToken( "client_credentials", "your-client-id", "your-client-secret", "read:document" ); $api->getApiClient()->getConfig() ->setAccessToken($token->getAccessToken()); $doc = $api->getDocumentById(1); echo $doc->getName(); } catch (\Pica9\CampaignDrive\ApiClient\ApiException $e) { echo "Error encountered!\n"; echo $e->getResponseObject()->getReasonPhrase(); }