PHP code example of larsnieuwenhuizen / clubhouse-connector

1. Go to this page and download the library: Download larsnieuwenhuizen/clubhouse-connector library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

larsnieuwenhuizen / clubhouse-connector example snippets

h
$connector = new Connector('config.yaml');

$connector->getEpicsService()->list();

$epics = $connector->epics()->list();

foreach ($epics as $epic) {
    echo $epic->getName();
    echo $epic->getCreatedAt()->format('d-m-Y');
}

$epic = new Epic();
$epic->setName('My first created Epic')
    ->setDescription('This is the description for my Epic');

$createdEpic = $connector->epics()->create($epic);

$existingEpic = $connector->epics()->get(1);
$existingEpic->setName('A new name for this Epic');

$updatedEpic = $connector->epics()->update($existingEpic);

$connector->epics()->delete(1);

$collection = $connector->epics()->list();

$connector->epics()
$connector->milestones()
$connector->projects()
$connector->stories()

$logger = new MyOwnPsrLogger();
$connector = new Connector('config.yaml', $logger);