2017 © Pedro Peláez
 

library badgekit-client

Client for Mozilla BadgeKit API

image

caxy/badgekit-client

Client for Mozilla BadgeKit API

  • Thursday, May 12, 2016
  • by bangpound
  • Repository
  • 4 Watchers
  • 0 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

BadgeKit Client

![Latest Version on Packagist][ico-version] Software License Total Downloads, (*1)

Here is a PHP client for Mozilla's BadgeKit API., (*2)

Install

Via Composer, (*3)

``` bash $ composer require caxy/badgekit-client, (*4)

## Usage

``` php

$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., (*5)

Testing

bash $ composer test, (*6)

Contributing

Please see CONTRIBUTING and CONDUCT for details., (*7)

Security

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

Credits

License

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

The Versions