2017 © Pedro Peláez
 

library tools-api-client

Client library for the BSD Tools API

image

bluestatedigital/tools-api-client

Client library for the BSD Tools API

  • Thursday, February 1, 2018
  • by davehauenstein
  • Repository
  • 31 Watchers
  • 12 Stars
  • 9,196 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 12 Forks
  • 6 Open issues
  • 16 Versions
  • 8 % Grown

The README.md

Blue State Digital PHP API Client

Build Status, (*1)

This library provides an interface to the BSD Tools., (*2)

Example usage:, (*3)

use Blue\Tools\Api\Client;

$client = new Client('user_id', 'secret', 'https://baseurl.com');

/** @var ResponseInterface $response */
$response = $client->get('api/list_things', ['param' => 'value']);

The BSD Tools API will sometimes return a deferred result, which means that the results of the call are not immediately available. The above call, however, will poll for updates to this API call, and will block until the result has been resolved. The manner in which the client polls for updates can be configured as follows:, (*4)

// Set the client to wait 30 seconds between updates
$client->setDeferredResultInterval(30);

// Set the client to give up after 10 updates (a RuntimeException will be thrown)
$client->setDeferredResultMaxAttempts(10);

Installation

Update composer.json:, (*5)

"require": {
    "bluestatedigital/tools-api-client": "~2.0"
}

Handling Responses

By default the API client uses Guzzle's RequestException for any responses above HTTP 300. To use your own handler you may either create your own Guzzle error plugin or emitter (see Guzzle 5 documentation), or disable Guzzle's handler entirely by using the following code:, (*6)

// Prevent Exceptions on non-actionable HTTP response (400 and 500 range)
$client->setRequestOption('exceptions', false);

The Versions

01/02 2018

3.x-dev

3.9999999.9999999.9999999-dev

Client library for the BSD Tools API

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

01/02 2018

v3.3.0

3.3.0.0

Client library for the BSD Tools API

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

10/01 2018

v3.2.0

3.2.0.0

Client library for the BSD Tools API

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

12/12 2017

v3.1.0

3.1.0.0

Client library for the BSD Tools API

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

26/10 2017

v3.0.0

3.0.0.0

Client library for the BSD Tools API

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

01/06 2017

dev-3.x-update-guzzle

dev-3.x-update-guzzle

Client library for the BSD Tools API

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

31/05 2017

dev-master

9999999-dev

Client library for the BSD Tools API

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

30/05 2017

dev-travis

dev-travis

Client library for the BSD Tools API

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

16/05 2017

3.0.x-dev

3.0.9999999.9999999-dev

Client library for the BSD Tools API

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

14/10 2015

2.0.x-dev

2.0.9999999.9999999-dev

Client library for the BSD Tools API

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

14/10 2015

v2.0.2

2.0.2.0

Client library for the BSD Tools API

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

07/10 2015

v2.0.1

2.0.1.0

Client library for the BSD Tools API

  Sources   Download

The Requires

 

The Development Requires

06/10 2015

2.1.x-dev

2.1.9999999.9999999-dev

Client library for the BSD Tools API

  Sources   Download

The Requires

 

The Development Requires

18/05 2015

v2.0.0

2.0.0.0

Client library for the BSD Tools API

  Sources   Download

The Requires

 

The Development Requires

18/05 2015

1.0.x-dev

1.0.9999999.9999999-dev

Client library for the BSD Tools API

  Sources   Download

18/05 2015

v1.0.0

1.0.0.0

Client library for the BSD Tools API

  Sources   Download