]> git.immae.eu Git - github/wallabag/wallabag.git/blame - src/Wallabag/CoreBundle/Controller/WallabagRestController.php
routing for API, trying to respect #414
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Controller / WallabagRestController.php
CommitLineData
f8bf8952
NL
1<?php
2
3namespace Wallabag\CoreBundle\Controller;
4
5use Nelmio\ApiDocBundle\Annotation\ApiDoc;
6use FOS\RestBundle\Controller\Annotations\View;
7use Symfony\Bundle\FrameworkBundle\Controller\Controller;
8use Symfony\Component\Security\Core\Exception\AccessDeniedException;
9use Wallabag\CoreBundle\Entity\Entries;
10use Wallabag\CoreBundle\Entity\Tags;
11use Wallabag\CoreBundle\Entity\Users;
12
13class WallabagRestController
14{
15
16 /**
17 * Fetches all entries
18 *
19 * @ApiDoc(
20 * )
21 * @return Entries
22 */
23 public function getEntriesAction()
24 {
25
26 }
27
28 /**
29 * Fetches an entry
30 *
31 * @ApiDoc(
32 * requirements={
33 * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"}
34 * }
35 * )
36 * @return Entries
37 */
38 public function getEntryAction(Entries $entry)
39 {
40 return $entry;
41 }
42
43 /**
44 * Deletes an entry
45 *
46 * @ApiDoc(
47 * requirements={
48 * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"}
49 * }
50 * )
51 */
52 public function deleteEntriesAction(Entries $entry)
53 {
54
55 }
56
57 /**
58 * Changes several properties of an entry. I.E tags, archived, starred and deleted status
59 *
60 * @ApiDoc(
61 * requirements={
62 * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"}
63 * }
64 * )
65 */
66 public function patchEntriesAction(Entries $entry)
67 {
68
69 }
70
71 /**
72 * Saves a new entry
73 *
74 * @ApiDoc(
75 * )
76 */
77 public function postEntriesAction()
78 {
79
80 }
81
82 /**
83 * Gets tags for an entry
84 *
85 * @ApiDoc(
86 * requirements={
87 * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"}
88 * }
89 * )
90 */
91 public function getEntriesTagsAction(Entries $entry) {
92
93 }
94
95 /**
96 * Saves new tag for an entry
97 *
98 * @ApiDoc(
99 * requirements={
100 * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"}
101 * }
102 * )
103 */
104 public function postEntriesTagsAction(Entries $entry) {
105
106 }
107
108 /**
109 * Remove tag for an entry
110 *
111 * @ApiDoc(
112 * requirements={
113 * {"name"="tag", "dataType"="string", "requirement"="\w+", "description"="The tag"},
114 * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"}
115 * }
116 * )
117 */
118 public function deleteEntriesTagsAction(Entries $entry, Tags $tag)
119 {
120
121 }
122
123 /**
124 * Gets tags for a user
125 *
126 * @ApiDoc(
127 * )
128 */
129 public function getTagsAction() {
130
131 }
132
133 /**
134 * Gets one tag
135 *
136 * @ApiDoc(
137 * {"name"="tag", "dataType"="string", "requirement"="\w+", "description"="The tag"}
138 * )
139 */
140 public function getTagAction(Tags $tag) {
141
142 }
143
144 /**
145 * Delete tag
146 *
147 * @ApiDoc(
148 * requirements={
149 * {"name"="tag", "dataType"="string", "requirement"="\w+", "description"="The tag"}
150 * }
151 * )
152 */
153 public function deleteTagAction(Tags $tag)
154 {
155
156 }
157}