mirror of
https://github.com/wallabag/wallabag.git
synced 2025-09-10 18:51:02 +00:00
routing for API, trying to respect #414
This commit is contained in:
parent
589dce52c6
commit
f8bf895254
17 changed files with 174 additions and 469 deletions
157
src/Wallabag/CoreBundle/Controller/WallabagRestController.php
Normal file
157
src/Wallabag/CoreBundle/Controller/WallabagRestController.php
Normal file
|
@ -0,0 +1,157 @@
|
|||
<?php
|
||||
|
||||
namespace Wallabag\CoreBundle\Controller;
|
||||
|
||||
use Nelmio\ApiDocBundle\Annotation\ApiDoc;
|
||||
use FOS\RestBundle\Controller\Annotations\View;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
|
||||
use Wallabag\CoreBundle\Entity\Entries;
|
||||
use Wallabag\CoreBundle\Entity\Tags;
|
||||
use Wallabag\CoreBundle\Entity\Users;
|
||||
|
||||
class WallabagRestController
|
||||
{
|
||||
|
||||
/**
|
||||
* Fetches all entries
|
||||
*
|
||||
* @ApiDoc(
|
||||
* )
|
||||
* @return Entries
|
||||
*/
|
||||
public function getEntriesAction()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches an entry
|
||||
*
|
||||
* @ApiDoc(
|
||||
* requirements={
|
||||
* {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"}
|
||||
* }
|
||||
* )
|
||||
* @return Entries
|
||||
*/
|
||||
public function getEntryAction(Entries $entry)
|
||||
{
|
||||
return $entry;
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes an entry
|
||||
*
|
||||
* @ApiDoc(
|
||||
* requirements={
|
||||
* {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"}
|
||||
* }
|
||||
* )
|
||||
*/
|
||||
public function deleteEntriesAction(Entries $entry)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes several properties of an entry. I.E tags, archived, starred and deleted status
|
||||
*
|
||||
* @ApiDoc(
|
||||
* requirements={
|
||||
* {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"}
|
||||
* }
|
||||
* )
|
||||
*/
|
||||
public function patchEntriesAction(Entries $entry)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves a new entry
|
||||
*
|
||||
* @ApiDoc(
|
||||
* )
|
||||
*/
|
||||
public function postEntriesAction()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets tags for an entry
|
||||
*
|
||||
* @ApiDoc(
|
||||
* requirements={
|
||||
* {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"}
|
||||
* }
|
||||
* )
|
||||
*/
|
||||
public function getEntriesTagsAction(Entries $entry) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves new tag for an entry
|
||||
*
|
||||
* @ApiDoc(
|
||||
* requirements={
|
||||
* {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"}
|
||||
* }
|
||||
* )
|
||||
*/
|
||||
public function postEntriesTagsAction(Entries $entry) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove tag for an entry
|
||||
*
|
||||
* @ApiDoc(
|
||||
* requirements={
|
||||
* {"name"="tag", "dataType"="string", "requirement"="\w+", "description"="The tag"},
|
||||
* {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"}
|
||||
* }
|
||||
* )
|
||||
*/
|
||||
public function deleteEntriesTagsAction(Entries $entry, Tags $tag)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets tags for a user
|
||||
*
|
||||
* @ApiDoc(
|
||||
* )
|
||||
*/
|
||||
public function getTagsAction() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets one tag
|
||||
*
|
||||
* @ApiDoc(
|
||||
* {"name"="tag", "dataType"="string", "requirement"="\w+", "description"="The tag"}
|
||||
* )
|
||||
*/
|
||||
public function getTagAction(Tags $tag) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete tag
|
||||
*
|
||||
* @ApiDoc(
|
||||
* requirements={
|
||||
* {"name"="tag", "dataType"="string", "requirement"="\w+", "description"="The tag"}
|
||||
* }
|
||||
* )
|
||||
*/
|
||||
public function deleteTagAction(Tags $tag)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue