aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2018-05-19 15:04:04 +0200
committerArthurHoaro <arthur@hoa.ro>2018-06-04 18:51:22 +0200
commitd3f42ca487287447efb81061609644108044a038 (patch)
tree6e9d5a33290f857c8f7a04dbdf8cf0ca749db149 /index.php
parent17e45b2e9c33c736751e059276fadb480f98e621 (diff)
downloadShaarli-d3f42ca487287447efb81061609644108044a038.tar.gz
Shaarli-d3f42ca487287447efb81061609644108044a038.tar.zst
Shaarli-d3f42ca487287447efb81061609644108044a038.zip
Implements Tags endpoints for Shaarli's REST API
Endpoints: * List All Tags [GET] * Get a tag [GET] * Update a tag [PUT] * Delete a tag [DELETE] Fixes #904 References shaarli/api-documentation#34
Diffstat (limited to 'index.php')
-rw-r--r--index.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/index.php b/index.php
index c34434dd..6dcec9b2 100644
--- a/index.php
+++ b/index.php
@@ -2175,6 +2175,12 @@ $app->group('/api/v1', function() {
2175 $this->post('/links', '\Shaarli\Api\Controllers\Links:postLink')->setName('postLink'); 2175 $this->post('/links', '\Shaarli\Api\Controllers\Links:postLink')->setName('postLink');
2176 $this->put('/links/{id:[\d]+}', '\Shaarli\Api\Controllers\Links:putLink')->setName('putLink'); 2176 $this->put('/links/{id:[\d]+}', '\Shaarli\Api\Controllers\Links:putLink')->setName('putLink');
2177 $this->delete('/links/{id:[\d]+}', '\Shaarli\Api\Controllers\Links:deleteLink')->setName('deleteLink'); 2177 $this->delete('/links/{id:[\d]+}', '\Shaarli\Api\Controllers\Links:deleteLink')->setName('deleteLink');
2178
2179 $this->get('/tags', '\Shaarli\Api\Controllers\Tags:getTags')->setName('getTags');
2180 $this->get('/tags/{tagName:[\w]+}', '\Shaarli\Api\Controllers\Tags:getTag')->setName('getTag');
2181 $this->put('/tags/{tagName:[\w]+}', '\Shaarli\Api\Controllers\Tags:putTag')->setName('putTag');
2182 $this->delete('/tags/{tagName:[\w]+}', '\Shaarli\Api\Controllers\Tags:deleteTag')->setName('deleteTag');
2183
2178 $this->get('/history', '\Shaarli\Api\Controllers\History:getHistory')->setName('getHistory'); 2184 $this->get('/history', '\Shaarli\Api\Controllers\History:getHistory')->setName('getHistory');
2179})->add('\Shaarli\Api\ApiMiddleware'); 2185})->add('\Shaarli\Api\ApiMiddleware');
2180 2186