PHP code example of om-hosting / openmeetings-php-client
1. Go to this page and download the library: Download om-hosting/openmeetings-php-client 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/ */
om-hosting / openmeetings-php-client example snippets
Instance = new Swagger\Client\Api\CalendarServiceApi(
// 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()
);
$sid = "sid_example"; // string | The SID of the User. This SID must be marked as Loggedin
$id = 789; // int | the id to delete
try {
$result = $apiInstance->delete($sid, $id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CalendarServiceApi->delete: ', $e->getMessage(), PHP_EOL;
}
$apiInstance = new Swagger\Client\Api\CalendarServiceApi(
// 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()
);
$sid = "sid_example"; // string | The SID of the User. This SID must be marked as Loggedin
$roomid = 789; // int | id of appointment special room
try {
$result = $apiInstance->getByRoom($sid, $roomid);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CalendarServiceApi->getByRoom: ', $e->getMessage(), PHP_EOL;
}
$apiInstance = new Swagger\Client\Api\CalendarServiceApi(
// 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()
);
$sid = "sid_example"; // string | The SID of the User. This SID must be marked as Loggedin
$title = "title_example"; // string | the search string
try {
$result = $apiInstance->getByTitle($sid, $title);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CalendarServiceApi->getByTitle: ', $e->getMessage(), PHP_EOL;
}
$apiInstance = new Swagger\Client\Api\CalendarServiceApi(
// 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()
);
$sid = "sid_example"; // string | The SID of the User. This SID must be marked as Loggedin
try {
$result = $apiInstance->next($sid);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CalendarServiceApi->next: ', $e->getMessage(), PHP_EOL;
}
$apiInstance = new Swagger\Client\Api\CalendarServiceApi(
// 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()
);
$sid = "sid_example"; // string | The SID of the User. This SID must be marked as Loggedin
$userid = 789; // int | the userId the calendar events should be loaded
try {
$result = $apiInstance->nextForUser($sid, $userid);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CalendarServiceApi->nextForUser: ', $e->getMessage(), PHP_EOL;
}
$apiInstance = new Swagger\Client\Api\CalendarServiceApi(
// 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()
);
$sid = "sid_example"; // string | The SID of the User. This SID must be marked as Loggedin
$start = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | start time
$end = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | end time
try {
$result = $apiInstance->range($sid, $start, $end);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CalendarServiceApi->range: ', $e->getMessage(), PHP_EOL;
}
$apiInstance = new Swagger\Client\Api\CalendarServiceApi(
// 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()
);
$sid = "sid_example"; // string | The SID of the User. This SID must be marked as Loggedin
$userid = 789; // int | the userId the calendar events should be loaded
$start = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | start time
$end = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | end time
try {
$result = $apiInstance->rangeForUser($sid, $userid, $start, $end);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CalendarServiceApi->rangeForUser: ', $e->getMessage(), PHP_EOL;
}
$apiInstance = new Swagger\Client\Api\CalendarServiceApi(
// 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()
);
$sid = "sid_example"; // string | The SID of the User. This SID must be marked as Loggedin
$appointment = new \Swagger\Client\Model\AppointmentDTO(); // \Swagger\Client\Model\AppointmentDTO |
try {
$result = $apiInstance->save($sid, $appointment);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CalendarServiceApi->save: ', $e->getMessage(), PHP_EOL;
}