spreed/appinfo/routes.php

148 строки
3.4 KiB
PHP
Исходник Обычный вид История

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' => [
[
'name' => 'Page#index',
2016-09-05 00:54:11 +03:00
'url' => '/',
'verb' => 'GET',
],
[
'name' => 'Signalling#signalling',
2016-09-05 00:54:11 +03:00
'url' => '/signalling',
'verb' => 'POST',
],
[
'name' => 'Signalling#pullMessages',
2016-09-05 00:54:11 +03:00
'url' => '/messages',
'verb' => 'GET',
],
[
'name' => 'AppSettings#setSpreedSettings',
'url' => '/settings/admin',
'verb' => 'POST',
],
],
'ocs' => [
[
'name' => 'Call#getPeersForCall',
'url' => '/api/{apiVersion}/call/{token}',
2016-09-05 00:54:11 +03:00
'verb' => 'GET',
'requirements' => [
'apiVersion' => 'v1',
'token' => '^[a-z0-9]{4,30}$',
],
2016-09-05 00:54:11 +03:00
],
[
'name' => 'Call#joinCall',
'url' => '/api/{apiVersion}/call/{token}',
'verb' => 'POST',
'requirements' => [
'apiVersion' => 'v1',
'token' => '^[a-z0-9]{4,30}$',
],
],
2016-09-05 00:54:11 +03:00
[
'name' => 'Call#pingCall',
'url' => '/api/{apiVersion}/call/{token}',
'verb' => 'PUT',
'requirements' => [
'apiVersion' => 'v1',
'token' => '^[a-z0-9]{4,30}$',
],
],
[
'name' => 'Call#leaveCall',
'url' => '/api/{apiVersion}/call/{token}',
'verb' => 'DELETE',
'requirements' => [
'apiVersion' => 'v1',
'token' => '^[a-z0-9]{4,30}$',
],
],
[
'name' => 'Room#getRooms',
'url' => '/api/{apiVersion}/room',
'verb' => 'GET',
'requirements' => ['apiVersion' => 'v1'],
],
[
'name' => 'Room#getRoom',
'url' => '/api/{apiVersion}/room/{token}',
'verb' => 'GET',
'requirements' => [
'apiVersion' => 'v1',
'token' => '^[a-z0-9]{4,30}$',
],
],
[
'name' => 'Room#createRoom',
'url' => '/api/{apiVersion}/room',
'verb' => 'POST',
'requirements' => ['apiVersion' => 'v1'],
],
[
'name' => 'Room#renameRoom',
'url' => '/api/{apiVersion}/room/{roomId}',
'verb' => 'PUT',
'requirements' => [
'apiVersion' => 'v1',
'roomId' => '\d+'
],
],
[
'name' => 'Room#makePublic',
'url' => '/api/{apiVersion}/room/{roomId}/public',
'verb' => 'POST',
'requirements' => ['apiVersion' => 'v1'],
],
[
'name' => 'Room#makePrivate',
'url' => '/api/{apiVersion}/room/{roomId}/public',
'verb' => 'DELETE',
'requirements' => ['apiVersion' => 'v1'],
],
[
'name' => 'Room#addParticipantToRoom',
'url' => '/api/{apiVersion}/room/{roomId}/participants',
'verb' => 'POST',
'requirements' => [
'apiVersion' => 'v1',
'roomId' => '\d+'
],
],
[
'name' => 'Room#removeSelfFromRoom',
'url' => '/api/{apiVersion}/room/{roomId}/participants/self',
'verb' => 'DELETE',
'requirements' => [
'apiVersion' => 'v1',
'roomId' => '\d+'
],
],
2016-09-05 00:54:11 +03:00
],
];