Add a read-only Google AdSense analytics module for admins.
Connect AdSense over OAuth, sync entities and daily reports locally, and show placement performance in the admin panel without calling the Management API from public pages.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Services\Adsense\Exceptions;
|
||||
|
||||
final class AdsenseApiException extends AdsenseException
|
||||
{
|
||||
public function __construct(
|
||||
string $message,
|
||||
public readonly int $status = 0,
|
||||
public readonly string $report = '',
|
||||
?\Throwable $previous = null,
|
||||
) {
|
||||
parent::__construct($message, $status, $previous);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Services\Adsense\Exceptions;
|
||||
|
||||
final class AdsenseAuthorizationException extends AdsenseException {}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Services\Adsense\Exceptions;
|
||||
|
||||
use RuntimeException;
|
||||
|
||||
class AdsenseException extends RuntimeException {}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Services\Adsense\Exceptions;
|
||||
|
||||
final class AdsenseOAuthException extends AdsenseException {}
|
||||
Reference in New Issue
Block a user