]> git.immae.eu Git - github/wallabag/wallabag.git/blob - src/Wallabag/ApiBundle/Controller/EntryController.php
bundle for API
[github/wallabag/wallabag.git] / src / Wallabag / ApiBundle / Controller / EntryController.php
1 <?php
2
3 namespace Wallabag\ApiBundle\Controller;
4
5 use Nelmio\ApiDocBundle\Annotation\ApiDoc;
6 use Symfony\Bundle\FrameworkBundle\Controller\Controller;
7 use Wallabag\CoreBundle\Entity\Entries;
8 use FOS\RestBundle\Controller\Annotations\Get;
9 use Wallabag\CoreBundle\Entity\Users;
10
11 class 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 }