summaryrefslogtreecommitdiffstats
path: root/controller
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2016-05-10 22:53:03 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2016-05-10 22:53:03 +0200
commit19ce49191a6bfbb876b9a05ece6fe72846a1de46 (patch)
tree387bd79d713d0cae828c7bcdf527da34f5b541a9 /controller
parentbff96deb69446acb28bcd9d9b74855818040fb83 (diff)
Add route for api levels
Diffstat (limited to 'controller')
-rw-r--r--controller/apicontroller.php37
1 files changed, 37 insertions, 0 deletions
diff --git a/controller/apicontroller.php b/controller/apicontroller.php
new file mode 100644
index 000000000..be4f36a63
--- /dev/null
+++ b/controller/apicontroller.php
@@ -0,0 +1,37 @@
+<?php
+/**
+ * ownCloud - News
+ *
+ * This file is licensed under the Affero General Public License version 3 or
+ * later. See the COPYING file.
+ *
+ * @author Alessandro Cosentino <cosenal@gmail.com>
+ * @author Bernhard Posselt <dev@bernhard-posselt.com>
+ * @copyright Alessandro Cosentino 2012
+ * @copyright Bernhard Posselt 2012, 2014
+ */
+
+namespace OCA\News\Controller;
+
+use OCP\IRequest;
+use OCP\AppFramework\ApiController as BaseApiController;
+
+class ApiController extends BaseApiController {
+
+ public function __construct($appName,
+ IRequest $request){
+ parent::__construct($appName, $request);
+ }
+
+ /**
+ * @PublicPage
+ * @NoCSRFRequired
+ * @CORS
+ */
+ public function index() {
+ return [
+ 'apiLevels' => ['v1-2', 'v2']
+ ];
+ }
+
+}