This is an automated email from the ASF dual-hosted git repository. sebawagner pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/openmeetings-site.git
The following commit(s) were added to refs/heads/master by this push: new a60a221 OPENMEETINGS-2674 Update and add section for PHP Composer client module. a60a221 is described below commit a60a221df8d27702d60ba2296eb27107371af4a7 Author: Sebastian Wagner <sebawag...@apache.org> AuthorDate: Sun Sep 26 14:51:44 2021 +1300 OPENMEETINGS-2674 Update and add section for PHP Composer client module. --- RestAPISample.html | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- index.html | 23 ++++++++++++++++-- 2 files changed, 90 insertions(+), 4 deletions(-) diff --git a/RestAPISample.html b/RestAPISample.html index 09b9a9b..0a7c5d8 100644 --- a/RestAPISample.html +++ b/RestAPISample.html @@ -3,7 +3,7 @@ <!doctype html> <!-- - Generated by Apache Maven Doxia at 2021-09-12 Rendered using Reflow Maven Skin 2.3.0 (http://devacfr.github.io/reflow-maven-skin) + Generated by Apache Maven Doxia at 2021-09-26 Rendered using Reflow Maven Skin 2.3.0 (http://devacfr.github.io/reflow-maven-skin) --> <html xml:lang="en" lang="en"> <head> @@ -215,7 +215,7 @@ <main class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-8" role="main"> <nav aria-label="breadcrumb"> <ol class="breadcrumb"> - <li class="publishDate version-date"> Last Published: 2021-09-12</li> + <li class="publishDate version-date"> Last Published: 2021-09-26</li> </ol> </nav> <section> @@ -241,6 +241,70 @@ </div> </section> <section> + <h2 id="how-to-integrate-using-php-and-composer">How to integrate using PHP and composer</h2> + <p>You can integrate OpenMeetings via the Rest API into your PHP project.</p> + <div class="bd-callout bd-callout-info"> + There is a community sponsored free module for integrating with see: + <a class="externalLink" href="https://github.com/om-hosting/openmeetings-php-client" target="_blank">openmeetings-php-client</a> + </div> + <p>Install the module</p> + <div class="source"> + <pre>php composer.phar install openmeetings-php-client +</pre> + </div> + <p>Eg generate a unique hash to enter a conference room:</p> + <ol style="list-style-type: decimal"> + <li>Login to service</li> + <li>Generate Hash for entering a conference room</li> + <li>Construct Login URL</li> + </ol> + <div class="source"> + <pre>$BASE_URL = "http://localhost:5080/openmeetings"; + +//1. Login to service +$config = new Configuration(); +$config->setHost($BASE_URL . '/services'); +$userApiInstance = new UserServiceApi(null, $config); +$serviceResultLoginWrapper = $userApiInstance->login("soapuser", "!HansHans1"); +if ($serviceResultLoginWrapper->getServiceResult()->getType() != "SUCCESS") { + $text = "Login Failed " . $serviceResultLoginWrapper->getServiceResult()->getMessage(); + return view('hello_index', ['text' => $text]); +} +$sid = $serviceResultLoginWrapper->getServiceResult()->getMessage(); + +// 2. Generate Hash for entering a conference room +$serviceResultHashWrapper = $userApiInstance->getRoomHash($sid, + new ExternalUserDTO( + array( + "firstname" => "John", + "lastname" => "Doe", + "external_id" => "uniqueId1", + "external_type" => "myCMS", + "login" => "john.doe", + "email" => "john....@gmail.com" + ) + ), + new RoomOptionsDTO( + array( + "room_id" => 2, + "moderator" => true + ) + ) +); + +// 3. Construct Login URL +$hash = $serviceResultHashWrapper->getServiceResult()->getMessage(); +$url = $this->BASE_URL . "/hash?secure=".$hash; +</pre> + </div> + <p>Full sample source code can be found at <a class="externalLink" href="https://github.com/om-hosting/openmeetings-php-laravel-sample-project" target="_BLANK">https://github.com/om-hosting/openmeetings-php-laravel-sample-project</a> </p> + <p>You can find details about all API endpoints and examples at <a class="externalLink" href="https://github.com/om-hosting/openmeetings-php-client#documentation-for-api-endpoints" target="_blank">https://github.com/om-hosting/openmeetings-php-client#documentation-for-api-endpoints</a></p> + <div class="bd-callout bd-callout-info"> + A sample PHP use case for a website using Laravel can be found here: + <a class="externalLink" href="https://om-hosting.com/openmeetings-integration-php-composer/" target="_BLANK">https://om-hosting.com/openmeetings-integration-php-composer/</a> + </div> +</section> +<section> <h2 id="how-to-integrate-using-nodejs">How to integrate using Node.js</h2> <p>You can integrate OpenMeetings via the Rest API into your Node project.</p> <div class="bd-callout bd-callout-info"> @@ -400,6 +464,9 @@ const loginUrl = `${BASE_URL}/hash?secure=${hashResult.message}` <a class="nav-link" href="#introduction1" title="Introduction">Introduction</a> </li> <li class="h2"> + <a class="nav-link" href="#how-to-integrate-using-php-and-composer" title="How to integrate using PHP and composer">How to integrate using PHP and composer</a> + </li> + <li class="h2"> <a class="nav-link" href="#how-to-integrate-using-nodejs" title="How to integrate using Node.js">How to integrate using Node.js</a> </li> <li class="h2"> diff --git a/index.html b/index.html index 02a67d3..afef67f 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ <!doctype html> <!-- - Generated by Apache Maven Doxia at 2021-09-14 Rendered using Reflow Maven Skin 2.3.0 (http://devacfr.github.io/reflow-maven-skin) + Generated by Apache Maven Doxia at 2021-09-26 Rendered using Reflow Maven Skin 2.3.0 (http://devacfr.github.io/reflow-maven-skin) --> <html xml:lang="en" lang="en"> <head> @@ -215,7 +215,7 @@ <main class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-8" role="main"> <nav aria-label="breadcrumb"> <ol class="breadcrumb"> - <li class="publishDate version-date"> Last Published: 2021-09-14</li> + <li class="publishDate version-date"> Last Published: 2021-09-26</li> </ol> </nav> <div id="carousel0" class="carousel slide" data-ride="carousel"> @@ -302,6 +302,25 @@ <h2 id="news1">News</h2> <div class="bd-callout bd-callout-danger"> <div class="h4"> + PHP integration using composer module + </div> + <div> + You can now use a community contributed PHP composer module to make integration to OpenMeetings easier + <br> + <br> More information: + <ul> + <li>NPM module <a class="externalLink" href="https://github.com/om-hosting/openmeetings-php-client" target="_blank">OpenMeetings PHP Client</a></li> + <li>OpenMeetings <a href="RestAPISample.html#how-to-integrate-using-php-and-composer">PHP Rest API sample</a></li> + </ul> The PHP module makes use of the OpenMeetings Rest API which is now also available in OpenAPI 3.0 format: + <a class="externalLink" href="https://openmeetings.apache.org/swagger/" target="_blank">https://openmeetings.apache.org/swagger/</a> + <br> You can find details about all API endpoints and examples at + <a class="externalLink" href="https://github.com/om-hosting/openmeetings-php-client#documentation-for-api-endpoints" target="_blank">https://github.com/om-hosting/openmeetings-php-client#documentation-for-api-endpoints</a> + </div> + <br> + <span class="date">(2021-09-26)</span> + </div> + <div class="bd-callout bd-callout-danger"> + <div class="h4"> OpenAPI, Swagger and Node.js integration </div> <div>