windsor / master-client
There is no license information available for the latest version (dev-master) of this package.
HTTP client to interact with the primary Windsor Telecom API
This package's canonical repository appears to be gone and the package has been frozen as a result.
dev-master
2019-08-01 14:05 UTC
Requires
- php: >=7.1
- dflydev/dot-access-data: ^1.1
- guzzlehttp/guzzle: 6.*
This package is auto-updated.
Last update: 2023-03-21 19:10:29 UTC
README
Currently in alpha, do not use in production
Usage
<?php $guzzle = new GuzzleHttp\Client([ 'base_uri' => '' // set me ]); $client = new Windsor\Master\Client($guzzle); $client->authenticate(''); // set me try { $response = $client->get('contracts'); $data = json_decode($response, true); foreach ($data['data'] as $contracts) { // do something } } catch (Windsor\Master\Exception $e) { echo $e->getMessage()."\n"; if ($e->getType() == 'unknown') { echo 'Request ref: '.$e->getRef()."\n"; } }