PHP code example of rjvandoesburg / laravel-jira-rest-client

1. Go to this page and download the library: Download rjvandoesburg/laravel-jira-rest-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/ */

    

rjvandoesburg / laravel-jira-rest-client example snippets




'providers' => [
    // ...

    Atlassian\JiraRest\JiraRestServiceProvider::class,
],



'aliases' => [
    // ...

    'Jira' => Atlassian\JiraRest\Facades\Jira::class,
],



$request = new \Atlassian\JiraRest\Requests\Issue\IssueRequest;
$response = $request->get('ISSUE-3');

$response = json_decode($response->getBody(), true);



use Atlassian\JiraRest\Requests\Project;

/** @var \Atlassian\JiraRest\Requests\Project\ProjectRequest $request */
$request = app(Project\ProjectRequest::class);

$response = $request->search([
    'maxResults' => 10,
    'startAt' => 0
]);

$output = \json_decode($response->getBody()->getContents(), true);



config('atlassian.jira.auth.basic.username', '[email protected]');
config('atlassian.jira.auth.basic.password', 'secret');

$issue = jira()->issue('ISSUE-3')->get();

$issue = \Jira::issue('ISSUE-3')->get();



'client_options' => [
    'auth' => \App\Services\Jira\Middleware\LogRequestMiddleware::class,
],



use Atlassian\JiraRest\Requests;

/** @var \Atlassian\JiraRest\Requests\ServerInfoRequest $request */
$request = app(Requests\ServerInfoRequest::class);
$request->addMiddleware(\App\Services\Jira\Middleware\LogRequestMiddleware::class);
shell
php artisan vendor:publish --provider="Atlassian\JiraRest\JiraRestServiceProvider"