]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
improve API
authorNicolas Lœuillet <nicolas@loeuillet.org>
Thu, 29 Jan 2015 19:32:11 +0000 (20:32 +0100)
committerNicolas Lœuillet <nicolas@loeuillet.org>
Thu, 29 Jan 2015 19:32:11 +0000 (20:32 +0100)
app/config/config.yml
src/Wallabag/CoreBundle/Controller/WallabagRestController.php

index f2f5f9f33b82f72b97c28ed5492633aacdb4317a..e5c87860da3761ad5f799c70d8f2bfe121c2f48b 100644 (file)
@@ -101,6 +101,6 @@ fos_rest:
         failed_validation: HTTP_BAD_REQUEST
         default_engine: twig
     routing_loader:
-        default_format: json
+        include_format: false
 
 nelmio_api_doc: ~
\ No newline at end of file
index a2a9af3894cce4985bc4459919abdf74a18f0b55..eb41d0112ba4ffdfcdcf8cf4cd4dea6ada03ea47 100644 (file)
@@ -5,6 +5,7 @@ namespace Wallabag\CoreBundle\Controller;
 use Nelmio\ApiDocBundle\Annotation\ApiDoc;
 use FOS\RestBundle\Controller\Annotations\View;
 use Symfony\Bundle\FrameworkBundle\Controller\Controller;
+use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\Security\Core\Exception\AccessDeniedException;
 use Wallabag\CoreBundle\Entity\Entries;
 use Wallabag\CoreBundle\Entity\Tags;
@@ -20,9 +21,19 @@ class WallabagRestController
      * )
      * @return Entries
      */
-    public function getEntriesAction()
+    public function getEntriesAction(Request $request)
     {
-
+        $isArchive = $request->query->get('archive');
+        var_dump($isArchive);
+        $isStarred = $request->query->get('star');
+        $isDeleted = $request->query->get('delete');
+        $sort      = $request->query->get('sort');
+        $order     = $request->query->get('order');
+        $page      = $request->query->get('page');
+        $perPage   = $request->query->get('perPage');
+        $tags      = $request->query->get('tags', array());
+
+        return 'plop';
     }
 
     /**