Skip to content

Latest commit

 

History

History
133 lines (90 loc) · 3.39 KB

EmployeesApi.md

File metadata and controls

133 lines (90 loc) · 3.39 KB

Troi\EmployeesApi

All URIs are relative to https://demo.troi.software/api/v2/rest, except if the operation defines another base path.

Method HTTP request Description
employeesGet() GET /employees Fetch all Employees for the given clientId
employeesIdGet() GET /employees/{id} Fetch Employee given Employee ID

employeesGet()

employeesGet($client_id): \Troi\Model\ApiEmployee[]

Fetch all Employees for the given clientId

Fetch all Accounts for the given clientId

Example

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


// Configure HTTP basic authorization: basicAuth
$config = Troi\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new Troi\Api\EmployeesApi(
    // 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
);
$client_id = 1; // int | Fetch all Accounts for the given clientId

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

Parameters

Name Type Description Notes
client_id int Fetch all Accounts for the given clientId

Return type

\Troi\Model\ApiEmployee[]

Authorization

basicAuth

HTTP request headers

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

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

employeesIdGet()

employeesIdGet($id): \Troi\Model\ApiEmployee

Fetch Employee given Employee ID

Fetch Employee given Employee ID

Example

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


// Configure HTTP basic authorization: basicAuth
$config = Troi\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new Troi\Api\EmployeesApi(
    // 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
);
$id = 1; // int | Employee id

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

Parameters

Name Type Description Notes
id int Employee id

Return type

\Troi\Model\ApiEmployee

Authorization

basicAuth

HTTP request headers

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

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