PHP code example of causelabs / tempo-php-sdk

1. Go to this page and download the library: Download causelabs/tempo-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.
    
        
<?php
require_once('vendor/autoload.php');

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

    

causelabs / tempo-php-sdk example snippets


use CauseLabs\TempoAPI\GuzzleClient;

$url = 'https://yourjirainstance.jira.com';
$key = 'your-tempo-api-key';

$client = new GuzzleClient($url, $key);

use CauseLabs\TempoAPI\GuzzleClient;
use CauseLabs\TempoAPI\API;

$url = 'https://yourjirainstance.jira.com';
$key = 'your-tempo-api-key';

$client = new GuzzleClient($url, $key);
$api = new API($client);

// Get worklogs for a specific user
$username = 'john_doe';
$start = new DateTime;
$end = new DateTime;

$worklogs = $api->worklogs($username, $start, $end);
bash
composer