mirror of
https://github.com/wallabag/wallabag.git
synced 2025-01-09 16:35:27 +00:00
improve API
This commit is contained in:
parent
f8bf895254
commit
27f15aa4ca
2 changed files with 13 additions and 2 deletions
|
@ -101,6 +101,6 @@ fos_rest:
|
||||||
failed_validation: HTTP_BAD_REQUEST
|
failed_validation: HTTP_BAD_REQUEST
|
||||||
default_engine: twig
|
default_engine: twig
|
||||||
routing_loader:
|
routing_loader:
|
||||||
default_format: json
|
include_format: false
|
||||||
|
|
||||||
nelmio_api_doc: ~
|
nelmio_api_doc: ~
|
|
@ -5,6 +5,7 @@ namespace Wallabag\CoreBundle\Controller;
|
||||||
use Nelmio\ApiDocBundle\Annotation\ApiDoc;
|
use Nelmio\ApiDocBundle\Annotation\ApiDoc;
|
||||||
use FOS\RestBundle\Controller\Annotations\View;
|
use FOS\RestBundle\Controller\Annotations\View;
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||||
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
|
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
|
||||||
use Wallabag\CoreBundle\Entity\Entries;
|
use Wallabag\CoreBundle\Entity\Entries;
|
||||||
use Wallabag\CoreBundle\Entity\Tags;
|
use Wallabag\CoreBundle\Entity\Tags;
|
||||||
|
@ -20,9 +21,19 @@ class WallabagRestController
|
||||||
* )
|
* )
|
||||||
* @return Entries
|
* @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';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue