yaroslawww / laravel-reviewsio-api
This package is abandoned and no longer maintained.
The author suggests using the think.studio/laravel-reviewsio-api package instead.
Laravel reviews.io api.
1.2.0
2023-07-17 09:36 UTC
Requires
- php: ^8.1
- guzzlehttp/guzzle: ^7.5
- illuminate/support: ^9.0|^10.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.20
- orchestra/testbench: ^8.5
- phpunit/phpunit: ^10.2
- psalm/plugin-laravel: ^2.8
- vimeo/psalm: ^5.13
README
API docs are there.
NOTE: currently there is small coverage of api endpoints, and oriented to open api routes.
(Package is targeted to the tasks what I have, not for support fully api, sorry).
Installation
Install the package via composer:
composer require think.studio/laravel-reviewsio-api
Optionally you can publish the config file with:
php artisan vendor:publish --provider="Reviewsio\ServiceProvider" --tag="config"
Usage
use Reviewsio\Facades\Reviewsio; /** @var \Reviewsio\Endpoints\ProductReviewBySku\Response $response */ $response = Reviewsio::api() ->productReviewBySku() ->sku('The Reach') ->paginate() ->call([ 'minRating' => 2, ]); $reviewsCollection = $response->reviews(); $total = $response->total(); $perPage = $response->perPage(); $currentPage = $response->currentPage();