think.studio/laravel-naviga-ad

Unofficial web integration with naviga ad api

Maintainers

Package info

github.com/dev-think-one/laravel-naviga-ad

pkg:composer/think.studio/laravel-naviga-ad

Statistics

Installs: 24

Dependents: 2

Suggesters: 0

Stars: 0

Open Issues: 0

2.1.0 2023-07-09 07:22 UTC

This package is auto-updated.

Last update: 2026-03-09 14:13:00 UTC


README

Packagist License Packagist Version Total Downloads Build Status Code Coverage Scrutinizer Code Quality

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();

Credits

  • Think Studio