2016-07-19 18:07:59 +03:00
|
|
|
<?php
|
|
|
|
use Shlinkio\Shlink\Rest\Action;
|
|
|
|
|
|
|
|
return [
|
|
|
|
|
|
|
|
'routes' => [
|
|
|
|
[
|
|
|
|
'name' => 'rest-authenticate',
|
2016-10-22 19:46:53 +03:00
|
|
|
'path' => '/rest/v{version:1}/authenticate',
|
2016-07-27 21:22:50 +03:00
|
|
|
'middleware' => Action\AuthenticateAction::class,
|
2016-07-19 18:07:59 +03:00
|
|
|
'allowed_methods' => ['POST', 'OPTIONS'],
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'name' => 'rest-create-shortcode',
|
2016-10-22 19:46:53 +03:00
|
|
|
'path' => '/rest/v{version:1}/short-codes',
|
2016-07-27 21:22:50 +03:00
|
|
|
'middleware' => Action\CreateShortcodeAction::class,
|
2016-07-19 18:07:59 +03:00
|
|
|
'allowed_methods' => ['POST', 'OPTIONS'],
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'name' => 'rest-resolve-url',
|
2016-10-22 19:46:53 +03:00
|
|
|
'path' => '/rest/v{version:1}/short-codes/{shortCode}',
|
2016-07-27 21:22:50 +03:00
|
|
|
'middleware' => Action\ResolveUrlAction::class,
|
2016-07-19 18:07:59 +03:00
|
|
|
'allowed_methods' => ['GET', 'OPTIONS'],
|
|
|
|
],
|
|
|
|
[
|
2016-07-26 20:09:54 +03:00
|
|
|
'name' => 'rest-list-shortened-url',
|
2016-10-22 19:46:53 +03:00
|
|
|
'path' => '/rest/v{version:1}/short-codes',
|
2016-07-27 21:22:50 +03:00
|
|
|
'middleware' => Action\ListShortcodesAction::class,
|
2016-07-19 18:07:59 +03:00
|
|
|
'allowed_methods' => ['GET'],
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'name' => 'rest-get-visits',
|
2016-10-22 19:46:53 +03:00
|
|
|
'path' => '/rest/v{version:1}/short-codes/{shortCode}/visits',
|
2016-07-27 21:22:50 +03:00
|
|
|
'middleware' => Action\GetVisitsAction::class,
|
2016-07-19 18:07:59 +03:00
|
|
|
'allowed_methods' => ['GET', 'OPTIONS'],
|
|
|
|
],
|
2016-08-21 17:52:26 +03:00
|
|
|
[
|
|
|
|
'name' => 'rest-edit-tags',
|
2016-10-22 19:46:53 +03:00
|
|
|
'path' => '/rest/v{version:1}/short-codes/{shortCode}/tags',
|
2016-08-21 17:52:26 +03:00
|
|
|
'middleware' => Action\EditTagsAction::class,
|
|
|
|
'allowed_methods' => ['PUT', 'OPTIONS'],
|
|
|
|
],
|
2016-07-19 18:07:59 +03:00
|
|
|
],
|
|
|
|
|
|
|
|
];
|