Here is a PHP client for Mozilla's BadgeKit API.
Via Composer
$ composer require caxy/badgekit-client
$client = new GuzzleHttp\Client([
'base_uri' => 'https://badgekit.example.com'
]);
$middleware = new Caxy\BadgeKit\JwtMiddleware('MASTER_SECRET_FROM_BADGEKIT');
$stack = $client->getConfig('handler');
$stack->push(GuzzleHttp\Middleware::mapRequest($middleware));
$serviceClient = new Caxy\BadgeKit\ServiceClient($client);
$command = $serviceClient->getCommand('get_reviews', [
'system' => 'example',
'application' => '235f684c5e5f88f1575434403adc2562',
'badge' => 'a-groovy-badge',
]);
$result = $serviceClient->execute($command);
Please see CHANGELOG for more information what has changed recently.
$ composer test
Please see CONTRIBUTING and CONDUCT for details.
If you discover any security related issues, please email bdoherty@caxy.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.