Skip to content

BrightLocal/BrightLocal-API-Helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

70 Commits

Repository files navigation

BrightLocal API

A basic PHP wrapper to make using the BrightLocal API a little easier. It takes care of authentication so you just need to specify which method you want to call and pass parameters.

Installation

It's easiest to install and use the library via Composer.

Step 1: Add to the requires section of your composer.json file.

"require": {"brightlocal/api": "0.*"}

Step 2: Install

composer install 

Examples

<?phprequire'BrightLocal/Api.php'; $api = newBrightLocal\Api('YOUR_API_KEY', 'YOUR_API_SECRET'); // get a list of clientsprint_r($api->call('/v2/clients/get-all')); // get a clientprint_r($api->call('/v2/clients/get', array( 'client-id' => 1059 ))); // get LSRC report listprint_r($api->call('/v2/lsrc/get-all')); // get LSRC reportprint_r($api->call('/v2/lsrc/get', array( 'campaign-id' => 50 ))); // get CT report listprint_r($api->call('/v2/ct/get-all')); // get a CT reportprint_r($api->call('/v2/ct/get', array( 'report-id' => 259 )));

Example Scripts

Example scripts can be found in /Examples. We'll be adding to these scripts over time.

About

BrightLocal API Code Examples & Related Code

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 5

Languages