seatplus/api
Composer 安装命令:
composer require seatplus/api
包简介
Package to consume seatplus data trough an api
关键字:
README 文档
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.
统计信息
- 总下载量: 34
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-08-16