2016-09-05 00:54:11 +03:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @copyright Copyright (c) 2016 Lukas Reschke <lukas@statuscode.ch>
|
|
|
|
*
|
|
|
|
* @author Lukas Reschke <lukas@statuscode.ch>
|
|
|
|
*
|
|
|
|
* @license GNU AGPL version 3 or any later version
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Affero General Public License as
|
|
|
|
* published by the Free Software Foundation, either version 3 of the
|
|
|
|
* License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Affero General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
return [
|
|
|
|
'routes' => [
|
|
|
|
[
|
2017-07-06 16:37:26 +03:00
|
|
|
'name' => 'Page#index',
|
2016-09-05 00:54:11 +03:00
|
|
|
'url' => '/',
|
|
|
|
'verb' => 'GET',
|
|
|
|
],
|
2017-07-18 15:57:19 +03:00
|
|
|
],
|
|
|
|
'ocs' => [
|
2018-03-26 19:24:39 +03:00
|
|
|
/**
|
|
|
|
* Signaling
|
|
|
|
*/
|
2016-09-05 00:54:11 +03:00
|
|
|
[
|
2018-04-03 18:00:53 +03:00
|
|
|
'name' => 'Signaling#getSettings',
|
|
|
|
'url' => '/api/{apiVersion}/signaling/settings',
|
|
|
|
'verb' => 'GET',
|
2017-07-18 15:57:19 +03:00
|
|
|
'requirements' => [
|
|
|
|
'apiVersion' => 'v1',
|
|
|
|
],
|
2016-09-05 00:54:11 +03:00
|
|
|
],
|
|
|
|
[
|
2018-04-03 18:00:53 +03:00
|
|
|
'name' => 'Signaling#backend',
|
|
|
|
'url' => '/api/{apiVersion}/signaling/backend',
|
|
|
|
'verb' => 'POST',
|
2017-07-18 15:57:19 +03:00
|
|
|
'requirements' => [
|
|
|
|
'apiVersion' => 'v1',
|
|
|
|
],
|
2016-09-05 00:54:11 +03:00
|
|
|
],
|
2017-11-28 19:50:38 +03:00
|
|
|
[
|
2018-04-03 18:00:53 +03:00
|
|
|
'name' => 'Signaling#signaling',
|
2018-04-04 11:30:51 +03:00
|
|
|
'url' => '/api/{apiVersion}/signaling/{token}/messages',
|
2018-04-03 18:00:53 +03:00
|
|
|
'verb' => 'POST',
|
2017-11-28 19:50:38 +03:00
|
|
|
'requirements' => [
|
|
|
|
'apiVersion' => 'v1',
|
2018-04-03 18:00:53 +03:00
|
|
|
'token' => '^[a-z0-9]{4,30}$',
|
2017-11-28 19:50:38 +03:00
|
|
|
],
|
|
|
|
],
|
2017-07-20 14:40:49 +03:00
|
|
|
[
|
2018-04-03 18:00:53 +03:00
|
|
|
'name' => 'Signaling#pullMessages',
|
2018-04-04 11:30:51 +03:00
|
|
|
'url' => '/api/{apiVersion}/signaling/{token}/messages',
|
2018-04-03 18:00:53 +03:00
|
|
|
'verb' => 'GET',
|
2017-07-20 14:40:49 +03:00
|
|
|
'requirements' => [
|
|
|
|
'apiVersion' => 'v1',
|
2018-04-03 18:00:53 +03:00
|
|
|
'token' => '^[a-z0-9]{4,30}$',
|
2017-07-20 14:40:49 +03:00
|
|
|
],
|
|
|
|
],
|
2018-03-26 19:24:39 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Call
|
|
|
|
*/
|
2016-12-21 20:03:49 +03:00
|
|
|
[
|
2017-07-11 09:36:59 +03:00
|
|
|
'name' => 'Call#getPeersForCall',
|
2017-07-11 15:41:19 +03:00
|
|
|
'url' => '/api/{apiVersion}/call/{token}',
|
2016-09-05 00:54:11 +03:00
|
|
|
'verb' => 'GET',
|
2017-06-12 18:03:56 +03:00
|
|
|
'requirements' => [
|
|
|
|
'apiVersion' => 'v1',
|
|
|
|
'token' => '^[a-z0-9]{4,30}$',
|
|
|
|
],
|
2016-09-05 00:54:11 +03:00
|
|
|
],
|
2016-11-17 01:39:00 +03:00
|
|
|
[
|
2017-07-06 16:46:17 +03:00
|
|
|
'name' => 'Call#joinCall',
|
2017-07-11 15:41:19 +03:00
|
|
|
'url' => '/api/{apiVersion}/call/{token}',
|
2016-11-17 01:39:00 +03:00
|
|
|
'verb' => 'POST',
|
2017-06-12 18:03:56 +03:00
|
|
|
'requirements' => [
|
|
|
|
'apiVersion' => 'v1',
|
|
|
|
'token' => '^[a-z0-9]{4,30}$',
|
|
|
|
],
|
2016-11-17 01:39:00 +03:00
|
|
|
],
|
2016-09-05 00:54:11 +03:00
|
|
|
[
|
2017-07-07 09:12:25 +03:00
|
|
|
'name' => 'Call#pingCall',
|
2017-07-13 17:56:03 +03:00
|
|
|
'url' => '/api/{apiVersion}/call/{token}/ping',
|
|
|
|
'verb' => 'POST',
|
2017-06-12 18:03:56 +03:00
|
|
|
'requirements' => [
|
|
|
|
'apiVersion' => 'v1',
|
|
|
|
'token' => '^[a-z0-9]{4,30}$',
|
|
|
|
],
|
2016-10-10 14:52:06 +03:00
|
|
|
],
|
2016-12-06 20:01:51 +03:00
|
|
|
[
|
2017-07-06 16:46:17 +03:00
|
|
|
'name' => 'Call#leaveCall',
|
2017-07-12 11:59:20 +03:00
|
|
|
'url' => '/api/{apiVersion}/call/{token}',
|
2016-12-06 20:01:51 +03:00
|
|
|
'verb' => 'DELETE',
|
2017-07-12 11:59:20 +03:00
|
|
|
'requirements' => [
|
|
|
|
'apiVersion' => 'v1',
|
|
|
|
'token' => '^[a-z0-9]{4,30}$',
|
2017-10-03 09:56:12 +03:00
|
|
|
],
|
|
|
|
],
|
|
|
|
|
2018-03-26 19:24:39 +03:00
|
|
|
/**
|
|
|
|
* Chat
|
|
|
|
*/
|
2017-10-03 09:56:12 +03:00
|
|
|
[
|
|
|
|
'name' => 'Chat#receiveMessages',
|
|
|
|
'url' => '/api/{apiVersion}/chat/{token}',
|
|
|
|
'verb' => 'GET',
|
|
|
|
'requirements' => [
|
|
|
|
'apiVersion' => 'v1',
|
|
|
|
'token' => '^[a-z0-9]{4,30}$',
|
|
|
|
],
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'name' => 'Chat#sendMessage',
|
|
|
|
'url' => '/api/{apiVersion}/chat/{token}',
|
|
|
|
'verb' => 'POST',
|
|
|
|
'requirements' => [
|
|
|
|
'apiVersion' => 'v1',
|
|
|
|
'token' => '^[a-z0-9]{4,30}$',
|
2017-07-12 11:59:20 +03:00
|
|
|
],
|
2016-11-14 13:45:27 +03:00
|
|
|
],
|
2017-07-06 16:37:26 +03:00
|
|
|
|
2018-03-26 19:24:39 +03:00
|
|
|
/**
|
|
|
|
* Room
|
|
|
|
*/
|
2017-07-10 17:21:55 +03:00
|
|
|
[
|
|
|
|
'name' => 'Room#getRooms',
|
|
|
|
'url' => '/api/{apiVersion}/room',
|
|
|
|
'verb' => 'GET',
|
|
|
|
'requirements' => ['apiVersion' => 'v1'],
|
|
|
|
],
|
2017-07-12 12:28:26 +03:00
|
|
|
[
|
|
|
|
'name' => 'Room#createRoom',
|
|
|
|
'url' => '/api/{apiVersion}/room',
|
|
|
|
'verb' => 'POST',
|
|
|
|
'requirements' => ['apiVersion' => 'v1'],
|
|
|
|
],
|
2017-07-10 17:21:55 +03:00
|
|
|
[
|
|
|
|
'name' => 'Room#getRoom',
|
|
|
|
'url' => '/api/{apiVersion}/room/{token}',
|
|
|
|
'verb' => 'GET',
|
|
|
|
'requirements' => [
|
|
|
|
'apiVersion' => 'v1',
|
|
|
|
'token' => '^[a-z0-9]{4,30}$',
|
|
|
|
],
|
|
|
|
],
|
2017-07-06 16:37:26 +03:00
|
|
|
[
|
|
|
|
'name' => 'Room#renameRoom',
|
2017-07-12 12:28:26 +03:00
|
|
|
'url' => '/api/{apiVersion}/room/{token}',
|
2017-07-06 16:37:26 +03:00
|
|
|
'verb' => 'PUT',
|
|
|
|
'requirements' => [
|
|
|
|
'apiVersion' => 'v1',
|
2017-07-12 12:28:26 +03:00
|
|
|
'token' => '^[a-z0-9]{4,30}$',
|
2017-07-06 16:37:26 +03:00
|
|
|
],
|
|
|
|
],
|
2017-07-12 18:08:55 +03:00
|
|
|
[
|
|
|
|
'name' => 'Room#deleteRoom',
|
|
|
|
'url' => '/api/{apiVersion}/room/{token}',
|
|
|
|
'verb' => 'DELETE',
|
|
|
|
'requirements' => [
|
|
|
|
'apiVersion' => 'v1',
|
|
|
|
'token' => '^[a-z0-9]{4,30}$',
|
|
|
|
],
|
|
|
|
],
|
2017-07-06 16:37:26 +03:00
|
|
|
[
|
|
|
|
'name' => 'Room#makePublic',
|
2017-07-12 12:28:26 +03:00
|
|
|
'url' => '/api/{apiVersion}/room/{token}/public',
|
2017-07-06 16:37:26 +03:00
|
|
|
'verb' => 'POST',
|
2017-07-12 12:28:26 +03:00
|
|
|
'requirements' => [
|
|
|
|
'apiVersion' => 'v1',
|
|
|
|
'token' => '^[a-z0-9]{4,30}$',
|
|
|
|
],
|
2017-07-06 16:37:26 +03:00
|
|
|
],
|
|
|
|
[
|
|
|
|
'name' => 'Room#makePrivate',
|
2017-07-12 12:28:26 +03:00
|
|
|
'url' => '/api/{apiVersion}/room/{token}/public',
|
2017-07-06 16:37:26 +03:00
|
|
|
'verb' => 'DELETE',
|
2017-07-12 12:28:26 +03:00
|
|
|
'requirements' => [
|
|
|
|
'apiVersion' => 'v1',
|
|
|
|
'token' => '^[a-z0-9]{4,30}$',
|
|
|
|
],
|
2017-07-06 16:37:26 +03:00
|
|
|
],
|
2017-09-20 10:37:30 +03:00
|
|
|
[
|
|
|
|
'name' => 'Room#setPassword',
|
|
|
|
'url' => '/api/{apiVersion}/room/{token}/password',
|
|
|
|
'verb' => 'PUT',
|
|
|
|
'requirements' => [
|
|
|
|
'apiVersion' => 'v1',
|
|
|
|
'token' => '^[a-z0-9]{4,30}$',
|
|
|
|
],
|
|
|
|
],
|
2017-08-23 16:36:01 +03:00
|
|
|
[
|
|
|
|
'name' => 'Room#getParticipants',
|
|
|
|
'url' => '/api/{apiVersion}/room/{token}/participants',
|
|
|
|
'verb' => 'GET',
|
|
|
|
'requirements' => [
|
|
|
|
'apiVersion' => 'v1',
|
|
|
|
'token' => '^[a-z0-9]{4,30}$',
|
|
|
|
],
|
|
|
|
],
|
2017-07-06 16:37:26 +03:00
|
|
|
[
|
|
|
|
'name' => 'Room#addParticipantToRoom',
|
2017-07-12 12:28:26 +03:00
|
|
|
'url' => '/api/{apiVersion}/room/{token}/participants',
|
2017-07-06 16:37:26 +03:00
|
|
|
'verb' => 'POST',
|
|
|
|
'requirements' => [
|
|
|
|
'apiVersion' => 'v1',
|
2017-07-12 12:28:26 +03:00
|
|
|
'token' => '^[a-z0-9]{4,30}$',
|
2017-07-06 16:37:26 +03:00
|
|
|
],
|
|
|
|
],
|
2017-07-11 15:22:03 +03:00
|
|
|
[
|
|
|
|
'name' => 'Room#removeParticipantFromRoom',
|
|
|
|
'url' => '/api/{apiVersion}/room/{token}/participants',
|
|
|
|
'verb' => 'DELETE',
|
|
|
|
'requirements' => [
|
|
|
|
'apiVersion' => 'v1',
|
|
|
|
'token' => '^[a-z0-9]{4,30}$',
|
|
|
|
],
|
|
|
|
],
|
2017-07-06 16:37:26 +03:00
|
|
|
[
|
2017-07-06 16:46:17 +03:00
|
|
|
'name' => 'Room#removeSelfFromRoom',
|
2017-07-12 12:28:26 +03:00
|
|
|
'url' => '/api/{apiVersion}/room/{token}/participants/self',
|
2017-07-06 16:37:26 +03:00
|
|
|
'verb' => 'DELETE',
|
|
|
|
'requirements' => [
|
|
|
|
'apiVersion' => 'v1',
|
2017-07-12 12:28:26 +03:00
|
|
|
'token' => '^[a-z0-9]{4,30}$',
|
2017-07-06 16:37:26 +03:00
|
|
|
],
|
|
|
|
],
|
2017-09-19 17:46:54 +03:00
|
|
|
[
|
|
|
|
'name' => 'Room#removeGuestFromRoom',
|
|
|
|
'url' => '/api/{apiVersion}/room/{token}/participants/guests',
|
|
|
|
'verb' => 'DELETE',
|
|
|
|
'requirements' => [
|
|
|
|
'apiVersion' => 'v1',
|
|
|
|
'token' => '^[a-z0-9]{4,30}$',
|
|
|
|
],
|
|
|
|
],
|
2017-10-26 17:10:58 +03:00
|
|
|
[
|
|
|
|
'name' => 'Room#joinRoom',
|
|
|
|
'url' => '/api/{apiVersion}/room/{token}/participants/active',
|
|
|
|
'verb' => 'POST',
|
|
|
|
'requirements' => [
|
|
|
|
'apiVersion' => 'v1',
|
|
|
|
'token' => '^[a-z0-9]{4,30}$',
|
|
|
|
],
|
|
|
|
],
|
|
|
|
[
|
2018-03-26 17:25:54 +03:00
|
|
|
'name' => 'Room#leaveRoom',
|
2017-10-26 17:10:58 +03:00
|
|
|
'url' => '/api/{apiVersion}/room/{token}/participants/active',
|
|
|
|
'verb' => 'DELETE',
|
|
|
|
'requirements' => [
|
|
|
|
'apiVersion' => 'v1',
|
|
|
|
'token' => '^[a-z0-9]{4,30}$',
|
|
|
|
],
|
|
|
|
],
|
2017-07-10 17:50:07 +03:00
|
|
|
[
|
|
|
|
'name' => 'Room#promoteModerator',
|
|
|
|
'url' => '/api/{apiVersion}/room/{token}/moderators',
|
|
|
|
'verb' => 'POST',
|
|
|
|
'requirements' => [
|
|
|
|
'apiVersion' => 'v1',
|
|
|
|
'token' => '^[a-z0-9]{4,30}$',
|
|
|
|
],
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'name' => 'Room#demoteModerator',
|
|
|
|
'url' => '/api/{apiVersion}/room/{token}/moderators',
|
|
|
|
'verb' => 'DELETE',
|
|
|
|
'requirements' => [
|
|
|
|
'apiVersion' => 'v1',
|
|
|
|
'token' => '^[a-z0-9]{4,30}$',
|
|
|
|
],
|
|
|
|
],
|
2018-03-26 19:24:39 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Guest
|
|
|
|
*/
|
2018-03-20 12:30:22 +03:00
|
|
|
[
|
|
|
|
'name' => 'Guest#setDisplayName',
|
2018-03-21 16:20:04 +03:00
|
|
|
'url' => '/api/{apiVersion}/guest/{token}/name',
|
2018-03-20 12:30:22 +03:00
|
|
|
'verb' => 'POST',
|
|
|
|
'requirements' => [
|
|
|
|
'apiVersion' => 'v1',
|
2018-03-21 16:20:04 +03:00
|
|
|
'token' => '^[a-z0-9]{4,30}$',
|
2018-03-20 12:30:22 +03:00
|
|
|
],
|
|
|
|
],
|
2016-09-05 00:54:11 +03:00
|
|
|
],
|
2016-10-10 14:52:06 +03:00
|
|
|
];
|
2016-10-19 13:00:17 +03:00
|
|
|
|