Package Data | |
---|---|
Maintainer Username: | Blizz |
Maintainer Contact: | Steve@bedezign.com (Steve Guns) |
Package Create Date: | 2016-08-30 |
Package Last Update: | 2016-10-04 |
Language: | PHP |
License: | BSD 3-Clause |
Last Refreshed: | 2025-01-23 15:03:50 |
Package Statistics | |
---|---|
Total Downloads: | 24 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 3 |
Total Watchers: | 5 |
Total Forks: | 1 |
Total Open Issues: | 0 |
PoC to see if it is possible to automatically consume an API that has an OpenAPI specification (pka Swagger).
At this point the library is written for laravel.
If you need to use it, simply create a Client instance with the correct configuration
$api = new \OpenAPI\Consumer\Client('json specification path', [<extra configuration>])
You can then call any operation from the API in a very simplistic way:
$call = $api->operationName->with(['api-data' => 'api-data-value'])->execute();
if ($call->statusCode == 200) {
dd($call->json);
}