]> git.immae.eu Git - github/wallabag/wallabag.git/blame - src/Wallabag/ApiBundle/Controller/EntryController.php
disable dev environment
[github/wallabag/wallabag.git] / src / Wallabag / ApiBundle / Controller / EntryController.php
CommitLineData
3e5a342f
NL
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;
38ba7ed9
NL
9use FOS\RestBundle\Controller\Annotations\Delete;
10use FOS\RestBundle\Controller\Annotations\Patch;
3e5a342f
NL
11use Wallabag\CoreBundle\Entity\Users;
12
13class EntryController extends Controller
14{
15 /**
38ba7ed9 16 * Fetches an entry for a given user
3e5a342f
NL
17 *
18 * @Get("/u/{user}/entry/{entry}")
19 * @ApiDoc(
20 * requirements={
38ba7ed9 21 * {"name"="user", "dataType"="string", "requirement"="\w+", "description"="The user ID"},
3e5a342f
NL
22 * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"}
23 * }
24 * )
25 * @return Entries
26 */
27 public function getAction(Users $user, Entries $entry)
28 {
29 return $entry;
30 }
38ba7ed9
NL
31
32 /**
33 * Deletes an entry for a given user
34 *
35 * @Delete("/u/{user}/entry/{entry}")
36 * @ApiDoc(
37 * requirements={
38 * {"name"="user", "dataType"="string", "requirement"="\w+", "description"="The user ID"},
39 * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"}
40 * }
41 * )
42 */
43 public function deleteAction(Users $user, Entries $entry)
44 {
45
46 }
47
48 /**
49 * Changes several properties of an entry. I.E tags, archived, starred and deleted status
50 *
51 * @Patch("/u/{user}/entry/{entry}")
52 * @ApiDoc(
53 * requirements={
54 * {"name"="user", "dataType"="string", "requirement"="\w+", "description"="The user ID"},
55 * {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"}
56 * }
57 * )
58 */
59 public function patchAction(Users $user, Entries $entry)
60 {
61
62 }
3e5a342f 63}