caxy / badgekit-client
Client for Mozilla BadgeKit API
dev-master / 1.0.x-dev
2016-05-12 02:26 UTC
Requires
- guzzlehttp/command: ^0.9
- guzzlehttp/guzzle: ^6.2
- namshi/jose: ^7.1
Requires (Dev)
- phpunit/phpunit: ^5.3
- scrutinizer/ocular: ~1.1
- squizlabs/php_codesniffer: ~2.3
- symfony/yaml: ^3.0
This package is auto-updated.
Last update: 2024-10-22 06:48:21 UTC
README
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.