feat: add documentation for restore endpoints (#52)

* feat: add documentation for restore endpoints

* fix: missing prefix on playlist restore route
This commit is contained in:
paranarimasu
2022-11-01 23:01:25 -05:00
committed by Maniload
parent 63e16135a9
commit fa3c714de4
43 changed files with 1077 additions and 26 deletions
+20
View File
@@ -110,6 +110,7 @@ export default {
{ text: 'Destroy', link: '/admin/announcement/destroy/' },
{ text: 'Force Delete', link: '/admin/announcement/forceDelete/' },
{ text: 'Index', link: '/admin/announcement/index/' },
{ text: 'Restore', link: '/admin/announcement/restore/' },
{ text: 'Show', link: '/admin/announcement/show/' },
{ text: 'Store', link: '/admin/announcement/store/' },
{ text: 'Update', link: '/admin/announcement/update/' }
@@ -123,6 +124,7 @@ export default {
{ text: 'Destroy', link: '/admin/dump/destroy/' },
{ text: 'Force Delete', link: '/admin/dump/forceDelete/' },
{ text: 'Index', link: '/admin/dump/index/' },
{ text: 'Restore', link: '/admin/dump/restore/' },
{ text: 'Show', link: '/admin/dump/show/' },
{ text: 'Store', link: '/admin/dump/store/' },
{ text: 'Update', link: '/admin/dump/update/' }
@@ -138,6 +140,7 @@ export default {
{ text: 'Destroy', link: '/billing/balance/destroy/' },
{ text: 'Force Delete', link: '/billing/balance/forceDelete/' },
{ text: 'Index', link: '/billing/balance/index/' },
{ text: 'Restore', link: '/billing/balance/restore/' },
{ text: 'Show', link: '/billing/balance/show/' },
{ text: 'Store', link: '/billing/balance/store/' },
{ text: 'Update', link: '/billing/balance/update/' }
@@ -151,6 +154,7 @@ export default {
{ text: 'Destroy', link: '/billing/transaction/destroy/' },
{ text: 'Force Delete', link: '/billing/transaction/forceDelete/' },
{ text: 'Index', link: '/billing/transaction/index/' },
{ text: 'Restore', link: '/billing/transaction/restore/' },
{ text: 'Show', link: '/billing/transaction/show/' },
{ text: 'Store', link: '/billing/transaction/store/' },
{ text: 'Update', link: '/billing/transaction/update/' }
@@ -184,6 +188,7 @@ export default {
{ text: 'Destroy', link: '/document/page/destroy/' },
{ text: 'Force Delete', link: '/document/page/forceDelete/' },
{ text: 'Index', link: '/document/page/index/' },
{ text: 'Restore', link: '/document/page/restore/' },
{ text: 'Show', link: '/document/page/show/' },
{ text: 'Store', link: '/document/page/store/' },
{ text: 'Update', link: '/document/page/update/' }
@@ -211,6 +216,7 @@ export default {
{ text: 'Destroy', link: '/list/playlist/destroy/' },
{ text: 'Force Delete', link: '/list/playlist/forceDelete/' },
{ text: 'Index', link: '/list/playlist/index/' },
{ text: 'Restore', link: '/list/playlist/restore/' },
{ text: 'Show', link: '/list/playlist/show/' },
{ text: 'Store', link: '/list/playlist/store/' },
{ text: 'Update', link: '/list/playlist/update/' }
@@ -224,6 +230,7 @@ export default {
{ text: 'Destroy', link: '/list/playlisttrack/destroy/' },
{ text: 'Force Delete', link: '/list/playlisttrack/forceDelete/' },
{ text: 'Index', link: '/list/playlisttrack/index/' },
{ text: 'Restore', link: '/list/playlisttrack/restore/' },
{ text: 'Show', link: '/list/playlisttrack/show/' },
{ text: 'Store', link: '/list/playlisttrack/store/' },
{ text: 'Update', link: '/list/playlisttrack/update/' }
@@ -239,6 +246,7 @@ export default {
{ text: 'Destroy', link: '/wiki/anime/destroy/' },
{ text: 'Force Delete', link: '/wiki/anime/forceDelete/' },
{ text: 'Index', link: '/wiki/anime/index/' },
{ text: 'Restore', link: '/wiki/anime/restore/' },
{ text: 'Show', link: '/wiki/anime/show/' },
{ text: 'Store', link: '/wiki/anime/store/' },
{ text: 'Update', link: '/wiki/anime/update/' },
@@ -265,6 +273,7 @@ export default {
{ text: 'Destroy', link: '/wiki/animesynonym/destroy/' },
{ text: 'Force Delete', link: '/wiki/animesynonym/forceDelete/' },
{ text: 'Index', link: '/wiki/animesynonym/index/' },
{ text: 'Restore', link: '/wiki/animesynonym/restore/' },
{ text: 'Show', link: '/wiki/animesynonym/show/' },
{ text: 'Store', link: '/wiki/animesynonym/store/' },
{ text: 'Update', link: '/wiki/animesynonym/update/' }
@@ -278,6 +287,7 @@ export default {
{ text: 'Destroy', link: '/wiki/animetheme/destroy/' },
{ text: 'Force Delete', link: '/wiki/animetheme/forceDelete/' },
{ text: 'Index', link: '/wiki/animetheme/index/' },
{ text: 'Restore', link: '/wiki/animetheme/restore/' },
{ text: 'Show', link: '/wiki/animetheme/show/' },
{ text: 'Store', link: '/wiki/animetheme/store/' },
{ text: 'Update', link: '/wiki/animetheme/update/' }
@@ -291,6 +301,7 @@ export default {
{ text: 'Destroy', link: '/wiki/animethemeentry/destroy/' },
{ text: 'Force Delete', link: '/wiki/animethemeentry/forceDelete/' },
{ text: 'Index', link: '/wiki/animethemeentry/index/' },
{ text: 'Restore', link: '/wiki/animethemeentry/restore/' },
{ text: 'Show', link: '/wiki/animethemeentry/show/' },
{ text: 'Store', link: '/wiki/animethemeentry/store/' },
{ text: 'Update', link: '/wiki/animethemeentry/update/' }
@@ -304,6 +315,7 @@ export default {
{ text: 'Destroy', link: '/wiki/artist/destroy/' },
{ text: 'Force Delete', link: '/wiki/artist/forceDelete/' },
{ text: 'Index', link: '/wiki/artist/index/' },
{ text: 'Restore', link: '/wiki/artist/restore/' },
{ text: 'Show', link: '/wiki/artist/show/' },
{ text: 'Store', link: '/wiki/artist/store/' },
{ text: 'Update', link: '/wiki/artist/update/' }
@@ -317,6 +329,7 @@ export default {
{ text: 'Destroy', link: '/wiki/audio/destroy/' },
{ text: 'Force Delete', link: '/wiki/audio/forceDelete/' },
{ text: 'Index', link: '/wiki/audio/index/' },
{ text: 'Restore', link: '/wiki/audio/restore/' },
{ text: 'Show', link: '/wiki/audio/show/' },
{ text: 'Store', link: '/wiki/audio/store/' },
{ text: 'Update', link: '/wiki/audio/update/' }
@@ -337,6 +350,7 @@ export default {
{ text: 'Destroy', link: '/wiki/image/destroy/' },
{ text: 'Force Delete', link: '/wiki/image/forceDelete/' },
{ text: 'Index', link: '/wiki/image/index/' },
{ text: 'Restore', link: '/wiki/image/restore/' },
{ text: 'Show', link: '/wiki/image/show/' },
{ text: 'Store', link: '/wiki/image/store/' },
{ text: 'Update', link: '/wiki/image/update/' }
@@ -350,6 +364,7 @@ export default {
{ text: 'Destroy', link: '/wiki/resource/destroy/' },
{ text: 'Force Delete', link: '/wiki/resource/forceDelete/' },
{ text: 'Index', link: '/wiki/resource/index/' },
{ text: 'Restore', link: '/wiki/resource/restore/' },
{ text: 'Show', link: '/wiki/resource/show/' },
{ text: 'Store', link: '/wiki/resource/store/' },
{ text: 'Update', link: '/wiki/resource/update/' }
@@ -363,6 +378,7 @@ export default {
{ text: 'Destroy', link: '/wiki/series/destroy/' },
{ text: 'Force Delete', link: '/wiki/series/forceDelete/' },
{ text: 'Index', link: '/wiki/series/index/' },
{ text: 'Restore', link: '/wiki/series/restore/' },
{ text: 'Show', link: '/wiki/series/show/' },
{ text: 'Store', link: '/wiki/series/store/' },
{ text: 'Update', link: '/wiki/series/update/' }
@@ -376,6 +392,7 @@ export default {
{ text: 'Destroy', link: '/wiki/song/destroy/' },
{ text: 'Force Delete', link: '/wiki/song/forceDelete/' },
{ text: 'Index', link: '/wiki/song/index/' },
{ text: 'Restore', link: '/wiki/song/restore/' },
{ text: 'Show', link: '/wiki/song/show/' },
{ text: 'Store', link: '/wiki/song/store/' },
{ text: 'Update', link: '/wiki/song/update/' }
@@ -389,6 +406,7 @@ export default {
{ text: 'Destroy', link: '/wiki/studio/destroy/' },
{ text: 'Force Delete', link: '/wiki/studio/forceDelete/' },
{ text: 'Index', link: '/wiki/studio/index/' },
{ text: 'Restore', link: '/wiki/studio/restore/' },
{ text: 'Show', link: '/wiki/studio/show/' },
{ text: 'Store', link: '/wiki/studio/store/' },
{ text: 'Update', link: '/wiki/studio/update/' }
@@ -402,6 +420,7 @@ export default {
{ text: 'Destroy', link: '/wiki/video/destroy/' },
{ text: 'Force Delete', link: '/wiki/video/forceDelete/' },
{ text: 'Index', link: '/wiki/video/index/' },
{ text: 'Restore', link: '/wiki/video/restore/' },
{ text: 'Show', link: '/wiki/video/show/' },
{ text: 'Store', link: '/wiki/video/store/' },
{ text: 'Update', link: '/wiki/video/update/' }
@@ -415,6 +434,7 @@ export default {
{ text: 'Destroy', link: '/wiki/videoscript/destroy/' },
{ text: 'Force Delete', link: '/wiki/videoscript/forceDelete/' },
{ text: 'Index', link: '/wiki/videoscript/index/' },
{ text: 'Restore', link: '/wiki/videoscript/restore/' },
{ text: 'Show', link: '/wiki/videoscript/show/' },
{ text: 'Store', link: '/wiki/videoscript/store/' },
{ text: 'Update', link: '/wiki/videoscript/update/' }
+4
View File
@@ -38,6 +38,10 @@ The announcement force delete endpoint hard deletes an announcement and returns
The announcement index endpoint displays a listing of announcement resources.
**[Announcement Restore](/admin/announcement/restore/)**
The announcement restore endpoint restores a soft deleted announcement and returns the restored announcement resource.
**[Announcement Show](/admin/announcement/show/)**
The announcement show endpoint returns an announcement resource.
+45
View File
@@ -0,0 +1,45 @@
---
title: Announcement Restore
---
# Announcement Restore Endpoint
The announcement restore endpoint restores a soft deleted announcement and returns the restored announcement resource.
For example, the `/restore/announcement/1` endpoint will restore the soft deleted announcement of id '1' and return the restored announcement resource.
## URL
```sh
PATCH /restore/announcement/{id}
```
## Authentication
**Required Permission**: restore announcement
**Roles with Permission**: Admin
## Parameters
None
## Response
```json
{
announcement: {
id: id,
content: "content",
created_at: "created_at",
updated_at: "updated_at",
deleted_at: "deleted_at"
}
}
```
## Example
```bash
curl -X PATCH -H "Authorization: Bearer {token}" https://api.animethemes.moe/restore/announcement/1
```
+4
View File
@@ -39,6 +39,10 @@ The dump force delete endpoint hard deletes a dump and returns a confirmation me
The dump index endpoint displays a listing of dump resources.
**[Dump Restore](/admin/dump/restore/)**
The dump restore endpoint restores a soft deleted dump and returns the restored dump resource.
**[Dump Show](/admin/dump/show/)**
The dump show endpoint returns a dump resource.
+46
View File
@@ -0,0 +1,46 @@
---
title: Dump Restore
---
# Dump Restore Endpoint
The dump restore endpoint restores a soft deleted dump and returns the restored dump resource.
For example, the `/restore/dump/1` endpoint will restore the soft deleted dump of id '1' and return the restored dump resource.
## URL
```sh
PATCH /restore/dump/{id}
```
## Authentication
**Required Permission**: restore dump
**Roles with Permission**: Admin
## Parameters
None
## Response
```json
{
dump: {
id: id,
path: "path",
created_at: "created_at",
updated_at: "updated_at",
deleted_at: "deleted_at",
link: "link
}
}
```
## Example
```bash
curl -X PATCH -H "Authorization: Bearer {token}" https://api.animethemes.moe/restore/dump/1
```
+4
View File
@@ -40,6 +40,10 @@ The balance force delete endpoint hard deletes a balance and returns a confirmat
The balance index endpoint displays a listing of balance resources.
**[Balance Restore](/billing/balance/restore/)**
The balance restore endpoint restores a soft deleted balance and returns the restored balance resource.
**[Balance Show](/billing/balance/show/)**
The balance show endpoint returns a balance resource.
+49
View File
@@ -0,0 +1,49 @@
---
title: Balance Restore
---
# Balance Restore Endpoint
The balance restore endpoint restores a soft deleted balance and returns the restored balance resource.
For example, the `/restore/balance/1` endpoint will restore the soft deleted balance of id '1' and return the restored balance resource.
## URL
```sh
PATCH /restore/balance/{id}
```
## Authentication
**Required Permission**: restore balance
**Roles with Permission**: Admin
## Parameters
None
## Response
```json
{
balance: {
id: id,
date: "date",
service: "service",
frequency: "frequency",
usage: usage,
month_to_date_balance: month_to_date_balance,
created_at: "created_at",
updated_at: "updated_at",
deleted_at: "deleted_at"
}
}
```
## Example
```bash
curl -X PATCH -H "Authorization: Bearer {token}" https://api.animethemes.moe/restore/balance/1
```
+4
View File
@@ -40,6 +40,10 @@ The transaction force delete endpoint hard deletes a transaction and returns a c
The transaction index endpoint displays a listing of transaction resources.
**[Transaction Restore](/billing/transaction/restore/)**
The transaction restore endpoint restores a soft deleted transaction and returns the restored transaction resource.
**[Transaction Show](/billing/transaction/show/)**
The transaction show endpoint returns a transaction resource.
+49
View File
@@ -0,0 +1,49 @@
---
title: Transaction Restore
---
# Transaction Restore Endpoint
The transaction restore endpoint restores a soft deleted transaction and returns the restored transaction resource.
For example, the `/restore/transaction/1` endpoint will restore the soft deleted transaction of id '1' and return the restored transaction resource.
## URL
```sh
PATCH /restore/transaction/{id}
```
## Authentication
**Required Permission**: restore transaction
**Roles with Permission**: Admin
## Parameters
None
## Response
```json
{
transaction: {
id: id,
date: "date",
service: "service",
description: "description",
amount: amount,
external_id: external_id,
created_at: "created_at",
updated_at: "updated_at",
deleted_at: "deleted_at"
}
}
```
## Example
```bash
curl -X PATCH -H "Authorization: Bearer {token}" https://api.animethemes.moe/restore/transaction/1
```
+4
View File
@@ -40,6 +40,10 @@ The page force delete endpoint hard deletes a page and returns a confirmation me
The page index endpoint displays a listing of page resources.
**[Page Restore](/document/page/restore/)**
The page restore endpoint restores a soft deleted page and returns the restored page resource.
**[Page Show](/document/page/show/)**
The page show endpoint returns a page resource.
+47
View File
@@ -0,0 +1,47 @@
---
title: Page Restore
---
# Page Restore Endpoint
The page restore endpoint restores a soft deleted page and returns the restored page resource.
For example, the `/restore/page/encoding` endpoint will restore the soft deleted Encoding page and return the restored Encoding resource.
## URL
```sh
PATCH /restore/page/{slug}
```
## Authentication
**Required Permission**: restore page
**Roles with Permission**: Wiki Editor, Admin
## Parameters
None
## Response
```json
{
page: {
id: id,
name: "name",
slug: "slug",
body: "body",
created_at: "created_at",
updated_at: "updated_at",
deleted_at: "deleted_at"
}
}
```
## Example
```bash
curl -X PATCH -H "Authorization: Bearer {token}" https://api.animethemes.moe/restore/page/encoding
```
+4
View File
@@ -43,6 +43,10 @@ The playlist force delete endpoint hard deletes a playlist and returns a confirm
The playlist index endpoint displays a listing of playlist resources.
**[Playlist Restore](/list/playlist/restore/)**
The playlist restore endpoint restores a soft deleted playlist and returns the restored playlist resource.
**[Playlist Show](/list/playlist/show/)**
The playlist show endpoint returns a playlist resource.
+46
View File
@@ -0,0 +1,46 @@
---
title: Playlist Restore
---
# Playlist Restore Endpoint
The playlist restore endpoint restores a soft deleted playlist and returns the restored playlist resource.
For example, the `/restore/playlist/1` endpoint will restore the soft deleted playlist of id `1` and return the restored playlist resource.
## URL
```sh
PATCH /restore/playlist/{id}
```
## Authentication
**Required Permission**: restore playlist
**Other Requirements**: User must own playlist
## Parameters
None
## Response
```json
{
playlist: {
id: id,
name: "name",
visibility: "visibility",
created_at: "created_at",
updated_at: "updated_at",
deleted_at: "deleted_at"
}
}
```
## Example
```bash
curl -X PATCH -H "Authorization: Bearer {token}" https://api.animethemes.moe/restore/playlist/1
```
+4
View File
@@ -40,6 +40,10 @@ The playlist track force delete endpoint hard deletes a playlist track and retur
The playlist track index endpoint displays a listing of playlist track resources.
**[Playlist Track Restore](/list/playlisttrack/restore/)**
The playlist track restore endpoint restores a soft deleted playlist track and returns the restored playlist track resource.
**[Playlist Track Show](/list/playlisttrack/show/)**
The playlist track show endpoint returns a playlist track resource.
+44
View File
@@ -0,0 +1,44 @@
---
title: Playlist Track Restore
---
# Playlist Track Restore Endpoint
The playlist track restore endpoint restores a soft deleted playlist track and returns the restored playlist track resource.
For example, the `/restore/playlist/1/playlisttrack/1` endpoint will restore the soft deleted playlist track of id `1` and return the restored playlist track resource.
## URL
```sh
PATCH /restore/playlist/{id}/playlisttrack/{id}
```
## Authentication
**Required Permission**: restore playlist track
**Other Requirements**: User must own playlist
## Parameters
None
## Response
```json
{
playlisttrack: {
id: id,
created_at: "created_at",
updated_at: "updated_at",
deleted_at: "deleted_at"
}
}
```
## Example
```bash
curl -X PATCH -H "Authorization: Bearer {token}" https://api.animethemes.moe/restore/playlist/1/playlisttrack/1
```
+4
View File
@@ -53,6 +53,10 @@ The anime force delete endpoint hard deletes an anime and returns a confirmation
The anime index endpoint displays a listing of anime resources.
**[Anime Restore](/wiki/anime/restore/)**
The anime restore endpoint restores a soft deleted anime and returns the restored anime resource.
**[Anime Show](/wiki/anime/show/)**
The anime show endpoint returns an anime resource.
+49
View File
@@ -0,0 +1,49 @@
---
title: Anime Restore
---
# Anime Restore Endpoint
The anime restore endpoint restores a soft deleted anime and returns the restored anime resource.
For example, the `/restore/anime/bakemonogatari` endpoint will restore the soft deleted Bakemonogatari anime and return the restored Bakemonogatari resource.
## URL
```sh
PATCH /restore/anime/{slug}
```
## Authentication
**Required Permission**: restore anime
**Roles with Permission**: Wiki Editor, Admin
## Parameters
None
## Response
```json
{
anime: {
id: id,
name: "name",
slug: "slug",
year: year,
season: "season",
synopsis: "synopsis",
created_at: "created_at",
updated_at: "updated_at",
deleted_at: "deleted_at"
}
}
```
## Example
```bash
curl -X PATCH -H "Authorization: Bearer {token}" https://api.animethemes.moe/restore/anime/bakemonogatari
```
+4
View File
@@ -38,6 +38,10 @@ The anime synonym force delete endpoint hard deletes an anime synonym and return
The anime synonym index endpoint displays a listing of anime synonym resources.
**[Anime Synonym Restore](/wiki/animesynonym/restore/)**
The anime synonym restore endpoint restores a soft deleted anime synonym and returns the restored anime synonym resource.
**[Anime Synonym Show](/wiki/animesynonym/show/)**
The anime synonym show endpoint returns an anime synonym resource.
+45
View File
@@ -0,0 +1,45 @@
---
title: Anime Synonym Restore
---
# Anime Synonym Restore Endpoint
The anime synonym restore endpoint restores a soft deleted anime synonym and returns the restored anime synonym resource.
For example, the `/restore/animesynonym/1523` endpoint will restore the soft deleted Monstory synonym for the Bakemonogatari anime and return the restored anime synonym resource.
## URL
```sh
PATCH /restore/animesynonym/{id}
```
## Authentication
**Required Permission**: restore anime synonym
**Roles with Permission**: Wiki Editor, Admin
## Parameters
None
## Response
```json
{
animesynonym: {
id: id,
text: "text",
created_at: "created_at",
updated_at: "updated_at",
deleted_at: "deleted_at"
}
}
```
## Example
```bash
curl -X PATCH -H "Authorization: Bearer {token}" https://api.animethemes.moe/restore/animesynonym/1523
```
+4
View File
@@ -46,6 +46,10 @@ The anime theme force delete endpoint hard deletes an anime theme and returns a
The anime theme index endpoint displays a listing of anime theme resources.
**[Anime Theme Restore](/wiki/animetheme/restore/)**
The anime theme restore endpoint restores a soft deleted anime theme and returns the restored anime theme resource.
**[Anime Theme Show](/wiki/animetheme/show/)**
The anime theme show endpoint returns an anime theme resource.
+48
View File
@@ -0,0 +1,48 @@
---
title: Anime Theme Restore
---
# Anime Theme Restore Endpoint
The anime theme restore endpoint restores a soft deleted anime theme and returns the restored anime theme resource.
For example, the `/restore/animetheme/3373` endpoint will restore the soft deleted OP1 theme for the Bakemonogatari anime and return the restored anime theme resource.
## URL
```sh
PATCH /restore/animetheme/{id}
```
## Authentication
**Required Permission**: restore anime theme
**Roles with Permission**: Wiki Editor, Admin
## Parameters
None
## Response
```json
{
animetheme: {
id: id,
type: "type",
sequence: sequence,
group: "group",
slug: "slug",
created_at: "created_at",
updated_at: "updated_at",
deleted_at: "deleted_at"
}
}
```
## Example
```bash
curl -X PATCH -H "Authorization: Bearer {token}" https://api.animethemes.moe/restore/animetheme/3373
```
+4
View File
@@ -44,6 +44,10 @@ The anime theme entry force delete endpoint hard deletes an anime theme entry an
The anime theme entry index endpoint displays a listing of anime theme entry resources.
**[Anime Theme Entry Restore](/wiki/animethemeentry/restore/)**
The anime theme entry restore endpoint restores a soft deleted anime theme entry and returns the restored anime theme entry resource.
**[Anime Theme Entry Show](/wiki/animethemeentry/show/)**
The anime theme entry show endpoint returns an anime theme entry resource.
@@ -0,0 +1,49 @@
---
title: Anime Theme Entry Restore
---
# Anime Theme Entry Restore Endpoint
The anime theme entry restore endpoint restores a soft deleted anime theme entry and returns the restored anime theme entry resource.
For example, the `/restore/animethemeentry/3822` endpoint will restore the soft deleted V2 entry for the ED1 theme of the Bakemonogatari anime and return the restored anime theme entry resource.
## URL
```sh
PATCH /restore/animethemeentry/{id}
```
## Authentication
**Required Permission**: restore anime theme entry
**Roles with Permission**: Wiki Editor, Admin
## Parameters
None
## Response
```json
{
animethemeentry: {
id: id,
version: version,
episodes: "episodes",
nsfw: nsfw,
spoiler: spoiler,
notes: "notes",
created_at: "created_at",
updated_at: "updated_at",
deleted_at: "deleted_at"
}
}
```
## Example
```bash
curl -X PATCH -H "Authorization: Bearer {token}" https://api.animethemes.moe/restore/animethemeentry/3822
```
+4
View File
@@ -46,6 +46,10 @@ The artist force delete endpoint hard deletes an artist and returns a confirmati
The artist index endpoint displays a listing of artist resources.
**[Artist Restore](/wiki/artist/restore/)**
The artist restore endpoint restores a soft deletesd artist and returns the restored artist resource.
**[Artist Show](/wiki/artist/show/)**
The artist show endpoint returns an artist resource.
+46
View File
@@ -0,0 +1,46 @@
---
title: Artist Restore
---
# Artist Restore Endpoint
The artist restore endpoint restores a soft deleted artist and returns the restored artist resource.
For example, the `/restore/artist/chiwa_saito` endpoint will restore the soft deleted Chiwa Saito artist and return the restored Chiwa Saito resource.
## URL
```sh
PATCH /restore/artist/{slug}
```
## Authentication
**Required Permission**: restore artist
**Roles with Permission**: Wiki Editor, Admin
## Parameters
None
## Response
```json
{
artist: {
id: id,
name: "name",
slug: "slug",
created_at: "created_at",
updated_at: "updated_at",
deleted_at: "deleted_at"
}
}
```
## Example
```bash
curl -X PATCH -H "Authorization: Bearer {token}" https://api.animethemes.moe/restore/artist/chiwa_saito
```
+4
View File
@@ -43,6 +43,10 @@ The audio force delete endpoint hard deletes an audio and returns a confirmation
The audio index endpoint displays a listing of audio resources.
**[Audio Restore](/wiki/audio/restore/)**
The audio restore endpoint restores a soft deleted audio and returns the restored audio resource.
**[Audio Show](/wiki/audio/show/)**
The audio show endpoint returns an audio resource.
+50
View File
@@ -0,0 +1,50 @@
---
title: Audio Restore
---
# Audio Restore Endpoint
The audio restore endpoint restores a soft deleted audio and returns the restored audio resource.
For example, the `/restore/audio/Bakemonogatari-OP1.ogg` endpoint will restore the soft deleted Bakemonogatari-OP1.ogg audio and return the restored Bakemonogatari-OP1.ogg resource.
## URL
```sh
PATCH /restore/audio/{basename}
```
## Authentication
**Required Permission**: restore audio
**Roles with Permission**: Admin
## Parameters
None
## Response
```json
{
audio: {
id: id,
basename: "basename",
filename: "filename",
path: "path",
size: size,
mimetype: "mimetype",
created_at: "created_at",
updated_at: "updated_at",
deleted_at: "deleted_at",
link: "link"
}
}
```
## Example
```bash
curl -X PATCH -H "Authorization: Bearer {token}" https://api.animethemes.moe/restore/audio/Bakemonogatari-OP1.ogg
```
+4
View File
@@ -44,6 +44,10 @@ The image force delete endpoint hard deletes an image and returns a confirmation
The image index endpoint displays a listing of image resources.
**[Image Restore](/wiki/image/restore/)**
The image restore endpoint restores a soft deleted image and returns the restored image resource.
**[Image Show](/wiki/image/show/)**
The image show endpoint returns an image resource.
+49
View File
@@ -0,0 +1,49 @@
---
title: Image Restore
---
# Image Restore Endpoint
The image restore endpoint restores a soft deleted image and returns the restored image resource.
For example, the `/restore/image/435` endpoint will restore the soft deleted large cover image for the Bakemonogatari anime and return the restored image resource.
## URL
```sh
PATCH /restore/image/{id}
```
## Authentication
**Required Permission**: restore image
**Roles with Permission**: Wiki Editor, Admin
## Parameters
None
## Response
```json
{
image: {
id: id,
path: "path",
size: size,
mimetype: "mimetype",
facet: "facet",
created_at: "created_at",
updated_at: "updated_at",
deleted_at: "deleted_at",
link: "link"
}
}
```
## Example
```bash
curl -X PATCH -H "Authorization: Bearer {token}" https://api.animethemes.moe/restore/image/435
```
+4
View File
@@ -43,6 +43,10 @@ The resource force delete endpoint hard deletes an external resource and returns
The resource index endpoint returns a listing of external resources.
**[Resource Restore](/wiki/resource/restore/)**
The resource restore endpoint restores a soft deleted external resource and returns the restored external resource.
**[Resource Show](/wiki/resource/show/)**
The resource show endpoint returns an external resource.
+48
View File
@@ -0,0 +1,48 @@
---
title: Resource Restore
---
# Resource Restore Endpoint
The resource restore endpoint restores a soft deleted external resource and returns the restored external resource.
For example, the `/restore/resource/1083` endpoint will restore the soft deleted MyAnimeList resource for the Bakemonogatari anime and return the restored MyAnimeList resource.
## URL
```sh
PATCH /restore/resource/{id}
```
## Authentication
**Required Permission**: restore external resource
**Roles with Permission**: Wiki Editor, Admin
## Parameters
None
## Response
```json
{
resource: {
id: id,
link: "link",
external_id: external_id,
site: "site",
created_at: "created_at",
updated_at: "updated_at",
deleted_at: "deleted_at",
link: "link"
}
}
```
## Example
```bash
curl -X PATCH -H "Authorization: Bearer {token}" https://api.animethemes.moe/restore/resource/1083
```
+4
View File
@@ -39,6 +39,10 @@ The series force delete endpoint hard deletes a series and returns a confirmatio
The series index endpoint displays a listing of series resources.
**[Series Restore](/wiki/series/restore/)**
The series restore endpoint restores a soft deleted series and returns the restored series resource.
**[Series Show](/wiki/series/show/)**
The series show endpoint returns a series resource.
+46
View File
@@ -0,0 +1,46 @@
---
title: Series Restore
---
# Series Restore Endpoint
The series restore endpoint restores a soft deleted series and returns the restored series resource.
For example, the `/restore/series/monogatari` endpoint will restore the soft deleted Monogatari series and return the restored Monogatari resource.
## URL
```sh
PATCH /restore/series/{slug}
```
## Authentication
**Required Permission**: restore series
**Roles with Permission**: Wiki Editor, Admin
## Parameters
None
## Response
```json
{
series: {
id: id,
name: "name",
slug: "slug",
created_at: "created_at",
updated_at: "updated_at",
deleted_at: "deleted_at"
}
}
```
## Example
```bash
curl -X PATCH -H "Authorization: Bearer {token}" https://api.animethemes.moe/restore/series/monogatari
```
+4
View File
@@ -41,6 +41,10 @@ The song force delete endpoint hard deletes a song and returns a confirmation me
The song index endpoint displays a listing of song resources.
**[Song Restore](/wiki/song/restore/)**
The song restore endpoint restores a soft deleted song and returns the restored song resource.
**[Song Show](/wiki/song/show/)**
The song show endpoint returns a song resource.
+45
View File
@@ -0,0 +1,45 @@
---
title: Song Restore
---
# Song Restore Endpoint
The song restore endpoint restores a soft deleted song and returns the restored song resource.
For example, the `/restore/song/3373` endpoint will restore the soft deleted "staple stable" song and return the restored "staple stable" resource.
## URL
```sh
PATCH /restore/song/{id}
```
## Authentication
**Required Permission**: restore song
**Roles with Permission**: Wiki Editor, Admin
## Parameters
None
## Response
```json
{
song: {
id: id,
title: "title",
created_at: "created_at",
updated_at: "updated_at",
deleted_at: "deleted_at"
}
}
```
## Example
```bash
curl -X PATCH -H "Authorization: Bearer {token}" https://api.animethemes.moe/restore/song/3373
```
+4
View File
@@ -41,6 +41,10 @@ The studio force delete endpoint hard deletes a studio and returns a confirmatio
The studio index endpoint displays a listing of studio resources.
**[Studio Restore](/wiki/studio/restore/)**
The studio restore endpoint restores a soft deleted studio and returns the restored studio resource.
**[Studio Show](/wiki/studio/show/)**
The studio show endpoint returns a studio resource.
+46
View File
@@ -0,0 +1,46 @@
---
title: Studio Restore
---
# Studio Restore Endpoint
The studio restore endpoint restores a soft deleted studio and returns the restored studio resource.
For example, the `/restore/studio/shaft` endpoint will restore the soft deleted Shaft studio and return the restored Shaft resource.
## URL
```sh
PATCH /restore/studio/{slug}
```
## Authentication
**Required Permission**: restore studio
**Roles with Permission**: Wiki Editor, Admin
## Parameters
None
## Response
```json
{
studio: {
id: id,
name: "name",
slug: "slug",
created_at: "created_at",
updated_at: "updated_at",
deleted_at: "deleted_at"
}
}
```
## Example
```bash
curl -X PATCH -H "Authorization: Bearer {token}" https://api.animethemes.moe/restore/studio/shaft
```
+4
View File
@@ -55,6 +55,10 @@ The video force delete endpoint hard deletes a video and returns a confirmation
The video index endpoint displays a listing of video resources.
**[Video Restore](/wiki/video/restore/)**
The video restore endpoint restores a soft deleted video and returns the restored video resource.
**[Video Show](/wiki/video/show/)**
The video show endpoint returns a video resource.
+58
View File
@@ -0,0 +1,58 @@
---
title: Video Restore
---
# Video Restore Endpoint
The video restore endpoint restores a soft deleted video and returns the restored video resource.
For example, the `/restore/video/Bakemonogatari-OP1.webm` endpoint will restore the soft deleted Bakemonogatari-OP1.webm video and return the restored Bakemonogatari-OP1.webm resource.
## URL
```sh
PATCH /restore/video/{basename}
```
## Authentication
**Required Permission**: restore video
**Roles with Permission**: Admin
## Parameters
None
## Response
```json
{
video: {
id: id,
basename: "basename",
filename: "filename",
path: "path",
size: size,
mimetype: "mimetype",
resolution: resolution,
nc: nc,
subbed: subbed,
lyrics: lyrics,
uncen: uncen,
source: "source",
overlap: "overlap",
created_at: "created_at",
updated_at: "updated_at",
deleted_at: "deleted_at",
tags: "tags",
link: "link"
}
}
```
## Example
```bash
curl -X PATCH -H "Authorization: Bearer {token}" https://api.animethemes.moe/restore/video/Bakemonogatari-OP1.webm
```
+4
View File
@@ -39,6 +39,10 @@ The video script force delete endpoint hard deletes a video script and returns a
The video script index endpoint displays a listing of video script resources.
**[Video Script Restore](/wiki/videoscript/restore/)**
The video script restore endpoint restores a soft deleted video script and returns the restored video script resource.
**[Video Script Show](/wiki/videoscript/show/)**
The video script show endpoint returns a video script resource.
+46
View File
@@ -0,0 +1,46 @@
---
title: Video Script Restore
---
# Video Script Restore Endpoint
The video script restore endpoint restores a soft deleted video script and returns the restored video script resource.
For example, the `/restore/videoscript/1` endpoint will restore the soft deleted video script of id '1' and return the restored video script resource.
## URL
```sh
PATCH /restore/videoscript/{id}
```
## Authentication
**Required Permission**: restore video script
**Roles with Permission**: Admin
## Parameters
None
## Response
```json
{
videoscript: {
id: id,
path: "path",
created_at: "created_at",
updated_at: "updated_at",
deleted_at: "deleted_at",
link: "link
}
}
```
## Example
```bash
curl -X PATCH -H "Authorization: Bearer {token}" https://api.animethemes.moe/restore/videoscript/1
```
+25 -25
View File
@@ -10,7 +10,7 @@
"license": "MIT",
"dependencies": {
"dotenv": "^16.0.3",
"vitepress": "^1.0.0-alpha.25"
"vitepress": "^1.0.0-alpha.26"
}
},
"node_modules/@algolia/autocomplete-core": {
@@ -154,9 +154,9 @@
}
},
"node_modules/@babel/parser": {
"version": "7.19.6",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.6.tgz",
"integrity": "sha512-h1IUp81s2JYJ3mRkdxJgs4UvmSsRvDrx5ICSJbPvtWYv5i1nTBGcBpnog+89rAFMwvvru6E5NUHdBe01UeSzYA==",
"version": "7.20.1",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.1.tgz",
"integrity": "sha512-hp0AYxaZJhxULfM1zyp7Wgr+pSUKBcP3M+PHnSzWGdXOzg/kHWIgiUWARvubhUKGOEw3xqY4x+lyZ9ytBVcELw==",
"bin": {
"parser": "bin/babel-parser.js"
},
@@ -969,9 +969,9 @@
}
},
"node_modules/shiki-processor": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/shiki-processor/-/shiki-processor-0.1.0.tgz",
"integrity": "sha512-7ty3VouP7AQMlERKeiobVeyhjUW6rPMM1b+xFcFF/XwhkN4//Fg9Ju6hPfIOvO4ztylkbLqYufbJmLJmw7SfQA==",
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/shiki-processor/-/shiki-processor-0.1.1.tgz",
"integrity": "sha512-K2v/JNHdMRGFnbcVqAgvPU8qmZNgtiBrYcYKe3O6Lx2W0RoyiwzrrpCUU917b2r2EMS+2FNgRIgz9xvtmF/L7w==",
"funding": {
"url": "https://github.com/sponsors/innocenzi"
},
@@ -1012,9 +1012,9 @@
}
},
"node_modules/vite": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/vite/-/vite-3.2.0.tgz",
"integrity": "sha512-Ovj7+cqIdM1I0LPCk2CWxzgADXMix3NLXpUT6g7P7zg/a9grk/TaC3qn9YMg7w7M0POIVCBOp1aBANJW+RH7oA==",
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/vite/-/vite-3.2.2.tgz",
"integrity": "sha512-pLrhatFFOWO9kS19bQ658CnRYzv0WLbsPih6R+iFeEEhDOuYgYCX2rztUViMz/uy/V8cLCJvLFeiOK7RJEzHcw==",
"dependencies": {
"esbuild": "^0.15.9",
"postcss": "^8.4.18",
@@ -1056,9 +1056,9 @@
}
},
"node_modules/vitepress": {
"version": "1.0.0-alpha.25",
"resolved": "https://registry.npmjs.org/vitepress/-/vitepress-1.0.0-alpha.25.tgz",
"integrity": "sha512-qvKQ4aCArGL8nxP7BAeMBY/N9qm6fX5/dVNGESDvpkm/M8BQlIkOIEanlkAEPY9VOCMA1zcX3wtstcEcnjc5fA==",
"version": "1.0.0-alpha.26",
"resolved": "https://registry.npmjs.org/vitepress/-/vitepress-1.0.0-alpha.26.tgz",
"integrity": "sha512-XpDpflrdmyBmUQrg06q29Mhez144NvoZ48pRvNhANy/wV7E7XJ1zenQROOSADnOsAlhV1gzcNjqiFNObCk7l8A==",
"dependencies": {
"@docsearch/css": "^3.3.0",
"@docsearch/js": "^3.3.0",
@@ -1236,9 +1236,9 @@
}
},
"@babel/parser": {
"version": "7.19.6",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.19.6.tgz",
"integrity": "sha512-h1IUp81s2JYJ3mRkdxJgs4UvmSsRvDrx5ICSJbPvtWYv5i1nTBGcBpnog+89rAFMwvvru6E5NUHdBe01UeSzYA=="
"version": "7.20.1",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.1.tgz",
"integrity": "sha512-hp0AYxaZJhxULfM1zyp7Wgr+pSUKBcP3M+PHnSzWGdXOzg/kHWIgiUWARvubhUKGOEw3xqY4x+lyZ9ytBVcELw=="
},
"@docsearch/css": {
"version": "3.3.0",
@@ -1721,9 +1721,9 @@
}
},
"shiki-processor": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/shiki-processor/-/shiki-processor-0.1.0.tgz",
"integrity": "sha512-7ty3VouP7AQMlERKeiobVeyhjUW6rPMM1b+xFcFF/XwhkN4//Fg9Ju6hPfIOvO4ztylkbLqYufbJmLJmw7SfQA==",
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/shiki-processor/-/shiki-processor-0.1.1.tgz",
"integrity": "sha512-K2v/JNHdMRGFnbcVqAgvPU8qmZNgtiBrYcYKe3O6Lx2W0RoyiwzrrpCUU917b2r2EMS+2FNgRIgz9xvtmF/L7w==",
"requires": {}
},
"source-map": {
@@ -1747,9 +1747,9 @@
"integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w=="
},
"vite": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/vite/-/vite-3.2.0.tgz",
"integrity": "sha512-Ovj7+cqIdM1I0LPCk2CWxzgADXMix3NLXpUT6g7P7zg/a9grk/TaC3qn9YMg7w7M0POIVCBOp1aBANJW+RH7oA==",
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/vite/-/vite-3.2.2.tgz",
"integrity": "sha512-pLrhatFFOWO9kS19bQ658CnRYzv0WLbsPih6R+iFeEEhDOuYgYCX2rztUViMz/uy/V8cLCJvLFeiOK7RJEzHcw==",
"requires": {
"esbuild": "^0.15.9",
"fsevents": "~2.3.2",
@@ -1759,9 +1759,9 @@
}
},
"vitepress": {
"version": "1.0.0-alpha.25",
"resolved": "https://registry.npmjs.org/vitepress/-/vitepress-1.0.0-alpha.25.tgz",
"integrity": "sha512-qvKQ4aCArGL8nxP7BAeMBY/N9qm6fX5/dVNGESDvpkm/M8BQlIkOIEanlkAEPY9VOCMA1zcX3wtstcEcnjc5fA==",
"version": "1.0.0-alpha.26",
"resolved": "https://registry.npmjs.org/vitepress/-/vitepress-1.0.0-alpha.26.tgz",
"integrity": "sha512-XpDpflrdmyBmUQrg06q29Mhez144NvoZ48pRvNhANy/wV7E7XJ1zenQROOSADnOsAlhV1gzcNjqiFNObCk7l8A==",
"requires": {
"@docsearch/css": "^3.3.0",
"@docsearch/js": "^3.3.0",
+1 -1
View File
@@ -16,6 +16,6 @@
"license": "MIT",
"dependencies": {
"dotenv": "^16.0.3",
"vitepress": "^1.0.0-alpha.25"
"vitepress": "^1.0.0-alpha.26"
}
}