composer install bluestatedigital/akamai-php-client
If you already have your credentials on hand:
$curl = new Curl;
$client = new Client($curl, $clientToken, $clientSecret, $accessToken, $baseUrl);
$resp = $client->checkQueueLength();
echo $resp->queueLength;
If you want to parse your .edgerc file to get your credentials:
$credentials = new Edgerc('default', '/path/to/my/.edgerc');
// You can now use $credentials->getHost(), $credentials->getClientToken(),
// $credentials->getClientSecret() and $credentials->getAccessToken().
- checkQueueLength()
- getPurgeStatus($id)
- purgeRequest($object)
https://api.ccu.akamai.com/ccu/v2/docs/index.html
This fork of the library simply adds a helper function for parsing credentials out of an .edgerc file, which we currently have on our servers already for other reasons.
This library was originally developed by Jeremy Marc. Thanks for the sweet, sweet code. This got us off the ground quickly.