aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ApiBundle
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-01-28 18:14:04 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-01-28 18:14:04 +0100
commit3e5a342f6552fc921b9b7fd3d65d9200cdc1979c (patch)
tree2ea4c3a9459923a40fbc9c66dbfae9a8b6a9e94c /src/Wallabag/ApiBundle
parente4788de51ecbf2773a043325965e10eb74b14e8f (diff)
downloadwallabag-3e5a342f6552fc921b9b7fd3d65d9200cdc1979c.tar.gz
wallabag-3e5a342f6552fc921b9b7fd3d65d9200cdc1979c.tar.zst
wallabag-3e5a342f6552fc921b9b7fd3d65d9200cdc1979c.zip
bundle for API
Diffstat (limited to 'src/Wallabag/ApiBundle')
-rw-r--r--src/Wallabag/ApiBundle/Controller/EntryController.php29
-rw-r--r--src/Wallabag/ApiBundle/WallabagApiBundle.php9
2 files changed, 38 insertions, 0 deletions
diff --git a/src/Wallabag/ApiBundle/Controller/EntryController.php b/src/Wallabag/ApiBundle/Controller/EntryController.php
new file mode 100644
index 00000000..07ca8ccf
--- /dev/null
+++ b/src/Wallabag/ApiBundle/Controller/EntryController.php
@@ -0,0 +1,29 @@
1<?php
2
3namespace Wallabag\ApiBundle\Controller;
4
5use Nelmio\ApiDocBundle\Annotation\ApiDoc;
6use Symfony\Bundle\FrameworkBundle\Controller\Controller;
7use Wallabag\CoreBundle\Entity\Entries;
8use FOS\RestBundle\Controller\Annotations\Get;
9use Wallabag\CoreBundle\Entity\Users;
10
11class EntryController extends Controller
12{
13 /**
14 * Fetch an entry for a given user
15 *
16 * @Get("/u/{user}/entry/{entry}")
17 * @ApiDoc(
18 * requirements={
19 * {"name"="user", "dataType"="string", "requirement"="\w+", "description"="The username"},
20 * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"}
21 * }
22 * )
23 * @return Entries
24 */
25 public function getAction(Users $user, Entries $entry)
26 {
27 return $entry;
28 }
29}
diff --git a/src/Wallabag/ApiBundle/WallabagApiBundle.php b/src/Wallabag/ApiBundle/WallabagApiBundle.php
new file mode 100644
index 00000000..19d887ab
--- /dev/null
+++ b/src/Wallabag/ApiBundle/WallabagApiBundle.php
@@ -0,0 +1,9 @@
1<?php
2
3namespace Wallabag\ApiBundle;
4
5use Symfony\Component\HttpKernel\Bundle\Bundle;
6
7class WallabagApiBundle extends Bundle
8{
9}