atellitech / gtm-sdk-php
There is no license information available for the latest version (1.0.1) of this package.
1.0.1
2024-08-12 19:43 UTC
Requires
- php: >=8.0.0
- google/apiclient: ^2.0
README
Installation
You can use Composer or simply Download the Release
Composer
The preferred method is via composer. Follow the installation instructions if you do not already have composer installed.
Once composer is installed, execute the following command in your project root to install this library:
composer require backend/gtm-sdk
Finally, be sure to include the autoloader:
require_once '/path/to/your-project/vendor/autoload.php';
Usage
$clientService = new Client();
$clientService->setClientId('{client-id}']);
$clientService->setClientSecret('{client-secret}']);
$clientService->setDeveloperKey('{developer-token}']);
$clientService->setScopes('{scopes}']);
$clientService->setRefreshToken('{token}');
$client = $clientService->generate();
$accountId = '{account_id}';
$accountData = (new Accounts($client))->get($accountId);