aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_status/appinfo
diff options
context:
space:
mode:
authorGeorg Ehrke <developer@georgehrke.com>2020-06-02 12:48:37 +0200
committerGeorg Ehrke <developer@georgehrke.com>2020-07-31 16:45:27 +0200
commit0fad921840eb801492522af6ef795231163cff20 (patch)
treeddab0d1567d81eeb8d956ec98196180ad296cabd /apps/user_status/appinfo
parentfce6df06e2bd1d68ee5614621ae7f92c6f7fa53d (diff)
downloadnextcloud-server-0fad921840eb801492522af6ef795231163cff20.tar.gz
nextcloud-server-0fad921840eb801492522af6ef795231163cff20.zip
Add user-status app
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
Diffstat (limited to 'apps/user_status/appinfo')
-rw-r--r--apps/user_status/appinfo/info.xml31
-rw-r--r--apps/user_status/appinfo/routes.php43
2 files changed, 74 insertions, 0 deletions
diff --git a/apps/user_status/appinfo/info.xml b/apps/user_status/appinfo/info.xml
new file mode 100644
index 00000000000..04a252ead0c
--- /dev/null
+++ b/apps/user_status/appinfo/info.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<info xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd">
+ <id>user_status</id>
+ <name>User status</name>
+ <summary>User status</summary>
+ <description><![CDATA[User status]]></description>
+ <version>0.0.2</version>
+ <licence>agpl</licence>
+ <author mail="oc.list@georgehrke.com" >Georg Ehrke</author>
+ <namespace>UserStatus</namespace>
+ <default_enable/>
+ <category>social</category>
+ <bugs>https://github.com/nextcloud/server</bugs>
+ <navigations>
+ <navigation>
+ <id>user_status-menuitem</id>
+ <name>User status</name>
+ <route />
+ <order>1</order>
+ <icon>info.svg</icon>
+ <type>settings</type>
+ </navigation>
+ </navigations>
+ <dependencies>
+ <nextcloud min-version="20" max-version="20"/>
+ </dependencies>
+ <background-jobs>
+ <job>OCA\UserStatus\BackgroundJob\ClearOldStatusesBackgroundJob</job>
+ </background-jobs>
+</info>
diff --git a/apps/user_status/appinfo/routes.php b/apps/user_status/appinfo/routes.php
new file mode 100644
index 00000000000..d9b8d17fe4e
--- /dev/null
+++ b/apps/user_status/appinfo/routes.php
@@ -0,0 +1,43 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * @copyright Copyright (c) 2020, Georg Ehrke
+ *
+ * @author Georg Ehrke <oc.list@georgehrke.com>
+ *
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * 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, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+return [
+ 'ocs' => [
+ // Routes for querying statuses
+ ['name' => 'Statuses#findAll', 'url' => '/api/v1/statuses', 'verb' => 'GET'],
+ ['name' => 'Statuses#find', 'url' => '/api/v1/statuses/{userId}', 'verb' => 'GET'],
+ // Routes for manipulating your own status
+ ['name' => 'UserStatus#getStatus', 'url' => '/api/v1/user_status', 'verb' => 'GET'],
+ ['name' => 'UserStatus#setStatus', 'url' => '/api/v1/user_status/status', 'verb' => 'PUT'],
+ ['name' => 'UserStatus#setPredefinedMessage', 'url' => '/api/v1/user_status/message/predefined', 'verb' => 'PUT'],
+ ['name' => 'UserStatus#setCustomMessage', 'url' => '/api/v1/user_status/message/custom', 'verb' => 'PUT'],
+ ['name' => 'UserStatus#clearMessage', 'url' => '/api/v1/user_status/message', 'verb' => 'DELETE'],
+ // Routes for listing default routes
+ ['name' => 'PredefinedStatus#findAll', 'url' => '/api/v1/predefined_statuses/', 'verb' => 'GET']
+ ],
+ 'routes' => [
+ ['name' => 'Heartbeat#heartbeat', 'url' => '/heartbeat', 'verb' => 'PUT'],
+ ],
+];