Skip to content

slowprog/calendly-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Calendly API wrapper

A simple PHP library for Calendly API. The API's main documentation is available through the API portal.

Installation

To install use composer:

composer require slowprog/calendly-api

Usage

<?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());
}

License

The MIT License (MIT). Please see License File for more information.

About

PHP client for Calendly API v1

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages