PHP code example of samson / youtrack

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

    

samson / youtrack example snippets


use Guzzle\Http\Client;

.php');

$http = new Client('https://my.youtrack.endpoint');

$api = new \YouTrack\YouTrackCommunicator($http, array(
    'username' => 'your_api_user',
    'password' => 'your_api_password'
));

$myIssue = $api->getIssue('MYPRJ-1');
var_dump($myIssue);

$api->executeCommands($myIssue, ['State', 'Built'], 'I just closed this automagically.');