mirror of
https://github.com/wallabag/wallabag.git
synced 2025-07-17 17:08:37 +00:00
1st implementation of wallabag api, yeah
This commit is contained in:
parent
569f8d6851
commit
e4788de51e
11 changed files with 1040 additions and 17 deletions
7
src/.htaccess
Normal file
7
src/.htaccess
Normal file
|
@ -0,0 +1,7 @@
|
|||
<IfModule mod_authz_core.c>
|
||||
Require all denied
|
||||
</IfModule>
|
||||
<IfModule !mod_authz_core.c>
|
||||
Order deny,allow
|
||||
Deny from all
|
||||
</IfModule>
|
21
src/Wallabag/CoreBundle/Controller/ApiController.php
Normal file
21
src/Wallabag/CoreBundle/Controller/ApiController.php
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace Wallabag\CoreBundle\Controller;
|
||||
|
||||
use Nelmio\ApiDocBundle\Annotation\ApiDoc;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Wallabag\CoreBundle\Entity\Entries;
|
||||
|
||||
class ApiController extends Controller
|
||||
{
|
||||
/**
|
||||
* @ApiDoc(
|
||||
* resource=true,
|
||||
* description="This is a demo method. Just remove it",
|
||||
* )
|
||||
*/
|
||||
public function getEntryAction()
|
||||
{
|
||||
return new Entries('Blobby');
|
||||
}
|
||||
}
|
|
@ -17,4 +17,12 @@ class StaticController extends Controller
|
|||
array()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/", name="homepage")
|
||||
*/
|
||||
public function apiAction()
|
||||
{
|
||||
return $this->redirect($this->generateUrl('nelmio_api_doc_index'));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue