awsm / lib-api
A library of API components to interact with external APIs.
dev-main
2022-10-18 10:15 UTC
Requires
- guzzlehttp/guzzle: 7.4
Requires (Dev)
- phpunit/phpunit: 9.5
This package is auto-updated.
Last update: 2024-12-18 14:51:02 UTC
README
Library for API requests.
Version 1.0.0-alpha-1
Example implementation
<?php use AWSM\LibAPI\Examples\TrustedShopsAPI; use AWSM\LibAPI\Examples\TrustedShopsAuth; use AWSM\LibAPI\Examples\TrustedShopsReviews; $auth = new TrustedShopsAuth( TS_CLIENT_ID, TS_CLIENT_SECRET ); $api = new TrustedShopsAPI( $auth ); $params = [ 'count' => 3, 'status' => 'APPROVED', 'orderBy' => 'rating' ]; $response = $api->request( '/reviews', 'GET', $params );