aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Controller
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-01-28 17:09:27 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-01-28 17:09:27 +0100
commite4788de51ecbf2773a043325965e10eb74b14e8f (patch)
treeca66ba084b27050ee336b93b82fbd55ac7f9fd3a /src/Wallabag/CoreBundle/Controller
parent569f8d6851ea31b594fc5ccbcc11fe79dbdf2fa6 (diff)
downloadwallabag-e4788de51ecbf2773a043325965e10eb74b14e8f.tar.gz
wallabag-e4788de51ecbf2773a043325965e10eb74b14e8f.tar.zst
wallabag-e4788de51ecbf2773a043325965e10eb74b14e8f.zip
1st implementation of wallabag api, yeah
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller')
-rw-r--r--src/Wallabag/CoreBundle/Controller/ApiController.php21
-rw-r--r--src/Wallabag/CoreBundle/Controller/StaticController.php8
2 files changed, 29 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/ApiController.php b/src/Wallabag/CoreBundle/Controller/ApiController.php
new file mode 100644
index 00000000..ac06701c
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Controller/ApiController.php
@@ -0,0 +1,21 @@
1<?php
2
3namespace Wallabag\CoreBundle\Controller;
4
5use Nelmio\ApiDocBundle\Annotation\ApiDoc;
6use Symfony\Bundle\FrameworkBundle\Controller\Controller;
7use Wallabag\CoreBundle\Entity\Entries;
8
9class ApiController extends Controller
10{
11 /**
12 * @ApiDoc(
13 * resource=true,
14 * description="This is a demo method. Just remove it",
15 * )
16 */
17 public function getEntryAction()
18 {
19 return new Entries('Blobby');
20 }
21}
diff --git a/src/Wallabag/CoreBundle/Controller/StaticController.php b/src/Wallabag/CoreBundle/Controller/StaticController.php
index 0fd19d65..07931f58 100644
--- a/src/Wallabag/CoreBundle/Controller/StaticController.php
+++ b/src/Wallabag/CoreBundle/Controller/StaticController.php
@@ -17,4 +17,12 @@ class StaticController extends Controller
17 array() 17 array()
18 ); 18 );
19 } 19 }
20
21 /**
22 * @Route("/", name="homepage")
23 */
24 public function apiAction()
25 {
26 return $this->redirect($this->generateUrl('nelmio_api_doc_index'));
27 }
20} 28}