buzzboard/buzzboard-php-sdk

dev-master 2016-01-06 06:22 UTC

This package is not auto-updated.

Last update: 2024-04-27 16:20:18 UTC


README

Build Status Latest Stable Version Scrutinizer Code Quality

Installation

The BuzzBoard SDK can be installed via composer

composer require buzzboard/buzzboard-php-sdk

Documentation

API documentation & Response Codes

Authentication

require __DIR__ . '/vendor/autoload.php';
use BuzzBoard\Client;

$client = new Client('YOUR_API_KEY');

Add Profile

$profile = new BuzzBoard\Profile($client);
$profile->business = 'The business name'; // required
$profile->website = 'http://thebusinessname.com'; // optional
$profile->phone = '123456798'; // required
$profile->address = 'street address'; // required
$profile->city = 'city'; // required
$profile->state = 'state'; // required
$profile->zip = '50001'; // required
// ISO 3166-1 country code (http://en.wikipedia.org/wiki/ISO_3166-1)
$profile->country_code = 'us';

// Account Manager (under which this listing should be listed on BuzzBoard)
$profile->username = 'my_username'; // required
// Contact Person
$profile->contact_name = 'John Doe'; // optional - contact persons name
$profile->contact_email = 'john@example.com'; // optional - contact persons email address
$profile->contact_phone = '132-456-7891'; // optional - contact persons phone number

// Profile ID
$id = $profile->save();

Get Profile

$profile = new BuzzBoard\Profile($client);
$details = $profile->get($id);

print_r($details);

Regenerate Profile

$profile = new BuzzBoard\Profile($client);
$running = $profile->regenerate('PROFILE_ID');

var_export($running); // boolean