PHP code example of atomita / backlog-v2

1. Go to this page and download the library: Download atomita/backlog-v2 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/ */

    

atomita / backlog-v2 example snippets




use \atomita\Backlog;
use \atomita\BacklogException;

$backlog = new Backlog('space-name', 'api-key');
try{
    $space = $backlog->space->get();
    var_dump($space);

    $comment = $backlog->issues->param('issue id')->comments->post(['content' => 'comment message']));
    var_dump($comment);
}
catch(BacklogException $e){
    // error
}