Corp API
This PHP package is automatically generated by the Swagger Codegen project:
- API version: 1.0.0
- Package version: 1.0.0
- Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen
PHP 5.5 and later
To install the bindings via Composer, add the following to composer.json:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/GIT_USER_ID/corpElfApi.git"
}
],
"require": {
"GIT_USER_ID/corpElfApi": "*@dev"
}
}
Then run composer install
Download the files and include autoload.php:
require_once('/path/to/SwaggerClient-php/vendor/autoload.php');To run the unit tests:
composer install
./vendor/bin/phpunit
Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: apiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Access-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Access-Token', 'Bearer');
$apiInstance = new Swagger\Client\Api\DefaultApi(
// 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 = 56; // int | Identifier of existing reservation
$body = new \Swagger\Client\Model\Initiator(); // \Swagger\Client\Model\Initiator |
try {
$result = $apiInstance->deleteReservation($id, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->deleteReservation: ', $e->getMessage(), PHP_EOL;
}
// Configure API key authorization: apiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Access-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Access-Token', 'Bearer');
$apiInstance = new Swagger\Client\Api\DefaultApi(
// 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 = 56; // int | Identifier of existing reservation
try {
$result = $apiInstance->getReservation($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->getReservation: ', $e->getMessage(), PHP_EOL;
}
// Configure API key authorization: apiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Access-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Access-Token', 'Bearer');
$apiInstance = new Swagger\Client\Api\DefaultApi(
// 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
);
$body = new \Swagger\Client\Model\MeetingRoomReservationDetails(); // \Swagger\Client\Model\MeetingRoomReservationDetails |
try {
$result = $apiInstance->makeReservation($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->makeReservation: ', $e->getMessage(), PHP_EOL;
}
// Configure API key authorization: apiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Access-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Access-Token', 'Bearer');
$apiInstance = new Swagger\Client\Api\DefaultApi(
// 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 = 56; // int | Identifier of existing meeting room
try {
$result = $apiInstance->meetingRoomItem($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->meetingRoomItem: ', $e->getMessage(), PHP_EOL;
}
// Configure API key authorization: apiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Access-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Access-Token', 'Bearer');
$apiInstance = new Swagger\Client\Api\DefaultApi(
// 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
);
$room_location_id = 56; // int | Filter rooms by provided room location (floor)
$location_id = 56; // int | Filter rooms by provided office building
$city_id = 56; // int | Filter rooms by provided city
$limit = 56; // int | Number of items expected in response
$offset = 56; // int | Number of items that should be skipped
try {
$result = $apiInstance->meetingRoomList($room_location_id, $location_id, $city_id, $limit, $offset);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->meetingRoomList: ', $e->getMessage(), PHP_EOL;
}
// Configure API key authorization: apiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Access-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Access-Token', 'Bearer');
$apiInstance = new Swagger\Client\Api\DefaultApi(
// 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
);
$date_from = new \DateTime("2013-10-20"); // \DateTime | Filter reservations starting from the provided date. If missing current date will be used instead.
$date_to = new \DateTime("2013-10-20"); // \DateTime | Filter reservations ending with the provided date.
$room_id = 56; // int | Filter reservations by provided meeting room
$room_location_id = 56; // int | Filter reservations by provided room location (floor)
$location_id = 56; // int | Filter reservations by provided office building
$city_id = 56; // int | Filter reservations by city
$limit = 56; // int | Number of items expected in response
$offset = 56; // int | Number of items that should be skipped
try {
$result = $apiInstance->reservations($date_from, $date_to, $room_id, $room_location_id, $location_id, $city_id, $limit, $offset);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->reservations: ', $e->getMessage(), PHP_EOL;
}
// Configure API key authorization: apiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Access-Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Access-Token', 'Bearer');
$apiInstance = new Swagger\Client\Api\DefaultApi(
// 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 = 56; // int | Identifier of existing reservation
$body = new \Swagger\Client\Model\MeetingRoomReservationDetails(); // \Swagger\Client\Model\MeetingRoomReservationDetails |
try {
$result = $apiInstance->updateReservation($id, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->updateReservation: ', $e->getMessage(), PHP_EOL;
}
?>All URIs are relative to https://virtserver.swaggerhub.com/house-elf/corp/1.0.0
| Class | Method | HTTP request | Description |
|---|---|---|---|
| DefaultApi | deleteReservation | DELETE /meeting-rooms/reservation/{id} | Delete a reservation |
| DefaultApi | getReservation | GET /meeting-rooms/reservation/{id} | Get a reservation |
| DefaultApi | makeReservation | POST /meeting-rooms/reservation | Make a reservation |
| DefaultApi | meetingRoomItem | GET /meeting-rooms/item/{id} | Get meeting rooms by its id |
| DefaultApi | meetingRoomList | GET /meeting-rooms/list | Get meeting rooms filtered by provided parameters |
| DefaultApi | reservations | GET /meeting-rooms/reservations | Get reservations of meeting rooms filtered by provided parameters |
| DefaultApi | updateReservation | PUT /meeting-rooms/reservation/{id} | Update a reservation |
- AuthException
- City
- ConflictException
- ErrorMessage
- ErrorMessageInner
- Initiator
- InlineResponse200
- InlineResponse2001
- InlineResponse2002
- InlineResponse2003
- InlineResponse2003Data
- InlineResponse2004
- InlineResponse2005
- InlineResponse2005Data
- Location
- MeetingRoom
- MeetingRoomReservation
- MeetingRoomReservationDetails
- NotAllowedException
- NotFoundException
- RequestException
- RoomLocation
- ServiceUnavailableException
- Worker
- Type: API key
- API key parameter name: X-Access-Token
- Location: HTTP header