yaroslawww / laravel-naviga-ad
This package is abandoned and no longer maintained.
The author suggests using the think.studio/laravel-naviga-ad package instead.
Unofficial web integration with naviga ad api
2.1.0
2023-07-09 07:22 UTC
Requires
- php: ^8.1
- illuminate/support: ^9.0|^10.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.20
- guzzlehttp/guzzle: ^7.5
- orchestra/testbench: ^8.5
- phpunit/phpunit: ^10.2
- psalm/plugin-laravel: ^2.8
- vimeo/psalm: ^5.13
This package is auto-updated.
Last update: 2023-07-09 08:39:32 UTC
README
Unofficial web integration with naviga ad api.
Web reference there
Installation
You can install the package via composer:
composer require think.studio/laravel-naviga-ad php artisan vendor:publish --provider="NavigaAdClient\ServiceProvider" --tag="config"
NAVIGA_AD_API_USERNAME="api_user" NAVIGA_AD_API_PASSWORD="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" NAVIGA_AD_API_BASE_URL="https://fin.navigahub.com/XxxxxXXXxxxxxx/XXX/api"
Usage
Direct call via facade:
$response = NavigaAd::pendingRequest()->get("campaigns/{$id}"); if ($response->status() == 400) { throw new Exception('Campaign deleted'); } $result = $response->json();
Paginated query
/** @var PaginatedResponse $response */ $response = NavigaAd::paginatedRequest('book/ordertypes', perPage: 16, currentPage: 3)->retrieve(); // or $response = NavigaAd::paginatedRequest('book/orders', 5)->setCurrentPage(2)->retrieve(queryData: [ 'LastModDate' => '2023-07-09T07:14:14.433Z' ]); $response->entities(); $response->currentPage(); $response->totalPages(); $response->countEntities(); $response->totalEntities();