seatplus / api
Package to consume seatplus data trough an api
Fund package maintenance!
seatplus
Requires
- php: ^8.1
- laravel/sanctum: ^2.11
- seatplus/web: ^1.0
Requires (Dev)
- nunomaduro/collision: ^6.1
- orchestra/testbench: ^7.1
- pestphp/pest-plugin-laravel: ^1.2
README
Installation
Usage
There are several ways of passing the API token to your application. We'll discuss each of these approaches while using the Guzzle HTTP library to demonstrate their usage. You may choose any of these approaches based on the needs of your application.
Query Strings
Your application's API consumers may specify their token as an api_token
query string value:
$response = $client->request('GET', '/api/user?api_token='.$token);
Request Payload
Your application's API consumers may include their API token in the request's form parameters as an api_token
:
$response = $client->request('POST', '/api/user', [ 'headers' => [ 'Accept' => 'application/json', ], 'form_params' => [ 'api_token' => $token, ], ]);
Bearer Token
Your application's API consumers may provide their API token as a Bearer
token in the Authorization
header of the request:
$response = $client->request('POST', '/api/user', [ 'headers' => [ 'Authorization' => 'Bearer '.$token, 'Accept' => 'application/json', ], ]);
Documentation
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.