Skip to content

Latest commit

 

History

History
202 lines (139 loc) · 6.48 KB

File metadata and controls

202 lines (139 loc) · 6.48 KB

ClientAPI\Semaphore\ProjectsApi

All URIs are relative to http://localhost:3000/api, except if the operation defines another base path.

Method HTTP request Description
projectsGet() GET /projects Get projects
projectsPost() POST /projects Create a new project
projectsRestorePost() POST /projects/restore Restore Project

projectsGet()

projectsGet(): \ClientAPI\Semaphore\Model\Project[]

Get projects

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: cookie
$config = ClientAPI\Semaphore\Configuration::getDefaultConfiguration()->setApiKey('Cookie', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ClientAPI\Semaphore\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Cookie', 'Bearer');

// Configure API key authorization: bearer
$config = ClientAPI\Semaphore\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ClientAPI\Semaphore\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new ClientAPI\Semaphore\Api\ProjectsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $result = $apiInstance->projectsGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProjectsApi->projectsGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

\ClientAPI\Semaphore\Model\Project[]

Authorization

cookie, bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/plain; charset=utf-8

[Back to top] [Back to API list] [Back to Model list] [Back to README]

projectsPost()

projectsPost($project): \ClientAPI\Semaphore\Model\Project

Create a new project

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: cookie
$config = ClientAPI\Semaphore\Configuration::getDefaultConfiguration()->setApiKey('Cookie', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ClientAPI\Semaphore\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Cookie', 'Bearer');

// Configure API key authorization: bearer
$config = ClientAPI\Semaphore\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ClientAPI\Semaphore\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new ClientAPI\Semaphore\Api\ProjectsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$project = new \ClientAPI\Semaphore\Model\ProjectRequest(); // \ClientAPI\Semaphore\Model\ProjectRequest

try {
    $result = $apiInstance->projectsPost($project);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProjectsApi->projectsPost: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
project \ClientAPI\Semaphore\Model\ProjectRequest

Return type

\ClientAPI\Semaphore\Model\Project

Authorization

cookie, bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, text/plain; charset=utf-8

[Back to top] [Back to API list] [Back to Model list] [Back to README]

projectsRestorePost()

projectsRestorePost($backup): \ClientAPI\Semaphore\Model\Project

Restore Project

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: cookie
$config = ClientAPI\Semaphore\Configuration::getDefaultConfiguration()->setApiKey('Cookie', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ClientAPI\Semaphore\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Cookie', 'Bearer');

// Configure API key authorization: bearer
$config = ClientAPI\Semaphore\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ClientAPI\Semaphore\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new ClientAPI\Semaphore\Api\ProjectsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$backup = new \ClientAPI\Semaphore\Model\ProjectBackup(); // \ClientAPI\Semaphore\Model\ProjectBackup

try {
    $result = $apiInstance->projectsRestorePost($backup);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProjectsApi->projectsRestorePost: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
backup \ClientAPI\Semaphore\Model\ProjectBackup

Return type

\ClientAPI\Semaphore\Model\Project

Authorization

cookie, bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, text/plain; charset=utf-8

[Back to top] [Back to API list] [Back to Model list] [Back to README]