xen3r0 / jira-api-client
A Modern Jira API client
Requires
- php: ^8.1
- ext-dom: *
- ext-json: *
- ext-xml: *
- phpdocumentor/reflection-docblock: ^5.6.2
- phpstan/phpdoc-parser: ^2.2.0
- symfony/http-client: ^6.4 || ^7.0
- symfony/property-access: ^6.4 || ^7.0
- symfony/property-info: ^6.4 || ^7.0
- symfony/serializer: ^6.4 || ^7.0
- xen3r0/adf-tools: ^1.1.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.85
- phpstan/phpstan: ^2.1
- phpstan/phpstan-phpunit: ^2.0
- phpunit/phpunit: ^10.0
- symfony/framework-bundle: ^6.4 || ^7.0
- symfony/var-dumper: ^6.4
README
Jira API Client is a modern PHP library that provides a simple and fluent interface to interact with the Jira API.
Getting started
Prerequisites
This library requires PHP 8.1 or higher and the following PHP extensions:
dom
json
xml
Installation
Add xen3r0/jira-api-client to your composer.json
file:
php composer.phar require xen3r0/jira-api-client
Usage
Create a new instance of the JiraClient
class:
use Xen3r0\JiraApiClient\Configuration\ConfigurationFactory; use Xen3r0\JiraApiClient\Http\JiraClient; $configuration = ConfigurationFactory::create([ 'host' => 'https://your-jira-instance.atlassian.net', 'username' => 'your-username', 'password' => 'your-api-token', ]); $client = new JiraClient($configuration);
Now, you can use some repositories, for example, IssueRepository
:
use Xen3r0\JiraApiClient\Repository\IssueRepository; $issueRepository = new IssueRepository($client); $issue = $issueRepository->findByIdOrKey('PROJECT-123');
Repositories
This livrary provides several repositories to interact with different Jira API endpoints. Here are some of the available repositories:
CustomFieldOptionRepository
: Manage custom field options in Jira.IssueCommentRepository
: Manage comments on issues in Jira.IssueRepository
: Manage issues in Jira.ProjectRepository
: Manage projects in Jira.VersionRepository
: Manage versions in Jira.
A repository is missing ? You can suggest a new repository by opening an issue and/or pull request.
Contributing
See the CONTRIBUTING.md file for details on how to contribute to this project.
Credits
License
This project is licensed under the MIT License - see the LICENSE file for details