1. Go to this page and download the library: Download kimai/api-php 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/ */
kimai / api-php example snippets
iInstance = new Swagger\Client\Api\AbsenceApi(
// 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 = "id_example"; // string | Absence ID to delete
try {
$apiInstance->deleteDeleteAbsence($id);
} catch (Exception $e) {
echo 'Exception when calling AbsenceApi->deleteDeleteAbsence: ', $e->getMessage(), PHP_EOL;
}
$apiInstance = new Swagger\Client\Api\AbsenceApi(
// 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 = "id_example"; // string | Publi holiday ID to delete
try {
$apiInstance->deleteDeletePublicHoliday($id);
} catch (Exception $e) {
echo 'Exception when calling AbsenceApi->deleteDeletePublicHoliday: ', $e->getMessage(), PHP_EOL;
}
$apiInstance = new Swagger\Client\Api\AbsenceApi(
// 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 = "id_example"; // string | Public holiday group ID to delete
try {
$apiInstance->deleteDeletePublicHolidayGroup($id);
} catch (Exception $e) {
echo 'Exception when calling AbsenceApi->deleteDeletePublicHolidayGroup: ', $e->getMessage(), PHP_EOL;
}
$apiInstance = new Swagger\Client\Api\AbsenceApi(
// 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
);
$user = "user_example"; // string | User ID to filter absences. Needs permission 'contract_other_profile' (default: current user)
$begin = "begin_example"; // string | Only absences after this date will be : ', $e->getMessage(), PHP_EOL;
}
$apiInstance = new Swagger\Client\Api\AbsenceApi(
// 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
);
$group = "group_example"; // string | Public holiday - group ID to filter. (default: default group)
$begin = "begin_example"; // string | Only absences after this date will be {
echo 'Exception when calling AbsenceApi->patchRequestApprovalAbsence: ', $e->getMessage(), PHP_EOL;
}
bash
composer
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.