mirror of
https://github.com/flextype/flextype.git
synced 2025-08-07 13:46:42 +02:00
feat(endpoints): add api v0 version
This commit is contained in:
@@ -16,7 +16,7 @@ use function app;
|
||||
/**
|
||||
* Fetch entry
|
||||
*
|
||||
* endpoint: GET /api/entries
|
||||
* endpoint: GET /api/v0/entries
|
||||
*
|
||||
* Query:
|
||||
* id - [REQUIRED] - Unique identifier of the entry.
|
||||
@@ -26,12 +26,12 @@ use function app;
|
||||
* Returns:
|
||||
* An array of entry objects.
|
||||
*/
|
||||
app()->get('/api/entries', [Entries::class, 'fetch']);
|
||||
app()->get('/api/v0/entries', [Entries::class, 'fetch']);
|
||||
|
||||
/**
|
||||
* Create entry
|
||||
*
|
||||
* endpoint: POST /api/entries
|
||||
* endpoint: POST /api/v0/entries
|
||||
*
|
||||
* Body:
|
||||
* id - [REQUIRED] - Unique identifier of the entry.
|
||||
@@ -42,12 +42,12 @@ app()->get('/api/entries', [Entries::class, 'fetch']);
|
||||
* Returns:
|
||||
* Returns the entry object for the entry that was just created.
|
||||
*/
|
||||
app()->post('/api/entries', [Entries::class, 'create']);
|
||||
app()->post('/api/v0/entries', [Entries::class, 'create']);
|
||||
|
||||
/**
|
||||
* Update entry
|
||||
*
|
||||
* endpoint: PATCH /api/entries
|
||||
* endpoint: PATCH /api/v0/entries
|
||||
*
|
||||
* Body:
|
||||
* id - [REQUIRED] - Unique identifier of the entry.
|
||||
@@ -58,12 +58,12 @@ app()->post('/api/entries', [Entries::class, 'create']);
|
||||
* Returns:
|
||||
* Returns the entry object for the entry that was just updated.
|
||||
*/
|
||||
app()->patch('/api/entries', [Entries::class, 'update']);
|
||||
app()->patch('/api/v0/entries', [Entries::class, 'update']);
|
||||
|
||||
/**
|
||||
* Move entry
|
||||
*
|
||||
* endpoint: PUT /api/entries
|
||||
* endpoint: PUT /api/v0/entries
|
||||
*
|
||||
* Body:
|
||||
* id - [REQUIRED] - Unique identifier of the entry.
|
||||
@@ -74,12 +74,12 @@ app()->patch('/api/entries', [Entries::class, 'update']);
|
||||
* Returns:
|
||||
* Returns the entry object for the entry that was just moved.
|
||||
*/
|
||||
app()->put('/api/entries', [Entries::class, 'move']);
|
||||
app()->put('/api/v0/entries', [Entries::class, 'move']);
|
||||
|
||||
/**
|
||||
* Copy entry
|
||||
*
|
||||
* endpoint: PUT /api/entries/copy
|
||||
* endpoint: PUT /api/v0/entries/copy
|
||||
*
|
||||
* Body:
|
||||
* id - [REQUIRED] - Unique identifier of the entry.
|
||||
@@ -90,12 +90,12 @@ app()->put('/api/entries', [Entries::class, 'move']);
|
||||
* Returns:
|
||||
* Returns the entry object for the entry that was just copied.
|
||||
*/
|
||||
app()->put('/api/entries/copy', [Entries::class, 'copy']);
|
||||
app()->put('/api/v0/entries/copy', [Entries::class, 'copy']);
|
||||
|
||||
/**
|
||||
* Delete entry
|
||||
*
|
||||
* endpoint: DELETE /api/entries
|
||||
* endpoint: DELETE /api/v0/entries
|
||||
*
|
||||
* Body:
|
||||
* id - [REQUIRED] - Unique identifier of the entry.
|
||||
@@ -105,4 +105,4 @@ app()->put('/api/entries/copy', [Entries::class, 'copy']);
|
||||
* Returns:
|
||||
* Returns an empty body with HTTP status 204
|
||||
*/
|
||||
app()->delete('/api/entries', [Entries::class, 'delete']);
|
||||
app()->delete('/api/v0/entries', [Entries::class, 'delete']);
|
||||
|
@@ -16,7 +16,7 @@ use function app;
|
||||
/**
|
||||
* Get registry item
|
||||
*
|
||||
* endpoint: GET /api/registry
|
||||
* endpoint: GET /api/v0/registry
|
||||
*
|
||||
* Query:
|
||||
* key - [REQUIRED] - Unique identifier of the registry item key.
|
||||
@@ -26,4 +26,4 @@ use function app;
|
||||
* Returns:
|
||||
* An array of registry objects.
|
||||
*/
|
||||
app()->get('/api/registry', [Registry::class, 'get']);
|
||||
app()->get('/api/v0/registry', [Registry::class, 'get']);
|
||||
|
@@ -16,7 +16,7 @@ use function app;
|
||||
/**
|
||||
* Clear cache
|
||||
*
|
||||
* endpoint: POST /api/utils/cache/clear
|
||||
* endpoint: POST /api/v0/utils/cache/clear
|
||||
*
|
||||
* Body:
|
||||
* token - [REQUIRED] - Valid public token.
|
||||
@@ -25,4 +25,4 @@ use function app;
|
||||
* Returns:
|
||||
* Returns an empty body with HTTP status 204
|
||||
*/
|
||||
app()->post('/api/utils/cache/clear', [Utils::class, 'clearCache']);
|
||||
app()->post('/api/v0/utils/cache/clear', [Utils::class, 'clearCache']);
|
||||
|
Reference in New Issue
Block a user