imjonos / laravel-json-api-client
version 0.1a
dev-master
2021-08-28 18:54 UTC
Requires
- illuminate/support: ~5|~6|~7|~8
Requires (Dev)
- orchestra/testbench: ~5|~6
- phpunit/phpunit: ~9.0
This package is auto-updated.
Last update: 2025-03-01 00:48:08 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.