PHP code example of silinternational / jira-php-client

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

    

silinternational / jira-php-client example snippets





use JIRA\Client;

$client = new Client([
  'apiuser' => 'username',
  'apipass' => 'password',
]);

$user = $client->getUser(['userId' => 123456789]);

echo $user['email'];
// [email protected]

$newUser = $client->addUser([
  "name" => "test_user",
  "password" => "newpassword",
  "emailAddress" => "[email protected]",
  "displayName" => "test user",
]);

echo $user['data']['userId'];
// 1234567890




use JIRA\Client;

$client = new Client([
  'apiuser' => 'username',
  'apipass' => 'password',
  'description_override' => [
    'baseUrl' => 'https://my.server.com',
  ],
]);

"silinternational/jira-php-client": "dev-master"