Skip to content

Latest commit

 

History

History
182 lines (120 loc) · 4.72 KB

File metadata and controls

182 lines (120 loc) · 4.72 KB

LORISClient\CandidatesApi

All URIs are relative to https://demo.loris.ca/api/v0.0.4-dev, except if the operation defines another base path.

Method HTTP request Description
createCandidate() POST /candidates Create a new candidate
getCandidate() GET /candidates/{candid} Get candidate details
getCandidates() GET /candidates List all candidates

createCandidate()

createCandidate($candidate_create_request)

Create a new candidate

Example

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


// Configure Bearer (JWT) authorization: BearerAuth
$config = LORISClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new LORISClient\Api\CandidatesApi(
    // 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
);
$candidate_create_request = new \LORISClient\LORISClient\Model\CandidateCreateRequest(); // \LORISClient\LORISClient\Model\CandidateCreateRequest

try {
    $apiInstance->createCandidate($candidate_create_request);
} catch (Exception $e) {
    echo 'Exception when calling CandidatesApi->createCandidate: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
candidate_create_request \LORISClient\LORISClient\Model\CandidateCreateRequest

Return type

void (empty response body)

Authorization

BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

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

getCandidate()

getCandidate($candid): \LORISClient\LORISClient\Model\CandidateObject

Get candidate details

Example

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


// Configure Bearer (JWT) authorization: BearerAuth
$config = LORISClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new LORISClient\Api\CandidatesApi(
    // 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
);
$candid = 'candid_example'; // string

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

Parameters

Name Type Description Notes
candid string

Return type

\LORISClient\LORISClient\Model\CandidateObject

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

getCandidates()

getCandidates(): \LORISClient\LORISClient\Model\CandidatesResponse

List all candidates

Example

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


// Configure Bearer (JWT) authorization: BearerAuth
$config = LORISClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new LORISClient\Api\CandidatesApi(
    // 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->getCandidates();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CandidatesApi->getCandidates: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

\LORISClient\LORISClient\Model\CandidatesResponse

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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