imjonos/laravel-json-api-client

dev-master 2021-08-28 18:54 UTC

This package is auto-updated.

Last update: 2024-04-29 01:07:30 UTC


README

Installation

Via Composer

$ composer require imjonos/laravel-json-api-client

Usage

$resources = JsonApiClient::resources('/api/v1/users');

OR

$client = new Client($apiUrl, $clientId, $clientSecret);
$resources = new Resources($client, '/api/v1/users');

$resources->chunk(100, function($resources, $pageNumber, $total){
  foreach ($resources AS $resource){
                ...
  }
});
$companyResource = new Resource($client, '/api/v1/companies/', 
                [ 
                  'data' => [
                    'id' => '1',
                    'type' => 'companies'
                  ]
]);
$companyResource->get();

[
  'code' => 200,
  'body' => []
  'headers' => []
]

Change log

Please see the changelog for more information on what has changed recently.

Testing

$ composer test

Contributing

Please see contributing.md for details and a todolist.

Security

If you discover any security related issues, please email author email instead of using the issue tracker.

Credits

  • Eugeny Nosenko

License

license. Please see the license file for more information.