A simple PHP library for Calendly API. The API's main documentation is available through the API portal.
To install use composer:
composer require slowprog/calendly-api
<?php
require 'vendor/autoload.php';
use Calendly\CalendlyApi;
use Calendly\CalendlyApiException;
$calendlyApi = new CalendlyApi('YOUR_API_KEY');
try {
$calendlyApi->echo();
$webhook = $calendlyApi->createWebhook('https://some.site', [
CalendlyApi::EVENT_CREATED,
CalendlyApi::EVENT_CANCELED,
]);
var_dump($webhook['id']);
$webhook = $calendlyApi->getWebhook($webhook['id']);
var_dump($webhook['data'][0]['attributes']['created_at']);
$webhooks = $calendlyApi->getWebhooks();
var_dump(count($webhook['data']));
$calendlyApi->deleteWebhook($webhook['data'][0]['id']);
} catch (CalendlyApiException $e) {
var_dump($e->getMessage());
}
The MIT License (MIT). Please see License File for more information.