1. Go to this page and download the library: Download ipalaus/buffer-php-sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?phprequire_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ipalaus / buffer-php-sdk example snippets
useIpalaus\Buffer\Client;
useIpalaus\Buffer\TokenAuthorization;
$auth = new TokenAuthorization('access_token');
$client = new Client($auth);
$user = $client->getUser();
$profiles = $client->getProfiles();
$client->getProfile($id);
$client->getProfileSchedules($id);
useIpalaus\Buffer\Schedule;
$schedule = new Schedule;
// you can pass a single string or an array
$schedule->addDay('mon');
$schedule->addDay(array('tue', 'wed'));
// same for time
$schedule->addTime('09:00');
$schedule->addTime(array('12:00', '15:00'));
$client->updateProfileSchedules('id', $schedule);
// alternative syntax, even shorter
$schedule = new Schedule(array('mon', 'tue', 'wed'), array('09:00', '12:00', '15:00'));
$client->updateProfileSchedules($id, $schedule);
// multiple schedules
$weekdays = new Schedule(array('mon', 'tue', 'wed', 'thu', 'fri'), array('09:00', '12:00', '16:00');
$weekends = new Schedule(array('sat', 'sun'), array('12:00', '18:00');
$client->updateProfileSchedules($id, array($weekdays, $weekends));