spreed/appinfo/routes.php

157 строки
3.6 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',
'url' => '/signalling',
'verb' => 'POST',
],
[
'name' => 'signalling#pullMessages',
'url' => '/messages',
'verb' => 'GET',
],
[
'name' => 'AppSettings#setSpreedSettings',
'url' => '/settings/admin',
'verb' => 'POST',
],
],
'ocs' => [
2016-09-05 00:54:11 +03:00
[
'name' => 'Call#getRooms',
'url' => '/api/{apiVersion}/room',
'verb' => 'GET',
'requirements' => ['apiVersion' => 'v1'],
],
[
'name' => 'Call#getRoom',
'url' => '/api/{apiVersion}/room/{token}',
'verb' => 'GET',
'requirements' => [
'apiVersion' => 'v1',
'token' => '^[a-z0-9]{4,30}$',
],
],
[
'name' => 'Call#getPeersInRoom',
'url' => '/api/{apiVersion}/room/{token}/peers',
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}/room/{token}/join',
'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}/ping',
2016-09-05 00:54:11 +03:00
'verb' => 'POST',
'requirements' => [
'apiVersion' => 'v1',
'token' => '^[a-z0-9]{4,30}$',
],
],
[
'name' => 'Call#leaveCall',
'url' => '/api/{apiVersion}/leave',
'verb' => 'DELETE',
'requirements' => ['apiVersion' => 'v1'],
],
[
'name' => 'Room#createOneToOneRoom',
'url' => '/api/{apiVersion}/oneToOne',
'verb' => 'PUT',
'requirements' => ['apiVersion' => 'v1'],
],
[
'name' => 'Room#createGroupRoom',
'url' => '/api/{apiVersion}/group',
'verb' => 'PUT',
'requirements' => ['apiVersion' => 'v1'],
],
[
'name' => 'Room#createPublicRoom',
'url' => '/api/{apiVersion}/public',
'verb' => 'PUT',
'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/public',
'verb' => 'POST',
'requirements' => ['apiVersion' => 'v1'],
],
[
'name' => 'Room#makePrivate',
'url' => '/api/{apiVersion}/room/public',
'verb' => 'DELETE',
'requirements' => ['apiVersion' => 'v1'],
],
[
'name' => 'Room#addParticipantToRoom',
'url' => '/api/{apiVersion}/room/{roomId}',
'verb' => 'POST',
'requirements' => [
'apiVersion' => 'v1',
'roomId' => '\d+'
],
],
[
'name' => 'Room#removeSelfFromRoom',
'url' => '/api/{apiVersion}/room/{roomId}',
'verb' => 'DELETE',
'requirements' => [
'apiVersion' => 'v1',
'roomId' => '\d+'
],
],
2016-09-05 00:54:11 +03:00
],
];