Buffer API library client for PHP, (*1)
This library is generated by alpaca, (*2)
Make sure you have composer installed., (*3)
Add the following to your composer.json, (*4)
{ "require": { "cloudkserg/buffer-alpaca": "*" } }
Update your dependencies, (*5)
$ php composer.phar update
This package follows the
PSR-0
convention names for its classes, which means you can easily integrate these classes loading in your own autoloader., (*6)
<?php // This file is generated by Composer require_once 'vendor/autoload.php'; // Then we instantiate a client (as shown below)
$client = new Buffer\Client(); // If you need to send options $client = new Buffer\Client(array(), $options);
$client = new Buffer\Client('1a2b3', $options);
$auth = array('client_id' => '09a8b7', 'client_secret' => '1a2b3'); $client = new Buffer\Client($auth, $options);
$response = $client->klass('args')->method('args'); $response->body; // >>> 'Hello world!' $response->code; // >>> 200 $response->headers; // >>> array('content-type' => 'text/html')
$response->body; // >>> 'The username is pksunkara!'
$response->body; // >>> array('user' => 'pksunkara')
$body = 'username=pksunkara';
$body = array('user' => 'pksunkara');
The following options are available while instantiating a client:, (*7)
The following options are available while calling a method of an api:, (*8)
Returns api instance to get auxilary information about Buffer useful when creating your app., (*9)
$info = $client->info();
Returns an object with the current configuration that Buffer is using, including supported services, their icons and the varying limits of character and schedules., (*10)
$response = $info->show($options);
Returns authenticated user api instance., (*11)
$user = $client->user();
Returns information about the authenticated user., (*12)
$response = $user->show($options);
Returns an array of social media profiles connected to the authenticated users account., (*13)
$response = $user->profiles($options);
Create one or more new status updates., (*14)
The following arguments are required:, (*15)
$response = $user->createUpdate("This is an example update", array( "4eb854340acb04e870000010", "4eb9276e0acb04bb81000067" ), $options);
Returns api instance to get information about links shared through Buffer., (*16)
$link = $client->link();
Returns an object with a the numbers of shares a link has had using Buffer., (*17)
The following arguments are required:, (*18)
$response = $link->shares("http://bufferapp.com", $options);
Returns a social media profile api instance., (*19)
The following arguments are required:, (*20)
$profile = $client->profile("519fc3ca4d5e93901900002f");
Returns details of the single specified social media profile., (*21)
$response = $profile->show($options);
Returns an array of updates that are currently in the buffer for an individual social media profile., (*22)
$response = $profile->pending($options);
Returns an array of updates that have been sent from the buffer for an individual social media profile., (*23)
$response = $profile->sent($options);
Edit the order at which statuses for the specified social media profile will be sent out of the buffer., (*24)
The following arguments are required:, (*25)
$response = $profile->reorder(array( "4eb854340acb04e870000010", "4eb9276e0acb04bb81000067", "4eb2567e0ade04ba51000001" ), $options);
Randomize the order at which statuses for the specified social media profile will be sent out of the buffer., (*26)
$response = $profile->shuffle($options);
Returns scheduling api instance for social media profile., (*27)
The following arguments are required:, (*28)
$schedule = $client->schedule("519fc3ca4d5e93901900002f");
Returns details of the posting schedules associated with a social media profile., (*29)
$response = $schedule->list($options);
Set the posting schedules for the specified social media profile., (*30)
The following arguments are required:, (*31)
$response = $schedule->update(array( array( 'days' => array( "mon", "tue", "thu" ), 'times' => array( "12:45", "15:30", "17:43" ) ) ), $options);
Returns a social media update api instance., (*32)
The following arguments are required:, (*33)
$update = $client->update("4eb8565e0acb04bb82000004");
Returns a single social media update., (*34)
$response = $update->show($options);
Returns the detailed information on individual interactions with the social media update such as favorites, retweets and likes., (*35)
$response = $update->interactions($options);
Edit an existing, individual status update., (*36)
The following arguments are required:, (*37)
$response = $update->update("This is an edited update", $options);
Immediately shares a single pending update and recalculates times for updates remaining in the queue., (*38)
$response = $update->share($options);
Permanently delete an existing status update., (*39)
$response = $update->destroy($options);
Move an existing status update to the top of the queue and recalculate times for all updates in the queue. Returns the update with its new posting time., (*40)
$response = $update->top($options);
Here is a list of [Contributors]((https://github.com/alpaca-api/buffer-php/contributors), (*41)
MIT, (*42)
Report here., (*43)
Pavan Kumar Sunkara (pavan.sss1991@gmail.com), (*44)