PHP code example of qase / api

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

    

qase / api example snippets


use GuzzleHttp\Client;
use Qase\Client\Api\RunsApi;
use Qase\Client\Configuration;
use Qase\Client\Model\RunCreate;

$config = Configuration::getDefaultConfiguration()
    ->setHost(getenv('QASE_API_BASE_URL'))
    ->setApiKey('Token', getenv('QASE_API_TOKEN'));

$runApi = new RunsApi($client, $config);

$run = $runApi->createRun(getenv('QASE_PROJECT_CODE'), new RunCreate([
    'title' => sprintf('PHPUnit [%F]', microtime(true)),
    'is_autotest' => true,
]));