library buzzboard-php-sdk
BuzzBoard PHP SDK
buzzboard/buzzboard-php-sdk
BuzzBoard PHP SDK
- Wednesday, January 6, 2016
- by miradnan
- Repository
- 3 Watchers
- 0 Stars
- 0 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 1 Versions
- 0 % Grown
BuzzBoard SDK for PHP
, (*1)
Installation
The BuzzBoard SDK can be installed via composer, (*2)
composer require buzzboard/buzzboard-php-sdk
Documentation
API documentation & Response Codes, (*3)
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