aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/Dashboard/IAPIWidget.php
diff options
context:
space:
mode:
authorJulien Veyssier <eneiluj@posteo.net>2021-03-22 16:56:24 +0100
committerJulius Härtl <jus@bitgrid.net>2021-06-15 21:34:00 +0200
commite15270cbb9a6aa483f8d85642c267cfd3dc6d25e (patch)
tree9eb108472f046b5b107ac39a18983003b3784232 /lib/public/Dashboard/IAPIWidget.php
parent0450e47f8dda26d19a0a252ddd5a117fddfa6885 (diff)
downloadnextcloud-server-e15270cbb9a6aa483f8d85642c267cfd3dc6d25e.tar.gz
nextcloud-server-e15270cbb9a6aa483f8d85642c267cfd3dc6d25e.zip
implement dashboard API for clients, new WidgetItem class, new IAPIWidget interface
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
Diffstat (limited to 'lib/public/Dashboard/IAPIWidget.php')
-rw-r--r--lib/public/Dashboard/IAPIWidget.php41
1 files changed, 41 insertions, 0 deletions
diff --git a/lib/public/Dashboard/IAPIWidget.php b/lib/public/Dashboard/IAPIWidget.php
new file mode 100644
index 00000000000..42ba9544d8a
--- /dev/null
+++ b/lib/public/Dashboard/IAPIWidget.php
@@ -0,0 +1,41 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * @copyright Copyright (c) 2021 Julien Veyssier <eneiluj@posteo.net>
+ *
+ * @author Julien Veyssier <eneiluj@posteo.net>
+ *
+ * @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/>.
+ *
+ */
+
+namespace OCP\Dashboard;
+
+/**
+ * interface IAPIWidget
+ *
+ * @since 22.0.0
+ */
+interface IAPIWidget extends IWidget {
+
+ /**
+ * @return \OCP\Dashboard\Model\WidgetItem[] The widget items
+ * @since 22.0.0
+ */
+ public function getItems(string $userId, ?string $since = null, int $limit = 7): array;
+}