PHP code example of spacetab-io / jira-tempo-sdk

1. Go to this page and download the library: Download spacetab-io/jira-tempo-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/ */

    

spacetab-io / jira-tempo-sdk example snippets


use Amp\Loop;
use Spacetab\TempoSDK\Exception\SdkErrorException;
use Spacetab\TempoSDK\TempoSDK;

Loop::run(function () {
    $jira = TempoSDK::new('https://jira.server.com', 'username', 'TokenString');

    try {
        $result = yield $jira->worklogs()->find(
            new DateTime('01.03.2020'),
            new DateTime('31.03.2020'),
        );
        dump($result);
    } catch (SdkErrorException $e) {
        dump($e->getMessage());
    }
});