PHP code example of brezzhnev / atlassian-connect-core
1. Go to this page and download the library: Download brezzhnev/atlassian-connect-core 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/ */
brezzhnev / atlassian-connect-core example snippets
php
use AtlassianConnectCore\Http\Clients\JWTClient;
/**
* Retrieve a Confluence page content.
*
* @return array
*/
public function pageContent(int $id): array
{
$client = new JWTClient($this->tenant); // or Auth::user() if you performing a request from the instance
return $client->get('rest/api/content/' . $id, [
'query' => [
'expand' => 'body.storage'
]
]);
}
php
use AtlassianConnectCore\Http\Clients\JWTClient;
/**
* Retrieve an issue object.
*
* @return array
*/
public function viewIssue(string $key): array
{
$client = new JWTClient($this->tenant);
return $client->get('rest/api/2/issue/' . $key);
}