PHP code example of xen3r0 / jira-api-client

1. Go to this page and download the library: Download xen3r0/jira-api-client 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/ */

    

xen3r0 / jira-api-client example snippets


use Xen3r0\JiraApiClient\Configuration\ConfigurationFactory;
use Xen3r0\JiraApiClient\Http\JiraClient;
use Xen3r0\JiraApiClient\Repository\Issue\IssueRepository;

$configuration = ConfigurationFactory::create([
    'host' => 'https://your-jira-instance.atlassian.net',
    'username' => 'your-username',
    'password' => 'your-api-token',
]);
$client = new JiraClient($configuration);

$issueRepository = new IssueRepository($client);
$issue = $issueRepository->findByIdOrKey('PROJECT-123');