Unbounce Api Client
Description
A library to consume the Unbounce Api in your Laravel Application., (*1)
Installation
First require in Composer:, (*2)
composer require campaigningbureau/unbounce-api-client
The Service Provider is found via Laravel Autodiscovery., (*3)
Then publish the config settings:, (*4)
php artisan vendor:publish
Configuration
After publishing the config file you can edit them in config/unbounce.php
., (*5)
Make sure you configure at least api_key
., (*6)
Usage
Subaccounts
Load subaccounts as a Collection of Subaccount
Objects:, (*7)
$account_id = 'myAccountId';
$subaccounts = Unbounce::subaccounts($account_id);
Pages
By default the pages of a subaccount are not loaded. To load them use the following command:, (*8)
$account_id = 'myAccountId';
$subaccounts = Unbounce::subaccounts($account_id);
$my_subaccount = $subaccounts->first();
$pages = $my_subaccount->getPages();
Still missing
- More Subaccounts informations:
- Other Resource Routes
- OAuth AuthenticationDriver