Skip to content

caxy/badgekit-client

Repository files navigation

BadgeKit Client

Latest Version on Packagist Software License Total Downloads

Here is a PHP client for Mozilla's BadgeKit API.

Install

Via Composer

$ composer require caxy/badgekit-client

Usage

$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);

Change log

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Security

If you discover any security related issues, please email bdoherty@caxy.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

Guzzle client for Mozille BadgeKit API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published