mirror of
https://github.com/AnimeThemes/animethemes-api-docs.git
synced 2026-07-11 01:34:06 +02:00
@@ -18,7 +18,7 @@ Follow the Installation Guide in the README to ensure a functional local instanc
|
||||
|
||||
Set this repository as upstream to the forked repository.
|
||||
|
||||
`git remote add upstream https://github.com/AnimeThemes/animethemes-api-docs.git`
|
||||
`git remote add upstream git@github.com:AnimeThemes/animethemes-api-docs.git`
|
||||
|
||||
Pull upstream changes so that the local main branch is even with the upstream main branch.
|
||||
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
patreon: AnimeThemes
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: animethemes
|
||||
ko_fi: # Replace with a Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
|
||||
@@ -20,3 +20,6 @@ dist/
|
||||
|
||||
# VuePress temp directory
|
||||
.temp
|
||||
|
||||
# Cache
|
||||
docs/.vitepress/cache/
|
||||
@@ -1,6 +1,6 @@
|
||||
<p align="center">
|
||||
<a href="https://discordapp.com/invite/m9zbVyQ"><img src="https://img.shields.io/discord/354388306580078594.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2"></a>
|
||||
<a href="https://github.com/AnimeThemes/animethemes-server/blob/wiki/LICENSE"><img src="https://img.shields.io/github/license/AnimeThemes/animethemes-server"></a>
|
||||
<a href="https://github.com/AnimeThemes/animethemes-server/blob/main/LICENSE"><img src="https://img.shields.io/github/license/AnimeThemes/animethemes-server"></a>
|
||||
<a href="https://reddit.com/r/AnimeThemes"><img src="https://img.shields.io/reddit/subreddit-subscribers/AnimeThemes?style=social"></a>
|
||||
<a href="https://twitter.com/AnimeThemesMoe"><img src="https://img.shields.io/twitter/follow/AnimeThemesMoe?style=social"></a>
|
||||
</p>
|
||||
@@ -25,7 +25,7 @@ In the project root directory, start the local development server.
|
||||
|
||||
`npm run docs:dev`
|
||||
|
||||
That's it! The local development server should be running at `localhost:3000`.
|
||||
That's it! The local development server should be running at `localhost:5173`.
|
||||
|
||||
## Contributing
|
||||
|
||||
|
||||
+573
-268
@@ -5,299 +5,604 @@ export default {
|
||||
lang: 'en-US',
|
||||
lastUpdated: true,
|
||||
title: 'AnimeThemes',
|
||||
titleTemplate: 'AnimeThemes API Documentation',
|
||||
description: 'AnimeThemes API Documentation',
|
||||
markdown: {
|
||||
lineNumbers: true
|
||||
},
|
||||
themeConfig: {
|
||||
editLink: {
|
||||
pattern: 'https://github.com/AnimeThemes/animethemes-api-docs/edit/main/docs/:path'
|
||||
},
|
||||
logo: {
|
||||
light: '/logo.svg',
|
||||
dark: '/logo-dark.svg',
|
||||
alt: 'Logo'
|
||||
},
|
||||
siteTitle: 'AnimeThemes API Documentation',
|
||||
siteTitle: 'AnimeThemes',
|
||||
socialLinks: [
|
||||
{ icon: 'discord', link: 'https://discordapp.com/invite/m9zbVyQ' },
|
||||
{ icon: 'github', link: 'https://github.com/AnimeThemes' },
|
||||
{ icon: 'twitter', link: 'https://twitter.com/AnimeThemesMoe' }
|
||||
],
|
||||
sidebar: [
|
||||
footer: {
|
||||
message: 'Released under the MIT License.',
|
||||
copyright: 'Copyright © AnimeThemes'
|
||||
},
|
||||
search: {
|
||||
provider: 'local'
|
||||
},
|
||||
nav: [
|
||||
{
|
||||
text: 'Introduction',
|
||||
collapsible: true,
|
||||
text: 'Intro',
|
||||
items: [
|
||||
{ text: 'JSON:API', link: '/jsonapi/' },
|
||||
{ text: 'Rate Limiting', link: '/ratelimiting/' },
|
||||
{ text: 'Authentication', link: '/authentication/' },
|
||||
{ text: 'Validation', link: '/validation/' },
|
||||
{ text: 'Index', link: '/intro/' },
|
||||
{ text: 'JSON:API', link: '/intro/jsonapi/' },
|
||||
{ text: 'Rate Limiting', link: '/intro/ratelimiting/' },
|
||||
{ text: 'Authentication', link: '/intro/authentication/' },
|
||||
{ text: 'Validation', link: '/intro/validation/' }
|
||||
],
|
||||
},
|
||||
{
|
||||
text: 'Admin',
|
||||
items: [
|
||||
{ text: 'Index', link: '/admin/' },
|
||||
{ text: 'Announcement', link: '/admin/announcement/' },
|
||||
{ text: 'Dump', link: '/admin/dump/' },
|
||||
{ text: 'Feature', link: '/admin/feature/' },
|
||||
{ text: 'Featured Theme', link: '/admin/featuredtheme/' }
|
||||
],
|
||||
},
|
||||
{
|
||||
text: 'Auth',
|
||||
items: [
|
||||
{ text: 'Index', link: '/auth/' },
|
||||
{ text: 'Me', link: '/auth/user/me/' },
|
||||
{ text: 'Permission', link: '/auth/permission/' },
|
||||
{ text: 'Role', link: '/auth/role/' },
|
||||
{ text: 'User', link: '/auth/user/' }
|
||||
],
|
||||
},
|
||||
{
|
||||
text: 'Document',
|
||||
items: [
|
||||
{ text: 'Index', link: '/document/' },
|
||||
{ text: 'Page', link: '/document/page/' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Anime',
|
||||
collapsible: true,
|
||||
text: 'List',
|
||||
items: [
|
||||
{ text: 'Resource', link: '/anime/' },
|
||||
{ text: 'Destroy', link: '/anime/destroy/' },
|
||||
{ text: 'Force Delete', link: '/anime/forceDelete/' },
|
||||
{ text: 'Index', link: '/anime/index/' },
|
||||
{ text: 'Show', link: '/anime/show/' },
|
||||
{ text: 'Store', link: '/anime/store/' },
|
||||
{ text: 'Update', link: '/anime/update/' },
|
||||
{ text: 'Year Index', link: '/animeyear/index/' },
|
||||
{ text: 'Year Show', link: '/animeyear/show/' },
|
||||
{ text: 'Index', link: '/list/' },
|
||||
{ text: 'Playlist', link: '/list/playlist/' },
|
||||
{ text: 'Playlist Image', link: '/list/playlistimage/' },
|
||||
{ text: 'Playlist Track', link: '/list/playlist/track/' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Anime Image',
|
||||
collapsible: true,
|
||||
text: 'Search',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/animeimage/' },
|
||||
{ text: 'Destroy', link: '/animeimage/destroy/' },
|
||||
{ text: 'Index', link: '/animeimage/index/' },
|
||||
{ text: 'Show', link: '/animeimage/show/' },
|
||||
{ text: 'Store', link: '/animeimage/store/' },
|
||||
{ text: 'Search', link: '/search/' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Anime Synonym',
|
||||
collapsible: true,
|
||||
text: 'Wiki',
|
||||
items: [
|
||||
{ text: 'Resource', link: '/animesynonym/' },
|
||||
{ text: 'Destroy', link: '/animesynonym/destroy/' },
|
||||
{ text: 'Force Delete', link: '/animesynonym/forceDelete/' },
|
||||
{ text: 'Index', link: '/animesynonym/index/' },
|
||||
{ text: 'Show', link: '/animesynonym/show/' },
|
||||
{ text: 'Store', link: '/animesynonym/store/' },
|
||||
{ text: 'Update', link: '/animesynonym/update/' },
|
||||
{ text: 'Index', link: '/wiki/' },
|
||||
{ text: 'Anime', link: '/wiki/anime/' },
|
||||
{ text: 'Anime Image', link: '/wiki/animeimage/' },
|
||||
{ text: 'Anime Resource', link: '/wiki/animeresource/' },
|
||||
{ text: 'Anime Series', link: '/wiki/animeseries/' },
|
||||
{ text: 'Anime Studio', link: '/wiki/animestudio/' },
|
||||
{ text: 'Anime Synonym', link: '/wiki/animesynonym/' },
|
||||
{ text: 'Anime Theme', link: '/wiki/animetheme/' },
|
||||
{ text: 'Anime Theme Entry', link: '/wiki/animethemeentry/' },
|
||||
{ text: 'Anime Theme Entry Video', link: '/wiki/animethemeentryvideo/' },
|
||||
{ text: 'Artist', link: '/wiki/artist/' },
|
||||
{ text: 'Artist Image', link: '/wiki/artistimage/' },
|
||||
{ text: 'Artist Member', link: '/wiki/artistmember/' },
|
||||
{ text: 'Artist Resource', link: '/wiki/artistresource/' },
|
||||
{ text: 'Artist Song', link: '/wiki/artistsong/' },
|
||||
{ text: 'Audio', link: '/wiki/audio/' },
|
||||
{ text: 'Image', link: '/wiki/image/' },
|
||||
{ text: 'Resource', link: '/wiki/resource/' },
|
||||
{ text: 'Series', link: '/wiki/series/' },
|
||||
{ text: 'Song', link: '/wiki/song/' },
|
||||
{ text: 'Song Resource', link: '/wiki/songresource/' },
|
||||
{ text: 'Studio', link: '/wiki/studio/' },
|
||||
{ text: 'Studio Image', link: '/wiki/studioimage/' },
|
||||
{ text: 'Studio Resource', link: '/wiki/studioresource/' },
|
||||
{ text: 'Video', link: '/wiki/video/' },
|
||||
{ text: 'Video Script', link: '/wiki/videoscript/' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Anime Theme',
|
||||
collapsible: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/animetheme/' },
|
||||
{ text: 'Destroy', link: '/animetheme/destroy/' },
|
||||
{ text: 'Force Delete', link: '/animetheme/forceDelete/' },
|
||||
{ text: 'Index', link: '/animetheme/index/' },
|
||||
{ text: 'Show', link: '/animetheme/show/' },
|
||||
{ text: 'Store', link: '/animetheme/store/' },
|
||||
{ text: 'Update', link: '/animetheme/update/' },
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Anime Theme Entry',
|
||||
collapsible: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/animethemeentry/' },
|
||||
{ text: 'Destroy', link: '/animethemeentry/destroy/' },
|
||||
{ text: 'Force Delete', link: '/animethemeentry/forceDelete/' },
|
||||
{ text: 'Index', link: '/animethemeentry/index/' },
|
||||
{ text: 'Show', link: '/animethemeentry/show/' },
|
||||
{ text: 'Store', link: '/animethemeentry/store/' },
|
||||
{ text: 'Update', link: '/animethemeentry/update/' },
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Announcement',
|
||||
collapsible: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/announcement/' },
|
||||
{ text: 'Destroy', link: '/announcement/destroy/' },
|
||||
{ text: 'Force Delete', link: '/announcement/forceDelete/' },
|
||||
{ text: 'Index', link: '/announcement/index/' },
|
||||
{ text: 'Show', link: '/announcement/show/' },
|
||||
{ text: 'Store', link: '/announcement/store/' },
|
||||
{ text: 'Update', link: '/announcement/update/' },
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Artist',
|
||||
collapsible: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/artist/' },
|
||||
{ text: 'Destroy', link: '/artist/destroy/' },
|
||||
{ text: 'Force Delete', link: '/artist/forceDelete/' },
|
||||
{ text: 'Index', link: '/artist/index/' },
|
||||
{ text: 'Show', link: '/artist/show/' },
|
||||
{ text: 'Store', link: '/artist/store/' },
|
||||
{ text: 'Update', link: '/artist/update/' },
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Audio',
|
||||
collapsible: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/audio/' },
|
||||
{ text: 'Destroy', link: '/audio/destroy/' },
|
||||
{ text: 'Force Delete', link: '/audio/forceDelete/' },
|
||||
{ text: 'Index', link: '/audio/index/' },
|
||||
{ text: 'Show', link: '/audio/show/' },
|
||||
{ text: 'Store', link: '/audio/store/' },
|
||||
{ text: 'Update', link: '/audio/update/' },
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Balance',
|
||||
collapsible: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/balance/' },
|
||||
{ text: 'Destroy', link: '/balance/destroy/' },
|
||||
{ text: 'Force Delete', link: '/balance/forceDelete/' },
|
||||
{ text: 'Index', link: '/balance/index/' },
|
||||
{ text: 'Show', link: '/balance/show/' },
|
||||
{ text: 'Store', link: '/balance/store/' },
|
||||
{ text: 'Update', link: '/balance/update/' },
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Dump',
|
||||
collapsible: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/dump/' },
|
||||
{ text: 'Destroy', link: '/dump/destroy/' },
|
||||
{ text: 'Force Delete', link: '/dump/forceDelete/' },
|
||||
{ text: 'Index', link: '/dump/index/' },
|
||||
{ text: 'Show', link: '/dump/show/' },
|
||||
{ text: 'Store', link: '/dump/store/' },
|
||||
{ text: 'Update', link: '/dump/update/' },
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Feature Flags',
|
||||
collapsible: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/config/flags/' },
|
||||
{ text: 'Show', link: '/config/flags/show/' },
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Global Search',
|
||||
collapsible: true,
|
||||
items: [
|
||||
{ text: 'Search', link: '/search/' },
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Image',
|
||||
collapsible: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/image/' },
|
||||
{ text: 'Destroy', link: '/image/destroy/' },
|
||||
{ text: 'Force Delete', link: '/image/forceDelete/' },
|
||||
{ text: 'Index', link: '/image/index/' },
|
||||
{ text: 'Show', link: '/image/show/' },
|
||||
{ text: 'Store', link: '/image/store/' },
|
||||
{ text: 'Update', link: '/image/update/' },
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Page',
|
||||
collapsible: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/page/' },
|
||||
{ text: 'Destroy', link: '/page/destroy/' },
|
||||
{ text: 'Force Delete', link: '/page/forceDelete/' },
|
||||
{ text: 'Index', link: '/page/index/' },
|
||||
{ text: 'Show', link: '/page/show/' },
|
||||
{ text: 'Store', link: '/page/store/' },
|
||||
{ text: 'Update', link: '/page/update/' },
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Resource',
|
||||
collapsible: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/resource/' },
|
||||
{ text: 'Destroy', link: '/resource/destroy/' },
|
||||
{ text: 'Force Delete', link: '/resource/forceDelete/' },
|
||||
{ text: 'Index', link: '/resource/index/' },
|
||||
{ text: 'Show', link: '/resource/show/' },
|
||||
{ text: 'Store', link: '/resource/store/' },
|
||||
{ text: 'Update', link: '/resource/update/' },
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Series',
|
||||
collapsible: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/series/' },
|
||||
{ text: 'Destroy', link: '/series/destroy/' },
|
||||
{ text: 'Force Delete', link: '/series/forceDelete/' },
|
||||
{ text: 'Index', link: '/series/index/' },
|
||||
{ text: 'Show', link: '/series/show/' },
|
||||
{ text: 'Store', link: '/series/store/' },
|
||||
{ text: 'Update', link: '/series/update/' },
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Song',
|
||||
collapsible: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/song/' },
|
||||
{ text: 'Destroy', link: '/song/destroy/' },
|
||||
{ text: 'Force Delete', link: '/song/forceDelete/' },
|
||||
{ text: 'Index', link: '/song/index/' },
|
||||
{ text: 'Show', link: '/song/show/' },
|
||||
{ text: 'Store', link: '/song/store/' },
|
||||
{ text: 'Update', link: '/song/update/' },
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Studio',
|
||||
collapsible: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/studio/' },
|
||||
{ text: 'Destroy', link: '/studio/destroy/' },
|
||||
{ text: 'Force Delete', link: '/studio/forceDelete/' },
|
||||
{ text: 'Index', link: '/studio/index/' },
|
||||
{ text: 'Show', link: '/studio/show/' },
|
||||
{ text: 'Store', link: '/studio/store/' },
|
||||
{ text: 'Update', link: '/studio/update/' },
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Transaction',
|
||||
collapsible: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/transaction/' },
|
||||
{ text: 'Destroy', link: '/transaction/destroy/' },
|
||||
{ text: 'Force Delete', link: '/transaction/forceDelete/' },
|
||||
{ text: 'Index', link: '/transaction/index/' },
|
||||
{ text: 'Show', link: '/transaction/show/' },
|
||||
{ text: 'Store', link: '/transaction/store/' },
|
||||
{ text: 'Update', link: '/transaction/update/' },
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Wiki Config',
|
||||
collapsible: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/config/wiki/' },
|
||||
{ text: 'Show', link: '/config/wiki/show/' },
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Video',
|
||||
collapsible: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/video/' },
|
||||
{ text: 'Destroy', link: '/video/destroy/' },
|
||||
{ text: 'Force Delete', link: '/video/forceDelete/' },
|
||||
{ text: 'Index', link: '/video/index/' },
|
||||
{ text: 'Show', link: '/video/show/' },
|
||||
{ text: 'Store', link: '/video/store/' },
|
||||
{ text: 'Update', link: '/video/update/' },
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Video Script',
|
||||
collapsible: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/videoscript/' },
|
||||
{ text: 'Destroy', link: '/videoscript/destroy/' },
|
||||
{ text: 'Force Delete', link: '/videoscript/forceDelete/' },
|
||||
{ text: 'Index', link: '/videoscript/index/' },
|
||||
{ text: 'Show', link: '/videoscript/show/' },
|
||||
{ text: 'Store', link: '/videoscript/store/' },
|
||||
{ text: 'Update', link: '/videoscript/update/' },
|
||||
]
|
||||
},
|
||||
]
|
||||
}
|
||||
],
|
||||
sidebar: {
|
||||
'/admin/': [
|
||||
{
|
||||
text: 'Announcement',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/admin/announcement/' },
|
||||
{ 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/' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Dump',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/admin/dump/' },
|
||||
{ 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/' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Feature',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/admin/feature/' },
|
||||
{ text: 'Index', link: '/admin/feature/index/' },
|
||||
{ text: 'Show', link: '/admin/feature/show/' },
|
||||
{ text: 'Update', link: '/admin/feature/update/' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Featured Theme',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/admin/featuredtheme/' },
|
||||
{ text: 'Current', link: '/admin/featuredtheme/current/' },
|
||||
{ text: 'Destroy', link: '/admin/featuredtheme/destroy/' },
|
||||
{ text: 'Force Delete', link: '/admin/featuredtheme/forceDelete/' },
|
||||
{ text: 'Index', link: '/admin/featuredtheme/index/' },
|
||||
{ text: 'Restore', link: '/admin/featuredtheme/restore/' },
|
||||
{ text: 'Show', link: '/admin/featuredtheme/show/' },
|
||||
{ text: 'Store', link: '/admin/featuredtheme/store/' },
|
||||
{ text: 'Update', link: '/admin/featuredtheme/update/' }
|
||||
]
|
||||
}
|
||||
],
|
||||
'/auth/': [
|
||||
{
|
||||
text: 'Me',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/auth/user/me/' },
|
||||
{ text: 'Show', link: '/auth/user/me/show/' },
|
||||
{ text: 'Playlists', link: '/auth/user/me/playlist/' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Permission',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/auth/permission/' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Role',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/auth/role/' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'User',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/auth/user/' }
|
||||
]
|
||||
}
|
||||
],
|
||||
'/document/': [
|
||||
{
|
||||
text: 'Page',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/document/page/' },
|
||||
{ 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/' }
|
||||
]
|
||||
}
|
||||
],
|
||||
'/intro/': [
|
||||
{
|
||||
text: 'Introduction',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'JSON:API', link: '/intro/jsonapi/' },
|
||||
{ text: 'Rate Limiting', link: '/intro/ratelimiting/' },
|
||||
{ text: 'Authentication', link: '/intro/authentication/' },
|
||||
{ text: 'Validation', link: '/intro/validation/' }
|
||||
]
|
||||
}
|
||||
],
|
||||
'/list/': [
|
||||
{
|
||||
text: 'Playlist',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/list/playlist/' },
|
||||
{ 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/' },
|
||||
{ text: 'Forward Index', link: '/list/playlist/forward/' },
|
||||
{ text: 'Backward Index', link: '/list/playlist/backward/' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Playlist Image',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/list/playlistimage/' },
|
||||
{ text: 'Destroy', link: '/list/playlistimage/destroy/' },
|
||||
{ text: 'Index', link: '/list/playlistimage/index/' },
|
||||
{ text: 'Show', link: '/list/playlistimage/show/' },
|
||||
{ text: 'Store', link: '/list/playlistimage/store/' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Playlist Track',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/list/playlist/track/' },
|
||||
{ text: 'Destroy', link: '/list/playlist/track/destroy/' },
|
||||
{ text: 'Force Delete', link: '/list/playlist/track/forceDelete/' },
|
||||
{ text: 'Index', link: '/list/playlist/track/index/' },
|
||||
{ text: 'Restore', link: '/list/playlist/track/restore/' },
|
||||
{ text: 'Show', link: '/list/playlist/track/show/' },
|
||||
{ text: 'Store', link: '/list/playlist/track/store/' },
|
||||
{ text: 'Update', link: '/list/playlist/track/update/' },
|
||||
{ text: 'Forward Index', link: '/list/playlist/track/forward/' },
|
||||
{ text: 'Backward Index', link: '/list/playlist/track/backward/' }
|
||||
]
|
||||
}
|
||||
],
|
||||
'/wiki/': [
|
||||
{
|
||||
text: 'Anime',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/wiki/anime/' },
|
||||
{ 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/' },
|
||||
{ text: 'Year Index', link: '/wiki/animeyear/index/' },
|
||||
{ text: 'Year Show', link: '/wiki/animeyear/show/' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Anime Image',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/wiki/animeimage/' },
|
||||
{ text: 'Destroy', link: '/wiki/animeimage/destroy/' },
|
||||
{ text: 'Index', link: '/wiki/animeimage/index/' },
|
||||
{ text: 'Show', link: '/wiki/animeimage/show/' },
|
||||
{ text: 'Store', link: '/wiki/animeimage/store/' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Anime Resource',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/wiki/animeresource/' },
|
||||
{ text: 'Destroy', link: '/wiki/animeresource/destroy/' },
|
||||
{ text: 'Index', link: '/wiki/animeresource/index/' },
|
||||
{ text: 'Show', link: '/wiki/animeresource/show/' },
|
||||
{ text: 'Store', link: '/wiki/animeresource/store/' },
|
||||
{ text: 'Update', link: '/wiki/animeresource/update/' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Anime Series',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/wiki/animeseries/' },
|
||||
{ text: 'Destroy', link: '/wiki/animeseries/destroy/' },
|
||||
{ text: 'Index', link: '/wiki/animeseries/index/' },
|
||||
{ text: 'Show', link: '/wiki/animeseries/show/' },
|
||||
{ text: 'Store', link: '/wiki/animeseries/store/' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Anime Studio',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/wiki/animestudio/' },
|
||||
{ text: 'Destroy', link: '/wiki/animestudio/destroy/' },
|
||||
{ text: 'Index', link: '/wiki/animestudio/index/' },
|
||||
{ text: 'Show', link: '/wiki/animestudio/show/' },
|
||||
{ text: 'Store', link: '/wiki/animestudio/store/' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Anime Synonym',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/wiki/animesynonym/' },
|
||||
{ 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/' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Anime Theme',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/wiki/animetheme/' },
|
||||
{ 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/' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Anime Theme Entry',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/wiki/animethemeentry/' },
|
||||
{ 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/' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Anime Theme Entry Video',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/wiki/animethemeentryvideo/' },
|
||||
{ text: 'Destroy', link: '/wiki/animethemeentryvideo/destroy/' },
|
||||
{ text: 'Index', link: '/wiki/animethemeentryvideo/index/' },
|
||||
{ text: 'Show', link: '/wiki/animethemeentryvideo/show/' },
|
||||
{ text: 'Store', link: '/wiki/animethemeentryvideo/store/' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Artist',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/wiki/artist/' },
|
||||
{ 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/' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Artist Image',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/wiki/artistimage/' },
|
||||
{ text: 'Destroy', link: '/wiki/artistimage/destroy/' },
|
||||
{ text: 'Index', link: '/wiki/artistimage/index/' },
|
||||
{ text: 'Show', link: '/wiki/artistimage/show/' },
|
||||
{ text: 'Store', link: '/wiki/artistimage/store/' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Artist Member',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/wiki/artistmember/' },
|
||||
{ text: 'Destroy', link: '/wiki/artistmember/destroy/' },
|
||||
{ text: 'Index', link: '/wiki/artistmember/index/' },
|
||||
{ text: 'Show', link: '/wiki/artistmember/show/' },
|
||||
{ text: 'Store', link: '/wiki/artistmember/store/' },
|
||||
{ text: 'Update', link: '/wiki/artistmember/update/' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Artist Resource',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/wiki/artistresource/' },
|
||||
{ text: 'Destroy', link: '/wiki/artistresource/destroy/' },
|
||||
{ text: 'Index', link: '/wiki/artistresource/index/' },
|
||||
{ text: 'Show', link: '/wiki/artistresource/show/' },
|
||||
{ text: 'Store', link: '/wiki/artistresource/store/' },
|
||||
{ text: 'Update', link: '/wiki/artistresource/update/' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Artist Song',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/wiki/artistsong/' },
|
||||
{ text: 'Destroy', link: '/wiki/artistsong/destroy/' },
|
||||
{ text: 'Index', link: '/wiki/artistsong/index/' },
|
||||
{ text: 'Show', link: '/wiki/artistsong/show/' },
|
||||
{ text: 'Store', link: '/wiki/artistsong/store/' },
|
||||
{ text: 'Update', link: '/wiki/artistsong/update/' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Audio',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/wiki/audio/' },
|
||||
{ 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/' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Image',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/wiki/image/' },
|
||||
{ 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/' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Resource',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/wiki/resource/' },
|
||||
{ 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/' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Series',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/wiki/series/' },
|
||||
{ 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/' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Song',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/wiki/song/' },
|
||||
{ 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/' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Song Resource',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/wiki/songresource/' },
|
||||
{ text: 'Destroy', link: '/wiki/songresource/destroy/' },
|
||||
{ text: 'Index', link: '/wiki/songresource/index/' },
|
||||
{ text: 'Show', link: '/wiki/songresource/show/' },
|
||||
{ text: 'Store', link: '/wiki/songresource/store/' },
|
||||
{ text: 'Update', link: '/wiki/songresource/update/' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Studio',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/wiki/studio/' },
|
||||
{ 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/' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Studio Image',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/wiki/studioimage/' },
|
||||
{ text: 'Destroy', link: '/wiki/studioimage/destroy/' },
|
||||
{ text: 'Index', link: '/wiki/studioimage/index/' },
|
||||
{ text: 'Show', link: '/wiki/studioimage/show/' },
|
||||
{ text: 'Store', link: '/wiki/studioimage/store/' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Studio Resource',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/wiki/studioresource/' },
|
||||
{ text: 'Destroy', link: '/wiki/studioresource/destroy/' },
|
||||
{ text: 'Index', link: '/wiki/studioresource/index/' },
|
||||
{ text: 'Show', link: '/wiki/studioresource/show/' },
|
||||
{ text: 'Store', link: '/wiki/studioresource/store/' },
|
||||
{ text: 'Update', link: '/wiki/studioresource/update/' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Video',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/wiki/video/' },
|
||||
{ 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/' }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Video Script',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: 'Resource', link: '/wiki/videoscript/' },
|
||||
{ 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/' }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 15 KiB |
@@ -0,0 +1,7 @@
|
||||
:root {
|
||||
--vp-c-brand: #40b8a6;
|
||||
--vp-c-brand-light: #75ead4;
|
||||
--vp-c-brand-lighter: #d1fbf1;
|
||||
--vp-c-brand-dark: #28766e;
|
||||
--vp-c-brand-darker: #1e4e4a;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
import DefaultTheme from 'vitepress/theme'
|
||||
import './custom.css'
|
||||
|
||||
export default {
|
||||
...DefaultTheme
|
||||
}
|
||||
@@ -20,6 +20,8 @@ DELETE /announcement/{id}
|
||||
|
||||
**Roles with Permission**: Admin
|
||||
|
||||
**Other Requirements**: Announcement must not be soft deleted
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
@@ -0,0 +1,55 @@
|
||||
---
|
||||
title: Announcement
|
||||
---
|
||||
|
||||
# Announcement
|
||||
|
||||
---
|
||||
|
||||
An announcement API resource represents a site-wide message to be broadcasted on the homepage.
|
||||
|
||||
For example, if video streaming is disabled, the site staff may issue a "Video streaming has been disabled!" announcement.
|
||||
|
||||
## Fields
|
||||
|
||||
| Name | Type | Nullable | Default | Description |
|
||||
| :--------: | :-----: | :------: | :-----: | :------------------------------------------- |
|
||||
| id | Integer | No | Yes | The primary key of the resource |
|
||||
| content | String | No | Yes | The announcement text |
|
||||
| created_at | Date | No | No | The date that the resource was created |
|
||||
| updated_at | Date | No | No | The date that the resource was last modified |
|
||||
| deleted_at | Date | Yes | No | The date that the resource was deleted |
|
||||
|
||||
## Allowed Include Paths
|
||||
|
||||
None
|
||||
|
||||
## Endpoints
|
||||
|
||||
**[Announcement Destroy](/admin/announcement/destroy/)**
|
||||
|
||||
The announcement destroy endpoint soft deletes an announcement and returns the deleted announcement resource.
|
||||
|
||||
**[Announcement Force Delete](/admin/announcement/forceDelete/)**
|
||||
|
||||
The announcement force delete endpoint hard deletes an announcement and returns a confirmation message.
|
||||
|
||||
**[Announcement Index](/admin/announcement/index/)**
|
||||
|
||||
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.
|
||||
|
||||
**[Announcement Store](/admin/announcement/store/)**
|
||||
|
||||
The announcement store endpoint creates a new announcement and returns the new announcement resource.
|
||||
|
||||
**[Announcement Update](/admin/announcement/update/)**
|
||||
|
||||
The announcement update endpoint updates an announcement and returns the updated announcement resource.
|
||||
@@ -0,0 +1,47 @@
|
||||
---
|
||||
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
|
||||
|
||||
**Other Requirements**: Announcement must be soft deleted
|
||||
|
||||
## 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
|
||||
```
|
||||
@@ -20,6 +20,8 @@ PUT|PATCH /announcement/{id}
|
||||
|
||||
**Roles with Permission**: Admin
|
||||
|
||||
**Other Requirements**: Announcement must not be soft deleted
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Rules |
|
||||
@@ -20,6 +20,8 @@ DELETE /dump/{id}
|
||||
|
||||
**Roles with Permission**: Admin
|
||||
|
||||
**Other Requirements**: Dump must not be soft deleted
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
@@ -0,0 +1,56 @@
|
||||
---
|
||||
title: Dump
|
||||
---
|
||||
|
||||
# Dump
|
||||
|
||||
---
|
||||
|
||||
A dump API resource represents a database dump of selected tables at a given point in time.
|
||||
|
||||
For example, the animethemes-db-dump-wiki-1663559663946.sql dump represents the database dump of wiki tables performed at 2022-09-19.
|
||||
|
||||
## Fields
|
||||
|
||||
| Name | Type | Nullable | Default | Description |
|
||||
| :--------: | :-----: | :------: | :-----: | :--------------------------------------------|
|
||||
| id | Integer | No | Yes | The primary key of the resource |
|
||||
| path | String | No | Yes | The path of the file in storage |
|
||||
| created_at | Date | No | No | The date that the resource was created |
|
||||
| updated_at | Date | No | No | The date that the resource was last modified |
|
||||
| deleted_at | Date | Yes | No | The date that the resource was deleted |
|
||||
| link | String | No | Yes | The URL to download the file from storage |
|
||||
|
||||
## Allowed Include Paths
|
||||
|
||||
None
|
||||
|
||||
## Endpoints
|
||||
|
||||
**[Dump Destroy](/admin/dump/destroy/)**
|
||||
|
||||
The dump destroy endpoint soft deletes a dump and returns the deleted dump resource.
|
||||
|
||||
**[Dump Force Delete](/admin/dump/forceDelete/)**
|
||||
|
||||
The dump force delete endpoint hard deletes a dump and returns a confirmation message.
|
||||
|
||||
**[Dump Index](/admin/dump/index/)**
|
||||
|
||||
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.
|
||||
|
||||
**[Dump Store](/admin/dump/store/)**
|
||||
|
||||
The dump store endpoint creates a new dump and returns the new dump resource.
|
||||
|
||||
**[Dump Update](/admin/dump/update/)**
|
||||
|
||||
The dump update endpoint updates a dump and returns the updated dump resource.
|
||||
@@ -0,0 +1,48 @@
|
||||
---
|
||||
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
|
||||
|
||||
**Other Requirements**: Dump must be soft deleted
|
||||
|
||||
## 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
|
||||
```
|
||||
@@ -20,6 +20,8 @@ PUT|PATCH /dump/{id}
|
||||
|
||||
**Roles with Permission**: Admin
|
||||
|
||||
**Other Requirements**: Dump must not be soft deleted
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Rules |
|
||||
@@ -0,0 +1,39 @@
|
||||
---
|
||||
title: Feature
|
||||
---
|
||||
|
||||
# Feature
|
||||
|
||||
---
|
||||
|
||||
A feature API resource represents a feature flag that enable/disable site functionalities.
|
||||
|
||||
For example, the 'allow_discord_notifications' feature enables/disables discord notifications for the configured bot.
|
||||
|
||||
## Fields
|
||||
|
||||
| Name | Type | Nullable | Default | Description |
|
||||
| :--------: | :-----: | :------: | :-----: | :--------------------------------------------|
|
||||
| id | Integer | No | Yes | The primary key of the resource |
|
||||
| name | String | No | Yes | The title of the resource |
|
||||
| value | String | No | Yes | The value of the resource |
|
||||
| created_at | Date | No | No | The date that the resource was created |
|
||||
| updated_at | Date | No | No | The date that the resource was last modified |
|
||||
|
||||
## Allowed Include Paths
|
||||
|
||||
None
|
||||
|
||||
## Endpoints
|
||||
|
||||
**[Feature Index](/admin/feature/index/)**
|
||||
|
||||
The feature index endpoint displays a listing of feature resources.
|
||||
|
||||
**[Feature Show](/admin/feature/show/)**
|
||||
|
||||
The feature show endpoint returns a feature resource.
|
||||
|
||||
**[Feature Update](/admin/feature/update/)**
|
||||
|
||||
The feature update endpoint updates a feature and returns the updated feature resource.
|
||||
@@ -0,0 +1,84 @@
|
||||
---
|
||||
title: Feature Index
|
||||
---
|
||||
|
||||
# Feature Index Endpoint
|
||||
|
||||
The feature index endpoint returns a listing of feature resources.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /feature/
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
| :----------: | :------: | :-------------------------------------------------------------- |
|
||||
| fields | No | Sparse fieldsets for resource types |
|
||||
| filter | No | Filters for feature resources |
|
||||
| page[number] | No | The page of feature resources to display |
|
||||
| page[size] | No | The number of feature resources to display for the current page |
|
||||
| sort | No | The list of fields to sort the feature resources |
|
||||
|
||||
## Allowed Sort Fields
|
||||
|
||||
| Name | Description |
|
||||
| :--------: | :------------------------------------------------------------------ |
|
||||
| id | Sort resources on the primary key |
|
||||
| name | Sort resources on the title of the resource |
|
||||
| value | Sort resources on the value of the resource |
|
||||
| created_at | Sort resources on the resource creation date |
|
||||
| updated_at | Sort resources on the resource last modified date |
|
||||
| random | Sort resources randomly. Ignored if other sort fields are provided. |
|
||||
|
||||
## Filters
|
||||
|
||||
| Name | Description |
|
||||
| :--------: | :-------------------------------------------------- |
|
||||
| id | Filter resources on the primary key |
|
||||
| name | Filter resources on the title of the resource |
|
||||
| value | Filter resources on the value of the resource |
|
||||
| created_at | Filter resources on the resource creation date |
|
||||
| updated_at | Filter resources on the resource last modified date |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
features: [
|
||||
{
|
||||
id: id,
|
||||
name: "name",
|
||||
value: "value",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at"
|
||||
},
|
||||
...
|
||||
],
|
||||
links: {
|
||||
first: "first",
|
||||
last: "last",
|
||||
prev: "prev",
|
||||
next: "next"
|
||||
},
|
||||
meta: {
|
||||
current_page: current_page,
|
||||
from: from,
|
||||
path: "path",
|
||||
per_page: per_page,
|
||||
to: to
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl https://api.animethemes.moe/feature/
|
||||
```
|
||||
@@ -1,15 +1,15 @@
|
||||
---
|
||||
title: Wiki Show
|
||||
title: Feature Show
|
||||
---
|
||||
|
||||
# Wiki Show Endpoint
|
||||
# Feature Show Endpoint
|
||||
|
||||
The wiki show endpoint returns the wiki resource.
|
||||
The feature show endpoint returns a feature resource.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /config/wiki
|
||||
GET /feature/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
@@ -26,8 +26,12 @@ None
|
||||
|
||||
```json
|
||||
{
|
||||
wiki: {
|
||||
featured_theme: "featured_theme",
|
||||
feature: {
|
||||
id: id,
|
||||
name: "name",
|
||||
value: "value",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at"
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -35,5 +39,5 @@ None
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl https://api.animethemes.moe/config/wiki
|
||||
curl https://api.animethemes.moe/feature/1
|
||||
```
|
||||
@@ -0,0 +1,47 @@
|
||||
---
|
||||
title: Feature Update
|
||||
---
|
||||
|
||||
# Feature Update Endpoint
|
||||
|
||||
The feature update endpoint updates a feature and returns the updated feature resource.
|
||||
|
||||
For example, the `/feature/1?value=false` endpoint will update the feature path attribute and return the updated feature resource.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
PUT|PATCH /feature/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: update feature
|
||||
|
||||
**Roles with Permission**: Admin
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Rules |
|
||||
| :-----: | :------: | :---------------- |
|
||||
| value | No | string, max:192 |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
feature: {
|
||||
id: id,
|
||||
name: "name",
|
||||
value: "value",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X PATCH -H "Authorization: Bearer {token}" https://api.animethemes.moe/feature/1
|
||||
```
|
||||
@@ -0,0 +1,47 @@
|
||||
---
|
||||
title: Current Featured Theme Show
|
||||
---
|
||||
|
||||
# Current Featured Theme Show Endpoint
|
||||
|
||||
The current featured theme show endpoint returns the first featured theme where the current date is between start_at and end_at dates.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /current/featuredtheme/
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
| :-----: | :------: | :------------------------------------------------------ |
|
||||
| fields | No | Sparse fieldsets for resource types |
|
||||
| filter | No | Filters to constrain the inclusion of related resources |
|
||||
| include | No | Inclusion of related resources |
|
||||
| sort | No | Sort related resources |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
featuredtheme: {
|
||||
id: id,
|
||||
start_at: "start_at",
|
||||
end_at: "end_at",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
deleted_at: "deleted_at"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl https://api.animethemes.moe/current/featuredtheme/
|
||||
```
|
||||
@@ -0,0 +1,48 @@
|
||||
---
|
||||
title: Featured Theme Destroy
|
||||
---
|
||||
|
||||
# Featured Theme Destroy Endpoint
|
||||
|
||||
The featured theme destroy endpoint soft deletes a featured theme and returns the deleted featured theme resource.
|
||||
|
||||
For example, the `/featuredtheme/1` endpoint will soft delete the featured theme of id '1' and return the deleted featured theme resource.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
DELETE /featuredtheme/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: delete featured theme
|
||||
|
||||
**Roles with Permission**: Admin
|
||||
|
||||
**Other Requirements**: Featured Theme must not be soft deleted
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
featuredtheme: {
|
||||
id: id,
|
||||
start_at: "start_at",
|
||||
end_at: "end_at",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
deleted_at: "deleted_at"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X DELETE -H "Authorization: Bearer {token}" https://api.animethemes.moe/featuredtheme/1
|
||||
```
|
||||
@@ -0,0 +1,39 @@
|
||||
---
|
||||
title: Featured Theme Force Delete
|
||||
---
|
||||
|
||||
# Featured Theme Force Delete Endpoint
|
||||
|
||||
The featured theme force delete endpoint hard deletes a featured theme and returns a confirmation message.
|
||||
|
||||
For example, the `/forceDelete/featuredtheme/1` endpoint will hard delete the featured theme of id '1' and return a confirmation message.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
DELETE /forceDelete/featuredtheme/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: force delete featured theme
|
||||
|
||||
**Roles with Permission**: Admin
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
message: "The Featured Theme '1' was deleted.",
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X DELETE -H "Authorization: Bearer {token}" https://api.animethemes.moe/forceDelete/featuredtheme/1
|
||||
```
|
||||
@@ -0,0 +1,65 @@
|
||||
---
|
||||
title: Featured Theme
|
||||
---
|
||||
|
||||
# Featured Theme
|
||||
|
||||
---
|
||||
|
||||
A featured theme API resource represents a video to be featured on the homepage of the site for a specified amount of time.
|
||||
|
||||
## Fields
|
||||
|
||||
| Name | Type | Nullable | Default | Description |
|
||||
| :--------: | :-----: | :------: | :-----: | :--------------------------------------------|
|
||||
| id | Integer | No | Yes | The primary key of the resource |
|
||||
| start_at | Date | No | Yes | The start date of the resource |
|
||||
| end_at | Date | No | Yes | The end date of the resource |
|
||||
| created_at | Date | No | No | The date that the resource was created |
|
||||
| updated_at | Date | No | No | The date that the resource was last modified |
|
||||
| deleted_at | Date | Yes | No | The date that the resource was deleted |
|
||||
|
||||
## Allowed Include Paths
|
||||
|
||||
* animethemeentry
|
||||
* animethemeentry.animetheme
|
||||
* animethemeentry.animetheme.anime
|
||||
* animethemeentry.animetheme.anime.images
|
||||
* animethemeentry.animetheme.song
|
||||
* animethemeentry.animetheme.song.artists
|
||||
* user
|
||||
* video
|
||||
|
||||
## Endpoints
|
||||
|
||||
**[Current Featured Theme Show](/admin/featuredtheme/current/)**
|
||||
|
||||
The current featured theme show endpoint returns the first featured theme where the current date is between start_at and end_at dates.
|
||||
|
||||
**[Featured Theme Destroy](/admin/featuredtheme/destroy/)**
|
||||
|
||||
The featured theme destroy endpoint soft deletes a featured theme and returns the deleted featured theme resource.
|
||||
|
||||
**[Featured Theme Force Delete](/admin/featuredtheme/forceDelete/)**
|
||||
|
||||
The featured theme force delete endpoint hard deletes a featured theme and returns a confirmation message.
|
||||
|
||||
**[Featured Theme Index](/admin/featuredtheme/index/)**
|
||||
|
||||
The featured theme index endpoint displays a listing of featured theme resources.
|
||||
|
||||
**[Featured Theme Restore](/admin/featuredtheme/restore/)**
|
||||
|
||||
The featured theme restore endpoint restores a soft deleted featured theme and returns the restored featured theme resource.
|
||||
|
||||
**[Featured Theme Show](/admin/featuredtheme/show/)**
|
||||
|
||||
The featured theme show endpoint returns a featured theme resource.
|
||||
|
||||
**[Featured Theme Store](/admin/featuredtheme/store/)**
|
||||
|
||||
The featured theme store endpoint creates a new featured theme and returns the new featured theme resource.
|
||||
|
||||
**[Featured Theme Update](/admin/featuredtheme/update/)**
|
||||
|
||||
The featured theme update endpoint updates a featured theme and returns the updated featured theme resource.
|
||||
@@ -1,15 +1,15 @@
|
||||
---
|
||||
title: Audio Index
|
||||
title: Featured Theme Index
|
||||
---
|
||||
|
||||
# Audio Index Endpoint
|
||||
# Featured Theme Index Endpoint
|
||||
|
||||
The audio index endpoint returns a listing of audio resources.
|
||||
The featured theme index endpoint returns a listing of featured theme resources whose start date is on or before the current date.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /audio/
|
||||
GET /featuredtheme/
|
||||
```
|
||||
|
||||
## Authentication
|
||||
@@ -18,25 +18,21 @@ None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
| :----------: | :------: | :---------------------------------------------------------------------------- |
|
||||
| fields | No | Sparse fieldsets for resource types |
|
||||
| filter | No | Filters for anime resources & constraining the inclusion of related resources |
|
||||
| include | No | Inclusion of related resources |
|
||||
| page[number] | No | The page of anime resources to display |
|
||||
| page[size] | No | The number of anime resources to display for the current page |
|
||||
| sort | No | The list of fields to sort the resources |
|
||||
| Name | Required | Description |
|
||||
| :----------: | :------: | :--------------------------------------------------------------------- |
|
||||
| fields | No | Sparse fieldsets for resource types |
|
||||
| filter | No | Filters for featured theme resources |
|
||||
| page[number] | No | The page of featured theme resources to display |
|
||||
| page[size] | No | The number of featured theme resources to display for the current page |
|
||||
| sort | No | The list of fields to sort the featured theme resources |
|
||||
|
||||
## Allowed Sort Fields
|
||||
|
||||
| Name | Description |
|
||||
| :--------: | :------------------------------------------------------------------ |
|
||||
| id | Sort resources on the primary key |
|
||||
| basename | Sort resources on the basename of the file in storage |
|
||||
| filename | Sort resources on the filename of the file in storage |
|
||||
| path | Sort resources on the path of the file in storage |
|
||||
| size | Sort resources on the size of hte file in storage in Bytes |
|
||||
| mimetype | Sort resources on the media type of the file in storage |
|
||||
| start_at | Sort resources on the resource start date |
|
||||
| end_at | Sort resources on the resource end date |
|
||||
| created_at | Sort resources on the resource creation date |
|
||||
| updated_at | Sort resources on the resource last modified date |
|
||||
| deleted_at | Sort resources on the resource deletion date |
|
||||
@@ -47,11 +43,8 @@ None
|
||||
| Name | Description |
|
||||
| :--------: | :----------------------------------------------------------------- |
|
||||
| id | Filter resources on the primary key |
|
||||
| basename | Filter resources on the basename of the file in storage |
|
||||
| filename | Filter resources on the filename of the file in storage |
|
||||
| path | Filter resources on the path of the file in storage |
|
||||
| size | Filter resources on the size of hte file in storage in Bytes |
|
||||
| mimetype | Filter resources on the media type of the file in storage |
|
||||
| start_at | Filter resources on the resource start date |
|
||||
| end_at | Filter resources on the resource end date |
|
||||
| created_at | Filter resources on the resource creation date |
|
||||
| updated_at | Filter resources on the resource last modified date |
|
||||
| deleted_at | Filter resources on the resource deletion date |
|
||||
@@ -61,18 +54,14 @@ None
|
||||
|
||||
```json
|
||||
{
|
||||
audios: [
|
||||
featuredthemes: [
|
||||
{
|
||||
id: id,
|
||||
basename: "basename",
|
||||
filename: "filename",
|
||||
path: "path",
|
||||
size: size,
|
||||
mimetype: "mimetype",
|
||||
start_at: "start_at",
|
||||
end_at: "end_at",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
deleted_at: "deleted_at",
|
||||
link: "link"
|
||||
deleted_at: "deleted_at"
|
||||
},
|
||||
...
|
||||
],
|
||||
@@ -95,5 +84,5 @@ None
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl https://api.animethemes.moe/audio/
|
||||
curl https://api.animethemes.moe/featuredtheme/
|
||||
```
|
||||
@@ -0,0 +1,48 @@
|
||||
---
|
||||
title: Featured Theme Restore
|
||||
---
|
||||
|
||||
# Featured Theme Restore Endpoint
|
||||
|
||||
The featured theme restore endpoint restores a soft deleted featured theme and returns the restored featured theme resource.
|
||||
|
||||
For example, the `/restore/featuredtheme/1` endpoint will restore the soft deleted featured theme of id '1' and return the restored featured theme resource.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
PATCH /restore/featuredtheme/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: restore featured theme
|
||||
|
||||
**Roles with Permission**: Admin
|
||||
|
||||
**Other Requirements**: Featured Theme must be soft deleted
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
featuredtheme: {
|
||||
id: id,
|
||||
start_at: "start_at",
|
||||
end_at: "end_at",
|
||||
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/featuredtheme/1
|
||||
```
|
||||
@@ -0,0 +1,47 @@
|
||||
---
|
||||
title: Featured Theme Show
|
||||
---
|
||||
|
||||
# Featured Theme Show Endpoint
|
||||
|
||||
The featured theme show endpoint returns a featured theme resource.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /featuredtheme/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Other Requirements**: The start_at date must be on or before the current date
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
| :-----: | :------: | :------------------------------------------------------ |
|
||||
| fields | No | Sparse fieldsets for resource types |
|
||||
| filter | No | Filters to constrain the inclusion of related resources |
|
||||
| include | No | Inclusion of related resources |
|
||||
| sort | No | Sort related resources |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
featuredtheme: {
|
||||
id: id,
|
||||
start_at: "start_at",
|
||||
end_at: "end_at",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
deleted_at: "deleted_at"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl https://api.animethemes.moe/featuredtheme/1
|
||||
```
|
||||
@@ -0,0 +1,52 @@
|
||||
---
|
||||
title: Featured Theme Store
|
||||
---
|
||||
|
||||
# Featured Theme Store Endpoint
|
||||
|
||||
The featured theme store endpoint creates a new featured theme and returns the new featured theme resource.
|
||||
|
||||
For example, the `/featuredtheme?start_at=2023-01-01&end_at=2023-01-07` endpoint will create a new featured theme and return the new featured theme resource.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
POST /featuredtheme
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: create featured theme
|
||||
|
||||
**Roles with Permission**: Admin
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Rules |
|
||||
| :------: | :------: | :--------------------------------------------------------------------------------- |
|
||||
| start_at | Yes | date_format:Y-m-d\TH:i:s.u, before:end_at |
|
||||
| end_at | Yes | date_format:Y-m-d\TH:i:s.u, after:start_at |
|
||||
| entry_id | No | integer, Entry ID Exists, Anime Theme Entry Video Exists when video_id is provided |
|
||||
| user_id | No | integer, User ID Exists |
|
||||
| video_id | No | integer, Video ID Exists, Anime Theme Entry Video Exists when entry_id is provided |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
featuredtheme: {
|
||||
id: id,
|
||||
start_at: "start_at",
|
||||
end_at: "end_at",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
deleted_at: "deleted_at"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X POST -H "Authorization: Bearer {token}" https://api.animethemes.moe/featuredtheme/
|
||||
```
|
||||
@@ -0,0 +1,54 @@
|
||||
---
|
||||
title: Featured Theme Update
|
||||
---
|
||||
|
||||
# Featured Theme Update Endpoint
|
||||
|
||||
The featured theme update endpoint updates a featured theme and returns the updated featured theme resource.
|
||||
|
||||
For example, the `/featuredtheme/1?start_at=2023-01-01` endpoint will update the featured theme start_at attribute and return the updated featured theme resource.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
PUT|PATCH /featuredtheme/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: update featured theme
|
||||
|
||||
**Roles with Permission**: Admin
|
||||
|
||||
**Other Requirements**: Featured Theme must not be soft deleted
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Rules |
|
||||
| :------: | :------: | :--------------------------------------------------------------------------------- |
|
||||
| start_at | No | date_format:Y-m-d\TH:i:s.u, before:end_at |
|
||||
| end_at | No | date_format:Y-m-d\TH:i:s.u, after:start_at |
|
||||
| entry_id | No | integer, Entry ID Exists, Anime Theme Entry Video Exists when video_id is provided |
|
||||
| user_id | No | integer, User ID Exists |
|
||||
| video_id | No | integer, Video ID Exists, Anime Theme Entry Video Exists when entry_id is provided |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
featuredtheme: {
|
||||
id: id,
|
||||
start_at: "start_at",
|
||||
end_at: "end_at",
|
||||
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/featuredtheme/1
|
||||
```
|
||||
@@ -0,0 +1,27 @@
|
||||
---
|
||||
title: Admin
|
||||
---
|
||||
|
||||
# Admin
|
||||
|
||||
---
|
||||
|
||||
Admin API resources pertain to the administration of the site by the moderation team.
|
||||
|
||||
## Resources
|
||||
|
||||
**[Announcement](/admin/announcement/)**
|
||||
|
||||
An announcement API resource represents a site-wide message to be broadcasted on the homepage.
|
||||
|
||||
**[Dump](/admin/dump/)**
|
||||
|
||||
A dump API resource represents a database dump of selected tables at a given point in time.
|
||||
|
||||
**[Feature](/admin/feature/)**
|
||||
|
||||
A feature API resource represents a feature flag that enable/disable site functionalities.
|
||||
|
||||
**[Featured Theme](/admin/featuredtheme/)**
|
||||
|
||||
A featured theme API resource represents a video to be featured on the homepage of the site for a specified amount of time.
|
||||
@@ -1,74 +0,0 @@
|
||||
---
|
||||
title: Anime
|
||||
---
|
||||
|
||||
# Anime
|
||||
|
||||
---
|
||||
|
||||
An anime API resource represents a production with at least one opening or ending sequence.
|
||||
|
||||
For example, Bakemonogatari is an anime production with five opening sequences and one ending sequence.
|
||||
|
||||
### Fields
|
||||
|
||||
| Name | Type | Nullable | Description |
|
||||
| :--------: | :-----: | :------: | :-------------------------------------------------------------- |
|
||||
| id | Integer | No | The primary key of the resource |
|
||||
| name | String | No | The primary title of the anime |
|
||||
| slug | String | No | The URL slug & route key of the resource |
|
||||
| year | Integer | Yes | The premiere year of the anime |
|
||||
| season | Enum | Yes | The premiere season of the anime [Winter, Spring, Summer, Fall] |
|
||||
| synopsis | String | Yes | The brief summary of the anime |
|
||||
| created_at | Date | No | The date that the resource was created |
|
||||
| updated_at | Date | No | The date that the resource was last modified |
|
||||
| deleted_at | Date | Yes | The date that the resource was deleted |
|
||||
|
||||
### Allowed Include Paths
|
||||
|
||||
* animesynonyms
|
||||
* animethemes
|
||||
* animethemes.animethemeentries
|
||||
* animethemes.animethemeentries.videos
|
||||
* animethemes.animethemeentries.videos.audio
|
||||
* animethemes.animethemeentries.videos.videoscript
|
||||
* animethemes.song
|
||||
* animethemes.song.artists
|
||||
* images
|
||||
* resources
|
||||
* series
|
||||
* studios
|
||||
|
||||
### Endpoints
|
||||
|
||||
**[Anime Destroy](/anime/destroy/)**
|
||||
|
||||
The anime destroy endpoint soft deletes an anime and returns the deleted anime resource.
|
||||
|
||||
**[Anime Force Delete](/anime/forceDelete/)**
|
||||
|
||||
The anime force delete endpoint hard deletes an anime and returns a confirmation message.
|
||||
|
||||
**[Anime Index](/anime/index/)**
|
||||
|
||||
The anime index endpoint displays a listing of anime resources.
|
||||
|
||||
**[Anime Show](/anime/show/)**
|
||||
|
||||
The anime show endpoint returns an anime resource.
|
||||
|
||||
**[Anime Store](/anime/store/)**
|
||||
|
||||
The anime store endpoint creates a new anime and returns the new anime resource.
|
||||
|
||||
**[Anime Update](/anime/update/)**
|
||||
|
||||
The anime update endpoint updates an anime and returns the updated anime resource.
|
||||
|
||||
**[Year Show](/animeyear/show/)**
|
||||
|
||||
The year show endpoint return a listing of anime resources for a given year grouped by season and ordered by name.
|
||||
|
||||
**[Year Index](/animeyear/index/)**
|
||||
|
||||
The year index endpoint returns a list of unique years from all anime resources.
|
||||
@@ -1,55 +0,0 @@
|
||||
---
|
||||
title: Anime Store
|
||||
---
|
||||
|
||||
# Anime Store Endpoint
|
||||
|
||||
The anime store endpoint creates a new anime and returns the new anime resource.
|
||||
|
||||
For example, the `/anime?name=Bakemonogatari&slug=bakemonogatari&year=2009&season=summer` endpoint will create a new Bakemonogatari anime and return the new Bakemonogatari resource.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
POST /anime
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: create anime
|
||||
|
||||
**Roles with Permission**: Wiki Editor, Admin
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Rules |
|
||||
| :------: | :------: | :----------------------------------------------------- |
|
||||
| name | Yes | string, max:192 |
|
||||
| season | Yes | EnumValue [Winter, Spring, Summer, Fall] |
|
||||
| slug | Yes | string, max:192, alpha_dash, unique |
|
||||
| synopsis | No | string, max:65535 |
|
||||
| year | Yes | integer, digits:4, min:1960, max:[current year + 1] |
|
||||
|
||||
## 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 POST -H "Authorization: Bearer {token}" https://api.animethemes.moe/anime/
|
||||
```
|
||||
@@ -1,39 +0,0 @@
|
||||
---
|
||||
title: Anime Image
|
||||
---
|
||||
|
||||
# Anime Image
|
||||
|
||||
---
|
||||
|
||||
An anime image API resource represents the association between an anime and an image.
|
||||
|
||||
### Fields
|
||||
|
||||
| Name | Type | Nullable | Description |
|
||||
| :--------: | :-----: | :------: | :------------------------------------------- |
|
||||
| created_at | Date | No | The date that the resource was created |
|
||||
| updated_at | Date | No | The date that the resource was last modified |
|
||||
|
||||
### Allowed Include Paths
|
||||
|
||||
* anime
|
||||
* image
|
||||
|
||||
### Endpoints
|
||||
|
||||
**[Anime Image Destroy](/animeimage/destroy/)**
|
||||
|
||||
The anime image destroy endpoint deletes an anime image and returns the deleted anime image resource.
|
||||
|
||||
**[Anime Image Index](/animeimage/index/)**
|
||||
|
||||
The anime image index endpoint displays a listing of anime image resources.
|
||||
|
||||
**[Anime Image Show](/animeimage/show/)**
|
||||
|
||||
The anime image show endpoint returns an anime image resource.
|
||||
|
||||
**[Anime Image Store](/animeimage/store/)**
|
||||
|
||||
The anime image store endpoint creates a new anime image and returns the new anime image resource.
|
||||
@@ -1,51 +0,0 @@
|
||||
---
|
||||
title: Anime Synonym
|
||||
---
|
||||
|
||||
# Anime Synonym
|
||||
|
||||
---
|
||||
|
||||
An anime synonym API resource represents an alternate title or common abbreviation for an anime.
|
||||
|
||||
For example, the anime Bakemonogatari has the anime synonym "Monstory".
|
||||
|
||||
### Fields
|
||||
|
||||
| Name | Type | Nullable | Description |
|
||||
| :--------: | :-----: | :------: | :------------------------------------------- |
|
||||
| id | Integer | No | The primary key of the resource |
|
||||
| text | String | Yes | The alternate title or common abbreviations |
|
||||
| created_at | Date | No | The date that the resource was created |
|
||||
| updated_at | Date | No | The date that the resource was last modified |
|
||||
| deleted_at | Date | Yes | The date that the resource was deleted |
|
||||
|
||||
### Allowed Include Paths
|
||||
|
||||
* anime
|
||||
|
||||
### Endpoints
|
||||
|
||||
**[Anime Synonym Destroy](/animesynonym/destroy/)**
|
||||
|
||||
The anime synonym destroy endpoint soft deletes an anime synonym and returns the deleted anime synonym resource.
|
||||
|
||||
**[Anime Synonym Force Delete](/animesynonym/forceDelete/)**
|
||||
|
||||
The anime synonym force delete endpoint hard deletes an anime synonym and returns a confirmation message.
|
||||
|
||||
**[Anime Synonym Index](/animesynonym/index/)**
|
||||
|
||||
The anime synonym index endpoint displays a listing of anime synonym resources.
|
||||
|
||||
**[Anime Synonym Show](/animesynonym/show/)**
|
||||
|
||||
The anime synonym show endpoint returns an anime synonym resource.
|
||||
|
||||
**[Anime Synonym Store](/animesynonym/store/)**
|
||||
|
||||
The anime synonym store endpoint creates a new anime synonym and returns the new anime synonym resource.
|
||||
|
||||
**[Anime Synonym Update](/animesynonym/update/)**
|
||||
|
||||
The anime synonym update endpoint updates an anime synonym and returns the updated anime synonym resource.
|
||||
@@ -1,59 +0,0 @@
|
||||
---
|
||||
title: Anime Theme
|
||||
---
|
||||
|
||||
# Anime Theme
|
||||
|
||||
---
|
||||
|
||||
An anime theme API resource represents an OP or ED sequence for an anime.
|
||||
|
||||
For example, the anime Bakemonogatari has five OP anime themes and one ED anime theme.
|
||||
|
||||
### Fields
|
||||
|
||||
| Name | Type | Nullable | Description |
|
||||
| :--------: | :-----: | :------: | :--------------------------------------------------------------- |
|
||||
| id | Integer | No | The primary key of the resource |
|
||||
| type | Enum | Yes | The type of the sequence [OP, ED] |
|
||||
| sequence | Integer | Yes | The numeric ordering of the theme |
|
||||
| group | String | Yes | Used to distinguish sequence belongs to dubs, rebroadcasts, etc. |
|
||||
| slug | String | No | The URL slug & route key of the resource |
|
||||
| created_at | Date | No | The date that the resource was created |
|
||||
| updated_at | Date | No | The date that the resource was last modified |
|
||||
| deleted_at | Date | Yes | The date that the resource was deleted |
|
||||
|
||||
### Allowed Include Paths
|
||||
|
||||
* anime
|
||||
* anime.images
|
||||
* animethemeentries
|
||||
* animethemeentries.videos
|
||||
* song
|
||||
* song.artists
|
||||
|
||||
### Endpoints
|
||||
|
||||
**[Anime Theme Destroy](/animetheme/destroy/)**
|
||||
|
||||
The anime theme destroy endpoint soft deletes an anime theme and returns the deleted anime theme resource.
|
||||
|
||||
**[Anime Theme Force Delete](/animetheme/forceDelete/)**
|
||||
|
||||
The anime theme force delete endpoint hard deletes an anime theme and returns a confirmation message.
|
||||
|
||||
**[Anime Theme Index](/animetheme/index/)**
|
||||
|
||||
The anime theme index endpoint displays a listing of anime theme resources.
|
||||
|
||||
**[Anime Theme Show](/animetheme/show/)**
|
||||
|
||||
The anime theme show endpoint returns an anime theme resource.
|
||||
|
||||
**[Anime Theme Store](/animetheme/store/)**
|
||||
|
||||
The anime theme store endpoint creates a new anime theme and returns the new anime theme resource.
|
||||
|
||||
**[Anime Theme Update](/animetheme/update/)**
|
||||
|
||||
The anime theme update endpoint updates an anime theme and returns the updated anime theme resource.
|
||||
@@ -1,57 +0,0 @@
|
||||
---
|
||||
title: Anime Theme Entry
|
||||
---
|
||||
|
||||
# Anime Theme Entry
|
||||
|
||||
---
|
||||
|
||||
An anime theme entry API resource represents a version of an anime theme.
|
||||
|
||||
For example, the ED theme of the Bakemonogatari anime has three anime theme entries to represent three versions.
|
||||
|
||||
### Fields
|
||||
|
||||
| Name | Type | Nullable | Description |
|
||||
| :--------: | :-----: | :------: | :-------------------------------------------------------------- |
|
||||
| id | Integer | No | The primary key of the resource |
|
||||
| version | Integer | Yes | The version number of the theme |
|
||||
| episodes | String | Yes | The episodes that the theme is used for |
|
||||
| nsfw | Boolean | No | Is not safe for work content included? |
|
||||
| spoiler | Boolean | No | Is content included that may spoil the viewer? |
|
||||
| notes | String | Yes | Any additional information for this sequence |
|
||||
| created_at | Date | No | The date that the resource was created |
|
||||
| updated_at | Date | No | The date that the resource was last modified |
|
||||
| deleted_at | Date | Yes | The date that the resource was deleted |
|
||||
|
||||
### Allowed Include Paths
|
||||
|
||||
* animetheme
|
||||
* animetheme.anime
|
||||
* videos
|
||||
|
||||
### Endpoints
|
||||
|
||||
**[Anime Theme Entry Destroy](/animethemeentry/destroy/)**
|
||||
|
||||
The anime theme entry destroy endpoint soft deletes an anime theme entry and returns the deleted anime theme entry resource.
|
||||
|
||||
**[Anime Theme Entry Force Delete](/animethemeentry/forceDelete/)**
|
||||
|
||||
The anime theme entry force delete endpoint hard deletes an anime theme entry and returns a confirmation message.
|
||||
|
||||
**[Anime Theme Entry Index](/animethemeentry/index/)**
|
||||
|
||||
The anime theme entry index endpoint displays a listing of anime theme entry resources.
|
||||
|
||||
**[Anime Theme Entry Show](/animethemeentry/show/)**
|
||||
|
||||
The anime theme entry show endpoint returns an anime theme entry resource.
|
||||
|
||||
**[Anime Theme Entry Store](/animethemeentry/store/)**
|
||||
|
||||
The anime theme entry store endpoint creates a new anime theme entry and returns the new anime theme entry resource.
|
||||
|
||||
**[Anime Theme Entry Update](/animethemeentry/update/)**
|
||||
|
||||
The anime theme entry update endpoint updates an anime theme entry and returns the updated anime theme entry resource.
|
||||
@@ -1,51 +0,0 @@
|
||||
---
|
||||
title: Announcement
|
||||
---
|
||||
|
||||
# Announcement
|
||||
|
||||
---
|
||||
|
||||
An announcement API resource represents a site-wide message to be broadcasted on the homepage.
|
||||
|
||||
For example, if video streaming is disabled, the site staff may issue a "Video streaming has been disabled!" announcement.
|
||||
|
||||
### Fields
|
||||
|
||||
| Name | Type | Nullable | Description |
|
||||
| :--------: | :-----: | :------: | :--------------------------------------------|
|
||||
| id | Integer | No | The primary key of the resource |
|
||||
| content | String | No | The announcement text |
|
||||
| created_at | Date | No | The date that the resource was created |
|
||||
| updated_at | Date | No | The date that the resource was last modified |
|
||||
| deleted_at | Date | Yes | The date that the resource was deleted |
|
||||
|
||||
### Allowed Include Paths
|
||||
|
||||
None
|
||||
|
||||
### Endpoints
|
||||
|
||||
**[Announcement Destroy](/announcement/destroy/)**
|
||||
|
||||
The announcement destroy endpoint soft deletes an announcement and returns the deleted announcement resource.
|
||||
|
||||
**[Announcement Force Delete](/announcement/forceDelete/)**
|
||||
|
||||
The announcement force delete endpoint hard deletes an announcement and returns a confirmation message.
|
||||
|
||||
**[Announcement Index](/announcement/index/)**
|
||||
|
||||
The announcement index endpoint displays a listing of announcement resources.
|
||||
|
||||
**[Announcement Show](/announcement/show/)**
|
||||
|
||||
The announcement show endpoint returns an announcement resource.
|
||||
|
||||
**[Announcement Store](/announcement/store/)**
|
||||
|
||||
The announcement store endpoint creates a new announcement and returns the new announcement resource.
|
||||
|
||||
**[Announcement Update](/announcement/update/)**
|
||||
|
||||
The announcement update endpoint updates an announcement and returns the updated announcement resource.
|
||||
@@ -1,59 +0,0 @@
|
||||
---
|
||||
title: Artist
|
||||
---
|
||||
|
||||
# Artist
|
||||
|
||||
---
|
||||
|
||||
An artist API resource represents a musical performer of anime sequences.
|
||||
|
||||
For example, Chiwa Saito is the musical performer of the Bakemonogatari OP1 theme, among many others.
|
||||
|
||||
### Fields
|
||||
|
||||
| Name | Type | Nullable | Description |
|
||||
| :--------: | :-----: | :------: | :-------------------------------------------------------------- |
|
||||
| id | Integer | No | The primary key of the resource |
|
||||
| name | String | No | The primary title of the artist |
|
||||
| slug | String | No | The URL slug & route key of the resource |
|
||||
| as | String | No | Used to distinguish a performance by alias, character or group |
|
||||
| created_at | Date | No | The date that the resource was created |
|
||||
| updated_at | Date | No | The date that the resource was last modified |
|
||||
| deleted_at | Date | Yes | The date that the resource was deleted |
|
||||
|
||||
### Allowed Include Paths
|
||||
|
||||
* groups
|
||||
* images
|
||||
* members
|
||||
* resources
|
||||
* songs
|
||||
* songs.animethemes
|
||||
* songs.animethemes.anime
|
||||
|
||||
### Endpoints
|
||||
|
||||
**[Artist Destroy](/artist/destroy/)**
|
||||
|
||||
The artist destroy endpoint soft deletes an artist and returns the deleted artist resource.
|
||||
|
||||
**[Artist Force Delete](/artist/forceDelete/)**
|
||||
|
||||
The artist force delete endpoint hard deletes an artist and returns a confirmation message.
|
||||
|
||||
**[Artist Index](/artist/index/)**
|
||||
|
||||
The artist index endpoint displays a listing of artist resources.
|
||||
|
||||
**[Artist Show](/artist/show/)**
|
||||
|
||||
The artist show endpoint returns an artist resource.
|
||||
|
||||
**[Artist Store](/artist/store/)**
|
||||
|
||||
The artist store endpoint creates a new artist and returns the new artist resource.
|
||||
|
||||
**[Artist Update](/artist/update/)**
|
||||
|
||||
The artist update endpoint updates an artist and returns the updated artist resource.
|
||||
@@ -1,56 +0,0 @@
|
||||
---
|
||||
title: Audio
|
||||
---
|
||||
|
||||
# Audio
|
||||
|
||||
---
|
||||
|
||||
An audio API resource represents the audio track of a video.
|
||||
|
||||
For example, the audio Bakemonogatari-OP1.ogg represents the audio track of the Bakemonogatari-OP1.webm video.
|
||||
|
||||
### Fields
|
||||
|
||||
| Name | Type | Nullable | Description |
|
||||
| :--------: | :-----: | :------: | :------------------------------------------- |
|
||||
| id | Integer | No | The primary key of the resource |
|
||||
| basename | String | No | The basename of the file in storage |
|
||||
| filename | String | No | The filename of the file in storage |
|
||||
| path | String | No | The path of the file in storage |
|
||||
| size | Integer | No | The size of the file in storage in Bytes |
|
||||
| mimetype | String | No | The media type of the file in storage |
|
||||
| created_at | Date | No | The date that the resource was created |
|
||||
| updated_at | Date | No | The date that the resource was last modified |
|
||||
| deleted_at | Date | Yes | The date that the resource was deleted |
|
||||
| link | String | No | The URL to stream the file from storage |
|
||||
|
||||
### Allowed Include Paths
|
||||
|
||||
* videos
|
||||
|
||||
### Endpoints
|
||||
|
||||
**[Audio Destroy](/audio/destroy/)**
|
||||
|
||||
The audio destroy endpoint soft deletes an audio and returns the deleted audio resource.
|
||||
|
||||
**[Audio Force Delete](/audio/forceDelete/)**
|
||||
|
||||
The audio force delete endpoint hard deletes an audio and returns a confirmation message.
|
||||
|
||||
**[Audio Index](/audio/index/)**
|
||||
|
||||
The audio index endpoint displays a listing of audio resources.
|
||||
|
||||
**[Audio Show](/audio/show/)**
|
||||
|
||||
The audio show endpoint returns an audio resource.
|
||||
|
||||
**[Audio Store](/audio/store/)**
|
||||
|
||||
The audio store endpoint creates a new audio and returns the new audio resource.
|
||||
|
||||
**[Audio Update](/audio/update/)**
|
||||
|
||||
The audio update endpoint updates an audio and returns the updated audio resource.
|
||||
@@ -0,0 +1,27 @@
|
||||
---
|
||||
title: Auth
|
||||
---
|
||||
|
||||
# Auth
|
||||
|
||||
---
|
||||
|
||||
Auth API resources pertain to the authorization of actions on the site.
|
||||
|
||||
## Resources
|
||||
|
||||
**[Me](/auth/user/me/)**
|
||||
|
||||
The "Me" namespace is a collection of endpoints that pertain to the currently authenticated user.
|
||||
|
||||
**[Permission](/auth/permission/)**
|
||||
|
||||
A permission API resource represents an assignable label for users and roles that authorizes a particular action in AnimeThemes.
|
||||
|
||||
**[Role](/auth/role/)**
|
||||
|
||||
A role API resource represents an assignable label for users that provides a configured group of permissions.
|
||||
|
||||
**[User](/auth/user/)**
|
||||
|
||||
A user API resource represents an AnimeThemes account.
|
||||
@@ -0,0 +1,19 @@
|
||||
---
|
||||
title: Permission
|
||||
---
|
||||
|
||||
# Permission
|
||||
|
||||
---
|
||||
|
||||
A permission API resource represents an assignable label for users and roles that authorizes a particular action in AnimeThemes.
|
||||
|
||||
## Fields
|
||||
|
||||
| Name | Type | Nullable | Default | Description |
|
||||
| :--------: | :-----: | :------: | :-----: | :------------------------------------------- |
|
||||
| id | Integer | No | Yes | The primary key of the resource |
|
||||
| name | String | No | Yes | The label of the resource |
|
||||
| guard_name | String | No | Yes | The authentication guard of the resource |
|
||||
| created_at | Date | No | No | The date that the resource was created |
|
||||
| updated_at | Date | No | No | The date that the resource was last modified |
|
||||
@@ -0,0 +1,22 @@
|
||||
---
|
||||
title: Role
|
||||
---
|
||||
|
||||
# Role
|
||||
|
||||
---
|
||||
|
||||
A role API resource represents an assignable label for users that provides a configured group of permissions.
|
||||
|
||||
## Fields
|
||||
|
||||
| Name | Type | Nullable | Default | Description |
|
||||
| :--------: | :-----: | :------: | :-----: | :------------------------------------------------------------------------------------- |
|
||||
| id | Integer | No | Yes | The primary key of the resource |
|
||||
| name | String | No | Yes | The label of the resource |
|
||||
| guard_name | String | No | Yes | The authentication guard of the resource |
|
||||
| default | Boolean | No | Yes | Is the role assigned on account verification? |
|
||||
| color | String | Yes | Yes | The hex representation of the color used to distinguish the resource |
|
||||
| priority | Integer | Yes | Yes | The weight assigned to the resource, where higher values correspond to higher priority |
|
||||
| created_at | Date | No | No | The date that the resource was created |
|
||||
| updated_at | Date | No | No | The date that the resource was last modified |
|
||||
@@ -0,0 +1,19 @@
|
||||
---
|
||||
title: User
|
||||
---
|
||||
|
||||
# User
|
||||
|
||||
---
|
||||
|
||||
A user API resource represents an AnimeThemes account.
|
||||
|
||||
## Fields
|
||||
|
||||
| Name | Type | Nullable | Default | Description |
|
||||
| :--------: | :-----: | :------: | :-----: | :--------------------------- |
|
||||
| name | String | No | Yes | The username of the resource |
|
||||
|
||||
## Allowed Include Paths
|
||||
|
||||
* playlists
|
||||
@@ -0,0 +1,38 @@
|
||||
---
|
||||
title: Me
|
||||
---
|
||||
|
||||
# Me
|
||||
|
||||
---
|
||||
|
||||
The "Me" namespace is a collection of endpoints that pertain to the currently authenticated user.
|
||||
|
||||
## Fields
|
||||
|
||||
| Name | Type | Nullable | Default | Description |
|
||||
| :---------------------: | :-----: | :------: | :-----: | :-------------------------------------------------- |
|
||||
| id | Integer | No | Yes | The primary key of the resource |
|
||||
| name | String | No | Yes | The username of the resource |
|
||||
| email | String | No | Yes | The email address of the resource |
|
||||
| email_verified_at | Date | Yes | Yes | The date that the user verified their email address |
|
||||
| two_factor_confirmed_at | Date | Yes | Yes | The date that the user confirmed 2FA |
|
||||
| created_at | Date | No | No | The date that the resource was created |
|
||||
| updated_at | Date | No | No | The date that the resource was last modified |
|
||||
| deleted_at | Date | Yes | No | The date that the resource was deleted |
|
||||
|
||||
## Allowed Include Paths
|
||||
|
||||
* permissions
|
||||
* playlists
|
||||
* roles
|
||||
|
||||
## Endpoints
|
||||
|
||||
**[My Show](/auth/user/me/show/)**
|
||||
|
||||
The my show endpoint returns the user resource for the currently authenticated user.
|
||||
|
||||
**[My Playlists](/auth/user/me/playlist/)**
|
||||
|
||||
The my playlists endpoint returns a listing of playlist resources owned by the currently authenticated user.
|
||||
@@ -0,0 +1,90 @@
|
||||
---
|
||||
title: My Playlists
|
||||
---
|
||||
|
||||
# My Playlists Endpoint
|
||||
|
||||
The my playlists endpoint returns a listing of playlist resources owned by the currently authenticated user.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /me/playlist/
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: view playlist
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
| :----------: | :------: | :------------------------------------------------------------------------------- |
|
||||
| fields | No | Sparse fieldsets for resource types |
|
||||
| filter | No | Filters for playlist resources & constraining the inclusion of related resources |
|
||||
| include | No | Inclusion of related resources |
|
||||
| page[number] | No | The page of playlist resources to display |
|
||||
| page[size] | No | The number of playlist resources to display for the current page |
|
||||
| sort | No | The list of fields to sort the resources |
|
||||
|
||||
## Allowed Sort Fields
|
||||
|
||||
| Name | Description |
|
||||
| :--------: | :------------------------------------------------------------------ |
|
||||
| id | Sort resources on the primary key |
|
||||
| name | Sort resources on the title of the playlist |
|
||||
| visibility | Sort resources on the visibility state of the playlist |
|
||||
| created_at | Sort resources on the resource creation date |
|
||||
| updated_at | Sort resources on the resource last modified date |
|
||||
| deleted_at | Sort resources on the resource deletion date |
|
||||
| random | Sort resources randomly. Ignored if other sort fields are provided. |
|
||||
|
||||
## Filters
|
||||
|
||||
| Name | Description |
|
||||
| :--------: | :----------------------------------------------------------------------------------- |
|
||||
| id | Filter resources on the primary key |
|
||||
| name | Filter resources on the title of the playlist |
|
||||
| visibility | Filter resources on the visibility state of the playlist [Public, Private, Unlisted] |
|
||||
| created_at | Filter resources on the resource creation date |
|
||||
| updated_at | Filter resources on the resource last modified date |
|
||||
| deleted_at | Filter resources on the resource deletion date |
|
||||
| trashed | Filter resources on trashed (deleted) status [With, Without, Only] |
|
||||
| has | Filter resources on relations within allowed include paths |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
playlists: [
|
||||
{
|
||||
id: id,
|
||||
name: "name",
|
||||
visibility: "visibility",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
deleted_at: "deleted_at"
|
||||
},
|
||||
...
|
||||
],
|
||||
links: {
|
||||
first: "first",
|
||||
last: "last",
|
||||
prev: "prev",
|
||||
next: "next"
|
||||
},
|
||||
meta: {
|
||||
current_page: current_page,
|
||||
from: from,
|
||||
path: "path",
|
||||
per_page: per_page,
|
||||
to: to
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -H "Authorization: Bearer {token}" https://api.animethemes.moe/me/playlist/
|
||||
```
|
||||
@@ -0,0 +1,49 @@
|
||||
---
|
||||
title: My Show
|
||||
---
|
||||
|
||||
# My Show Endpoint
|
||||
|
||||
The my show endpoint returns the user resource for the currently authenticated user.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /me/
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
| :-----: | :------: | :------------------------------------------------------ |
|
||||
| fields | No | Sparse fieldsets for resource types |
|
||||
| filter | No | Filters to constrain the inclusion of related resources |
|
||||
| include | No | Inclusion of related resources |
|
||||
| sort | No | Sort related resources |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
user: {
|
||||
id: id,
|
||||
name: "name",
|
||||
email: "email",
|
||||
email_verified_at: "email_verified_at",
|
||||
two_factor_confirmed_at: "two_factor_confirmed_at",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
deleted_at: "deleted_at"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -H "Authorization: Bearer {token}" https://api.animethemes.moe/me
|
||||
```
|
||||
@@ -1,65 +0,0 @@
|
||||
---
|
||||
title: Authentication
|
||||
---
|
||||
|
||||
# Authentication
|
||||
|
||||
---
|
||||
|
||||
The AnimeThemes API uses token-based authentication to grant the user access to protected actions.
|
||||
|
||||
## Token Authentication
|
||||
|
||||
The AnimeThemes API uses the [**Bearer authentication scheme**](https://www.rfc-editor.org/rfc/rfc6750.html) to validate requests for protected actions.
|
||||
|
||||
The `Bearer` token in the `Authorization` request header must correspond to a valid API token.
|
||||
|
||||
```sh
|
||||
curl -X POST "https://api.animethemes.moe/{protected action}"
|
||||
-H "Accept: application/json"
|
||||
-H "Authorization: Bearer {token}"
|
||||
```
|
||||
|
||||
## Status Codes
|
||||
|
||||
The AnimeThemes API uses framework-default response status codes for authenticated requests.
|
||||
|
||||
| Code | Description | Examples |
|
||||
| :--: | :--------------------------------------------------- | :----------------: |
|
||||
| 200 | OK - request succeeded | DELETE, PATCH, PUT |
|
||||
| 201 | Created - new resource was created | POST |
|
||||
| 401 | Unauthorized - invalid or no authentication provided | All |
|
||||
|
||||
## Managing Tokens
|
||||
|
||||
API tokens are managed from the API Tokens Screen within the AnimeThemes application.
|
||||
|
||||
### Creating Tokens
|
||||
|
||||
Log in to AnimeThemes. The Dashboard Screen will be displayed with a Navigation Bar.
|
||||
|
||||
Click the User Menu in the top-right corner of the Navigation Bar. The API Tokens Option will be displayed.
|
||||
|
||||
Select the API Tokens Option. The API Tokens Screen will be displayed.
|
||||
|
||||
On the API Tokens Screen, the Create API Token Form will be displayed.
|
||||
|
||||
On the Create API Token Form, specify a Token Name.
|
||||
|
||||
On the Create API Token Form, click the Create Button. The API Token Modal will be displayed.
|
||||
|
||||
On the API Token Modal, copy and store the token.
|
||||
|
||||
On the API Token Modal, click the Close Button. The Modal will be dismissed and the token will be displayed in the Manage API Tokens Form.
|
||||
|
||||
### Deleting Tokens
|
||||
|
||||
On the Manage API Tokens Form, click the Delete Link. The Delete API Token Modal will be displayed.
|
||||
|
||||
On the Delete API Token Modal, click the Delete Button. The Delete API Token Modal will be dismissed and the API token will be removed from the Manage API Tokens Form.
|
||||
|
||||
## Expiration
|
||||
|
||||
API Tokens are configured to expire after **one year**.
|
||||
|
||||
Expired API Tokens are automatically pruned from AnimeThemes once a day.
|
||||
@@ -1,49 +0,0 @@
|
||||
---
|
||||
title: Balance Destroy
|
||||
---
|
||||
|
||||
# Balance Destroy Endpoint
|
||||
|
||||
The balance destroy endpoint soft deletes a balance and returns the deleted balance resource.
|
||||
|
||||
For example, the `/balance/1` endpoint will soft delete the balance of id '1' and return the deleted balance resource.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
DELETE /balance/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: delete 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 DELETE -H "Authorization: Bearer {token}" https://api.animethemes.moe/balance/1
|
||||
```
|
||||
@@ -1,39 +0,0 @@
|
||||
---
|
||||
title: Balance Force Delete
|
||||
---
|
||||
|
||||
# Balance Force Delete Endpoint
|
||||
|
||||
The balance force delete endpoint hard deletes a balance and returns a confirmation message.
|
||||
|
||||
For example, the `/forceDelete/balance/1` endpoint will hard delete the balance of id '1' and return a confirmation message.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
DELETE /forceDelete/balance/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: force delete balance
|
||||
|
||||
**Roles with Permission**: Admin
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
message: "The Balance 'AWS 2022-06-01' was deleted.",
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X DELETE -H "Authorization: Bearer {token}" https://api.animethemes.moe/forceDelete/balance/1
|
||||
```
|
||||
@@ -1,53 +0,0 @@
|
||||
---
|
||||
title: Balance
|
||||
---
|
||||
|
||||
# Balance
|
||||
|
||||
---
|
||||
|
||||
A balance API resource represents an account balance against usage or upcoming charges for the given month.
|
||||
|
||||
### Fields
|
||||
|
||||
| Name | Type | Nullable | Description |
|
||||
| :-------------------: | :-----: | :------: | :------------------------------------------------------------------------------------------------------- |
|
||||
| id | Integer | No | The primary key of the resource |
|
||||
| date | Date | No | The given month that the account balance applies to |
|
||||
| service | Enum | No | The service that is billing AnimeThemes [Other, DigitalOcean, AWS, Hover, WalkerServers] |
|
||||
| frequency | Enum | No | The frequency that AnimeThemes is billed by the service [Once, Annually, Biannually, Quarterly, Monthly] |
|
||||
| usage | Decimal | No | The amount of services consumed by AnimeThemes in the billing period |
|
||||
| month_to_date_balance | Decimal | No | The balance of the AnimeThemes account with consideration to usage |
|
||||
| created_at | Date | No | The date that the resource was created |
|
||||
| updated_at | Date | No | The date that the resource was last modified |
|
||||
| deleted_at | Date | Yes | The date that the resource was deleted |
|
||||
|
||||
### Allowed Include Paths
|
||||
|
||||
None
|
||||
|
||||
### Endpoints
|
||||
|
||||
**[Balance Destroy](/balance/destroy/)**
|
||||
|
||||
The balance destroy endpoint soft deletes a balance and returns the deleted balance resource.
|
||||
|
||||
**[Balance Force Delete](/balance/forceDelete/)**
|
||||
|
||||
The balance force delete endpoint hard deletes a balance and returns a confirmation message.
|
||||
|
||||
**[Balance Index](/balance/index/)**
|
||||
|
||||
The balance index endpoint displays a listing of balance resources.
|
||||
|
||||
**[Balance Show](/balance/show/)**
|
||||
|
||||
The balance show endpoint returns a balance resource.
|
||||
|
||||
**[Balance Store](/balance/store/)**
|
||||
|
||||
The balance store endpoint creates a new balance and returns the new balance resource.
|
||||
|
||||
**[Balance Update](/balance/update/)**
|
||||
|
||||
The balance update endpoint updates a balance and returns the updated balance resource.
|
||||
@@ -1,97 +0,0 @@
|
||||
---
|
||||
title: Balance Index
|
||||
---
|
||||
|
||||
# Balance Index Endpoint
|
||||
|
||||
The balance index endpoint returns a listing of balance resources.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /balance/
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
| :----------: | :------: | :---------------------------------------------------------------------------- |
|
||||
| fields | No | Sparse fieldsets for resource types |
|
||||
| filter | No | Filters for balance resources & constraining the inclusion of related resources |
|
||||
| page[number] | No | The page of balance resources to display |
|
||||
| page[size] | No | The number of balance resources to display for the current page |
|
||||
| sort | No | The list of fields to sort the balance resources |
|
||||
|
||||
## Allowed Sort Fields
|
||||
|
||||
| Name | Description |
|
||||
| :-------------------: | :------------------------------------------------------------------ |
|
||||
| id | Sort resources on the primary key |
|
||||
| date | Sort resources on the month that the balance applies to |
|
||||
| service | Sort resources on the service that is billing AnimeThemes |
|
||||
| frequency | Sort resources on the frequency that AnimeThemes is billed |
|
||||
| usage | Sort resources on the consumption of AnimeThemes in the period |
|
||||
| month_to_date_balance | Sort resources on the balance of the AnimeThemes account |
|
||||
| created_at | Sort resources on the resource creation date |
|
||||
| updated_at | Sort resources on the resource last modified date |
|
||||
| deleted_at | Sort resources on the resource deletion date |
|
||||
| random | Sort resources randomly. Ignored if other sort fields are provided. |
|
||||
|
||||
## Filters
|
||||
|
||||
| Name | Description |
|
||||
| :-------------------: | :----------------------------------------------------------------- |
|
||||
| id | Filter resources on the primary key |
|
||||
| date | Filter resources on the month that the balance applies to |
|
||||
| service | Filter resources on the service that is billing AnimeThemes |
|
||||
| frequency | Filter resources on the frequency that AnimeThemes is billed |
|
||||
| usage | Filter resources on the consumption of AnimeThemes in the period |
|
||||
| month_to_date_balance | Filter resources on the balance of the AnimeThemes account |
|
||||
| created_at | Filter resources on the resource creation date |
|
||||
| updated_at | Filter resources on the resource last modified date |
|
||||
| deleted_at | Filter resources on the resource deletion date |
|
||||
| trashed | Filter resources on trashed (deleted) status [With, Without, Only] |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
balances: [
|
||||
{
|
||||
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"
|
||||
},
|
||||
...
|
||||
],
|
||||
links: {
|
||||
first: "first",
|
||||
last: "last",
|
||||
prev: "prev",
|
||||
next: "next"
|
||||
},
|
||||
meta: {
|
||||
current_page: current_page,
|
||||
from: from,
|
||||
path: "path",
|
||||
per_page: per_page,
|
||||
to: to
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl https://api.animethemes.moe/balance/
|
||||
```
|
||||
@@ -1,47 +0,0 @@
|
||||
---
|
||||
title: Balance Show
|
||||
---
|
||||
|
||||
# Balance Show Endpoint
|
||||
|
||||
The balance show endpoint returns a balance resource.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /balance/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
| :-----: | :------: | :------------------------------------------------------ |
|
||||
| fields | No | Sparse fieldsets for resource types |
|
||||
|
||||
## 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 https://api.animethemes.moe/balance/1
|
||||
```
|
||||
@@ -1,55 +0,0 @@
|
||||
---
|
||||
title: Balance Store
|
||||
---
|
||||
|
||||
# Balance Store Endpoint
|
||||
|
||||
The balance store endpoint creates a new balance and returns the new balance resource.
|
||||
|
||||
For example, the `/balance?date=2022-06-01&service=AWS&frequency=Monthly&usage=10.00&month_to_date_balance=50.00` endpoint will create a new balance and return the new balance resource.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
POST /balance
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: create balance
|
||||
|
||||
**Roles with Permission**: Admin
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Rules |
|
||||
| :-------------------: | :------: | :--------------------------------------------------------- |
|
||||
| date | Yes | date_format:Y-m-d |
|
||||
| service | Yes | EnumValue [Other, DigitalOcean, AWS, Hover, WalkerServers] |
|
||||
| frequency | Yes | EnumValue [Once, Annually, Biannually, Quarterly, Monthly] |
|
||||
| usage | Yes | regex:/^\-?\d+(\.\d{1,2})?$/ |
|
||||
| month_to_date_balance | Yes | regex:/^\-?\d+(\.\d{1,2})?$/ |
|
||||
|
||||
## 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 POST -H "Authorization: Bearer {token}" https://api.animethemes.moe/balance/
|
||||
```
|
||||
@@ -1,55 +0,0 @@
|
||||
---
|
||||
title: Balance Update
|
||||
---
|
||||
|
||||
# Balance Update Endpoint
|
||||
|
||||
The balance update endpoint updates a balance and returns the updated balance resource.
|
||||
|
||||
For example, the `/balance/1?usage=10.00` endpoint will update the balance usage attribute and return the updated balance resource.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
PUT|PATCH /balance/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: update balance
|
||||
|
||||
**Roles with Permission**: Admin
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Rules |
|
||||
| :-------------------: | :------: | :--------------------------------------------------------- |
|
||||
| date | No | date_format:Y-m-d |
|
||||
| service | No | EnumValue [Other, DigitalOcean, AWS, Hover, WalkerServers] |
|
||||
| frequency | No | EnumValue [Once, Annually, Biannually, Quarterly, Monthly] |
|
||||
| usage | No | regex:/^\-?\d+(\.\d{1,2})?$/ |
|
||||
| month_to_date_balance | No | regex:/^\-?\d+(\.\d{1,2})?$/ |
|
||||
|
||||
## 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/balance/1
|
||||
```
|
||||
@@ -1,30 +0,0 @@
|
||||
---
|
||||
title: Flags
|
||||
---
|
||||
|
||||
# Flags
|
||||
|
||||
---
|
||||
|
||||
The config flags API resource contains the list of feature flags that enable/disable site functionalities.
|
||||
|
||||
### Fields
|
||||
|
||||
| Name | Type | Nullable | Description |
|
||||
| :-------------------------: | :-----: | :------: | :---------------------------------------------------------- |
|
||||
| allow_video_streams | Boolean | No | Enable/Disable video streaming |
|
||||
| allow_audio_streams | Boolean | No | Enable/Disable audio streaming |
|
||||
| allow_discord_notifications | Boolean | No | Enable/Disable discord notifications for the configured bot |
|
||||
| allow_view_recording | Boolean | No | Enable/Disable the recording of views for view counts |
|
||||
| allow_dump_downloading | Boolean | No | Enable/Disable database dump downloading |
|
||||
| allow_script_downloading | Boolean | No | Enable/Disable encoding script downloading |
|
||||
|
||||
### Allowed Include Paths
|
||||
|
||||
None
|
||||
|
||||
### Endpoints
|
||||
|
||||
**[Flags Show](/config/flags/show/)**
|
||||
|
||||
The Flags Show endpoint return the flags resource.
|
||||
@@ -1,44 +0,0 @@
|
||||
---
|
||||
title: Flags Show
|
||||
---
|
||||
|
||||
# Flags Show Endpoint
|
||||
|
||||
The flags show endpoint returns the flags resource.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /config/flags
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
| :-----: | :------: | :------------------------------------------------------ |
|
||||
| fields | No | Sparse fieldsets for resource types |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
flags: {
|
||||
allow_video_streams: allow_video_streams,
|
||||
allow_audio_streams: allow_audio_streams,
|
||||
allow_discord_notifications: allow_discord_notifications,
|
||||
allow_view_recording: allow_view_recording,
|
||||
allow_dump_downloading: allow_dump_downloading,
|
||||
allow_script_downloading: allow_script_downloading
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl https://api.animethemes.moe/config/flags
|
||||
```
|
||||
@@ -1,25 +0,0 @@
|
||||
---
|
||||
title: Wiki
|
||||
---
|
||||
|
||||
# Wiki
|
||||
|
||||
---
|
||||
|
||||
The config wiki API resource contains the list of settings that impact animethemes-web functionalities.
|
||||
|
||||
### Fields
|
||||
|
||||
| Name | Type | Nullable | Description |
|
||||
| :------------: | :----: | :------: | :-------------------------------------------------------------------- |
|
||||
| featured_theme | String | Yes | The theme played in the background on the homepage of the wiki client |
|
||||
|
||||
### Allowed Include Paths
|
||||
|
||||
None
|
||||
|
||||
### Endpoints
|
||||
|
||||
**[Wiki Show](/config/wiki/show/)**
|
||||
|
||||
The Wiki Show endpoint return the wiki resource.
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: Document
|
||||
---
|
||||
|
||||
# Document
|
||||
|
||||
---
|
||||
|
||||
Document API resources pertain to site documentation.
|
||||
|
||||
## Resources
|
||||
|
||||
**[Page](/document/page/)**
|
||||
|
||||
A page API resource represents a static markdown page used for guides and other documentation.
|
||||
@@ -20,6 +20,8 @@ DELETE /page/{slug}
|
||||
|
||||
**Roles with Permission**: Wiki Editor, Admin
|
||||
|
||||
**Other Requirements**: Page must not be soft deleted
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
@@ -0,0 +1,57 @@
|
||||
---
|
||||
title: Page
|
||||
---
|
||||
|
||||
# Page
|
||||
|
||||
---
|
||||
|
||||
A page API resource represents a static markdown page used for guides and other documentation.
|
||||
|
||||
For example, the 'encoding/audio_normalization' page represents the documentation for audio normalization.
|
||||
|
||||
## Fields
|
||||
|
||||
| Name | Type | Nullable | Default | Description |
|
||||
| :--------: | :-----: | :------: | :-----: | :--------------------------------------------|
|
||||
| id | Integer | No | Yes | The primary key of the resource |
|
||||
| name | String | No | Yes | The primary title of the page |
|
||||
| slug | String | No | Yes | The URL slug & route key of the resource |
|
||||
| body | String | No | No | The body content of the resource |
|
||||
| created_at | Date | No | No | The date that the resource was created |
|
||||
| updated_at | Date | No | No | The date that the resource was last modified |
|
||||
| deleted_at | Date | Yes | No | The date that the resource was deleted |
|
||||
|
||||
## Allowed Include Paths
|
||||
|
||||
None
|
||||
|
||||
## Endpoints
|
||||
|
||||
**[Page Destroy](/document/page/destroy/)**
|
||||
|
||||
The page destroy endpoint soft deletes a page and returns the deleted page resource.
|
||||
|
||||
**[Page Force Delete](/document/page/forceDelete/)**
|
||||
|
||||
The page force delete endpoint hard deletes a page and returns a confirmation message.
|
||||
|
||||
**[Page Index](/document/page/index/)**
|
||||
|
||||
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.
|
||||
|
||||
**[Page Store](/document/page/store/)**
|
||||
|
||||
The page store endpoint creates a new page and returns the new page resource.
|
||||
|
||||
**[Page Update](/document/page/update/)**
|
||||
|
||||
The page update endpoint updates a page and returns the updated page resource.
|
||||
@@ -0,0 +1,49 @@
|
||||
---
|
||||
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
|
||||
|
||||
**Other Requirements**: Page must be soft deleted
|
||||
|
||||
## 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
|
||||
```
|
||||
@@ -20,6 +20,8 @@ PUT|PATCH /page/{slug}
|
||||
|
||||
**Roles with Permission**: Wiki Editor, Admin
|
||||
|
||||
**Other Requirements**: Page must not be soft deleted
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Rules |
|
||||
@@ -1,52 +0,0 @@
|
||||
---
|
||||
title: Dump
|
||||
---
|
||||
|
||||
# Dump
|
||||
|
||||
---
|
||||
|
||||
A dump API resource represents a database dump of selected tables at a given point in time.
|
||||
|
||||
For example, the animethemes-db-dump-wiki-1663559663946.sql dump represents the database dump of wiki tables performed at 2022-09-19.
|
||||
|
||||
### Fields
|
||||
|
||||
| Name | Type | Nullable | Description |
|
||||
| :--------: | :-----: | :------: | :--------------------------------------------|
|
||||
| id | Integer | No | The primary key of the resource |
|
||||
| path | String | No | The path of the file in storage |
|
||||
| created_at | Date | No | The date that the resource was created |
|
||||
| updated_at | Date | No | The date that the resource was last modified |
|
||||
| deleted_at | Date | Yes | The date that the resource was deleted |
|
||||
| link | String | No | The URL to download the file from storage |
|
||||
|
||||
### Allowed Include Paths
|
||||
|
||||
None
|
||||
|
||||
### Endpoints
|
||||
|
||||
**[Dump Destroy](/dump/destroy/)**
|
||||
|
||||
The dump destroy endpoint soft deletes a dump and returns the deleted dump resource.
|
||||
|
||||
**[Dump Force Delete](/dump/forceDelete/)**
|
||||
|
||||
The dump force delete endpoint hard deletes a dump and returns a confirmation message.
|
||||
|
||||
**[Dump Index](/dump/index/)**
|
||||
|
||||
The dump index endpoint displays a listing of dump resources.
|
||||
|
||||
**[Dump Show](/dump/show/)**
|
||||
|
||||
The dump show endpoint returns a dump resource.
|
||||
|
||||
**[Dump Store](/dump/store/)**
|
||||
|
||||
The dump store endpoint creates a new dump and returns the new dump resource.
|
||||
|
||||
**[Dump Update](/dump/update/)**
|
||||
|
||||
The dump update endpoint updates a dump and returns the updated dump resource.
|
||||
@@ -1,57 +0,0 @@
|
||||
---
|
||||
title: Image
|
||||
---
|
||||
|
||||
# Image
|
||||
|
||||
---
|
||||
|
||||
An image API resource represents a visual component for another resource such as an anime or artist.
|
||||
|
||||
For example, the Bakemonogatari anime has two images to represent small and large cover images.
|
||||
|
||||
### Fields
|
||||
|
||||
| Name | Type | Nullable | Description |
|
||||
| :--------: | :-----: | :------: | :-------------------------------------------------------------------------------- |
|
||||
| id | Integer | No | The primary key of the resource |
|
||||
| path | String | No | The path of the file in storage |
|
||||
| size | Integer | No | The size of the file in storage in Bytes |
|
||||
| mimetype | String | No | The media type of the file in storage |
|
||||
| facet | Enum | Yes | The component that the resource is intended for [Small Cover, Large Cover, Grill] |
|
||||
| link | String | No | The URL to stream the file from storage |
|
||||
| created_at | Date | No | The date that the resource was created |
|
||||
| updated_at | Date | No | The date that the resource was last modified |
|
||||
| deleted_at | Date | Yes | The date that the resource was deleted |
|
||||
|
||||
### Allowed Include Paths
|
||||
|
||||
* anime
|
||||
* artists
|
||||
* studios
|
||||
|
||||
### Endpoints
|
||||
|
||||
**[Image Destroy](/image/destroy/)**
|
||||
|
||||
The image destroy endpoint soft deletes an image and returns the deleted image resource.
|
||||
|
||||
**[Image Force Delete](/image/forceDelete/)**
|
||||
|
||||
The image force delete endpoint hard deletes an image and returns a confirmation message.
|
||||
|
||||
**[Image Index](/image/index/)**
|
||||
|
||||
The image index endpoint displays a listing of image resources.
|
||||
|
||||
**[Image Show](/image/show/)**
|
||||
|
||||
The image show endpoint returns an image resource.
|
||||
|
||||
**[Image Store](/image/store/)**
|
||||
|
||||
The image store endpoint creates a new image and returns the new image resource.
|
||||
|
||||
**[Image Update](/image/update/)**
|
||||
|
||||
The image update endpoint updates an image and returns the updated image resource.
|
||||
+35
-41
@@ -1,43 +1,37 @@
|
||||
---
|
||||
title: Introduction
|
||||
---
|
||||
layout: home
|
||||
|
||||
# Introduction
|
||||
|
||||
---
|
||||
|
||||
AnimeThemes is a simple and consistent repository of anime opening and ending themes. We provide direct links to high quality WebMs of your favorite OPs and EDs for your listening and discussion needs.
|
||||
|
||||
The AnimeThemes API provides access to our repository resources for your development needs.
|
||||
|
||||
## [JSON:API](/jsonapi/)
|
||||
|
||||
The AnimeThemes API selectively implements the [**JSON:API Specification**](https://jsonapi.org/format/).
|
||||
|
||||
We provide an overview of where the AnimeThemes API adheres to or deviates from the specification.
|
||||
|
||||
## [Rate Limiting](/ratelimiting/)
|
||||
|
||||
The AnimeThemes API applies the standard named rate limiter of the Laravel Framework.
|
||||
|
||||
We provide an overview of managing request quotas.
|
||||
|
||||
## [Authentication](/authentication/)
|
||||
|
||||
The AnimeThemes API uses token-based authentication to grant the user access to protected actions.
|
||||
|
||||
## [Validation](/validation/)
|
||||
|
||||
The AnimeThemes API uses form requests to validate query parameters.
|
||||
|
||||
## Terms of Use
|
||||
|
||||
The AnimeThemes API applies the [**AnimeThemes Terms of Service**](https://app.animethemes.moe/terms-of-service).
|
||||
|
||||
## Resources
|
||||
|
||||
For API support, please make use of the **#api** channel in the [**Discord Server**](https://discordapp.com/invite/m9zbVyQ).
|
||||
|
||||
To report an issue with or request a new feature for the API, please make use of the [**animethemes-server**](https://github.com/AnimeThemes/animethemes-server) Github.
|
||||
|
||||
To report an issue with or request a new feature for this documentation, please make use of the [**animethemes-api-docs**](https://github.com/AnimeThemes/animethemes-api-docs) Github.
|
||||
hero:
|
||||
name: AnimeThemes
|
||||
text: API Documentation
|
||||
tagline: Access our repository of Anime opening and ending themes for your development needs
|
||||
image:
|
||||
light: /logo.svg
|
||||
dark: /logo-dark.svg
|
||||
alt: Logo
|
||||
actions:
|
||||
- theme: brand
|
||||
text: Get Started
|
||||
link: /intro/
|
||||
features:
|
||||
- icon: 📻
|
||||
title: Media Links
|
||||
details: Embed or download audio and video using links provided by resources
|
||||
link: /wiki/video/show/#response
|
||||
linkText: Example
|
||||
- icon: 🕸️
|
||||
title: External Mappings
|
||||
details: Find resources based on their mappings to sites like MyAnimeList or AniList
|
||||
link: /intro/jsonapi/#has-filter
|
||||
linkText: Example
|
||||
- icon: 🔍
|
||||
title: Advanced Querying
|
||||
details: Support for randomization, searching and filtering by direct fields and relation fields out of the box
|
||||
link: /intro/jsonapi/#filtering
|
||||
linkText: Example
|
||||
- icon: ✍️
|
||||
title: Resource Management
|
||||
details: Apply edits to our database (for users with requisite permissions)
|
||||
link: /wiki/anime/store/
|
||||
linkText: Example
|
||||
---
|
||||
@@ -0,0 +1,33 @@
|
||||
---
|
||||
title: Authentication
|
||||
---
|
||||
|
||||
# Authentication
|
||||
|
||||
---
|
||||
|
||||
The AnimeThemes API uses token-based authentication to grant the user access to protected actions.
|
||||
|
||||
## Token Authentication
|
||||
|
||||
The AnimeThemes API uses the [**Bearer authentication scheme**](https://www.rfc-editor.org/rfc/rfc6750.html) to validate requests for protected actions.
|
||||
|
||||
The `Bearer` token in the `Authorization` request header must correspond to a valid API token.
|
||||
|
||||
```sh
|
||||
curl -X POST "https://api.animethemes.moe/{protected action}"
|
||||
-H "Accept: application/json"
|
||||
-H "Authorization: Bearer {token}"
|
||||
```
|
||||
|
||||
## Status Codes
|
||||
|
||||
The AnimeThemes API uses framework-default response status codes for authenticated requests.
|
||||
|
||||
| Code | Description | Examples |
|
||||
| :--: | :--------------------------------------------------- | :----------------: |
|
||||
| 200 | OK - request succeeded | DELETE, PATCH, PUT |
|
||||
| 201 | Created - new resource was created | POST |
|
||||
| 401 | Unauthorized - invalid or no authentication provided | All |
|
||||
| 403 | Forbidden - request is not authorized for user | All |
|
||||
| 404 | Not Found - no resource was found | All |
|
||||
@@ -0,0 +1,43 @@
|
||||
---
|
||||
title: Introduction
|
||||
---
|
||||
|
||||
# Introduction
|
||||
|
||||
---
|
||||
|
||||
AnimeThemes is a simple and consistent repository of anime opening and ending themes. We provide direct links to high quality WebMs of your favorite OPs and EDs for your listening and discussion needs.
|
||||
|
||||
The AnimeThemes API provides access to our repository resources for your development needs.
|
||||
|
||||
## [JSON:API](/intro/jsonapi/)
|
||||
|
||||
The AnimeThemes API selectively implements the [**JSON:API Specification**](https://jsonapi.org/format/).
|
||||
|
||||
We provide an overview of where the AnimeThemes API adheres to or deviates from the specification.
|
||||
|
||||
## [Rate Limiting](/intro/ratelimiting/)
|
||||
|
||||
The AnimeThemes API applies the standard named rate limiter of the Laravel Framework.
|
||||
|
||||
We provide an overview of managing request quotas.
|
||||
|
||||
## [Authentication](/intro/authentication/)
|
||||
|
||||
The AnimeThemes API uses token-based authentication to grant the user access to protected actions.
|
||||
|
||||
## [Validation](/intro/validation/)
|
||||
|
||||
The AnimeThemes API uses form requests to validate query parameters.
|
||||
|
||||
## Terms of Use
|
||||
|
||||
The AnimeThemes API applies the [**AnimeThemes Terms of Service**](https://app.animethemes.moe/terms-of-service).
|
||||
|
||||
## Resources
|
||||
|
||||
For API support, please make use of the **#api** channel in the [**Discord Server**](https://discordapp.com/invite/m9zbVyQ).
|
||||
|
||||
To report an issue with or request a new feature for the API, please make use of the [**animethemes-server**](https://github.com/AnimeThemes/animethemes-server) Github.
|
||||
|
||||
To report an issue with or request a new feature for this documentation, please make use of the [**animethemes-api-docs**](https://github.com/AnimeThemes/animethemes-api-docs) Github.
|
||||
@@ -58,6 +58,7 @@ The AnimeThemes API Resource Object attributes are included as top-level members
|
||||
slug: "slug",
|
||||
year: year,
|
||||
season: "season",
|
||||
media_format: "media_format",
|
||||
synopsis: "synopsis",
|
||||
...
|
||||
}
|
||||
@@ -105,6 +106,7 @@ The AnimeThemes API Resource Object collections shall contain `links` and `meta`
|
||||
slug: "slug",
|
||||
year: year,
|
||||
season: "season",
|
||||
media_format: "media_format",
|
||||
synopsis: "synopsis",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
@@ -212,6 +214,7 @@ If inclusion of related resources is not specified, the AnimeThemes API shall **
|
||||
slug: "slug",
|
||||
year: year,
|
||||
season: "season",
|
||||
media_format: "media_format",
|
||||
synopsis: "synopsis",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
@@ -245,6 +248,7 @@ If the client does not specify the set of fields for a given resource type, the
|
||||
slug: "slug",
|
||||
year: year,
|
||||
season: "season",
|
||||
media_format: "media_format",
|
||||
synopsis: "synopsis",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
@@ -267,6 +271,7 @@ The AnimeThemes API supports sorting for every endpoint that returns a collectio
|
||||
slug: "slug",
|
||||
year: 1963,
|
||||
season: "season",
|
||||
media_format: "media_format",
|
||||
synopsis: "synopsis",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
@@ -304,6 +309,7 @@ The AnimeThemes API supports an offset pagination strategy for every endpoint th
|
||||
slug: "slug",
|
||||
year: year,
|
||||
season: "season",
|
||||
media_format: "media_format",
|
||||
synopsis: "synopsis",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
@@ -355,7 +361,7 @@ The AnimeThemes API supports filtering for every endpoint unless otherwise speci
|
||||
/anime?filter[year]=2000
|
||||
```
|
||||
|
||||
**Strategy**
|
||||
#### Strategy
|
||||
|
||||
The AnimeThemes API supports the [**recommended**](https://jsonapi.org/recommendations/#filtering) base strategy for filtering with the following extended syntax:
|
||||
|
||||
@@ -363,7 +369,7 @@ The AnimeThemes API supports the [**recommended**](https://jsonapi.org/recommend
|
||||
filter[scope][field-{comparison operator}-{logical operator}]=value(s)
|
||||
```
|
||||
|
||||
**Scope**
|
||||
#### Scope
|
||||
|
||||
The AnimeThemes API supports scoping filters by resource type.
|
||||
|
||||
@@ -379,60 +385,60 @@ If a scope is not provided, the filter shall match all types.
|
||||
/anime?filter[created_at]=2021-01-01
|
||||
```
|
||||
|
||||
**Comparison Operator**
|
||||
#### Comparison Operator
|
||||
|
||||
The AnimeThemes API supports the following comparison operators for filter conditions:
|
||||
|
||||
EQ
|
||||
##### EQ
|
||||
|
||||
```powershell
|
||||
# This will match anime of year 2000
|
||||
/anime?filter[year-eq]=2000
|
||||
```
|
||||
|
||||
NE
|
||||
##### NE
|
||||
|
||||
```powershell
|
||||
# This will match anime not of year 2000
|
||||
/anime?filter[year-ne]=2000
|
||||
```
|
||||
|
||||
LT
|
||||
##### LT
|
||||
|
||||
```powershell
|
||||
# This will match anime where the year is less than 2000
|
||||
/anime?filter[year-lt]=2000
|
||||
```
|
||||
|
||||
GT
|
||||
##### GT
|
||||
|
||||
```powershell
|
||||
# This will match anime where the year is greater than 2000
|
||||
/anime?filter[year-gt]=2000
|
||||
```
|
||||
|
||||
LTE
|
||||
##### LTE
|
||||
|
||||
```powershell
|
||||
# This will match anime where the year is less than or equal to 2000
|
||||
/anime?filter[year-lte]=2000
|
||||
```
|
||||
|
||||
GTE
|
||||
##### GTE
|
||||
|
||||
```powershell
|
||||
# This will match anime where the year is greater than 2000
|
||||
/anime?filter[year-gte]=2000
|
||||
```
|
||||
|
||||
LIKE
|
||||
##### LIKE
|
||||
|
||||
```powershell
|
||||
# This will match anime where the name matches the pattern '%monogatari%'
|
||||
/anime?filter[name-like]=%monogatari%
|
||||
```
|
||||
|
||||
NOT LIKE
|
||||
##### NOT LIKE
|
||||
|
||||
```powershell
|
||||
# This will match anime where the name does not match the pattern '%monogatari%'
|
||||
@@ -446,18 +452,18 @@ If a comparison operator is not provided, the filter shall use the EQ operator.
|
||||
/anime?filter[year]=2000
|
||||
```
|
||||
|
||||
**Logical Operators**
|
||||
#### Logical Operators
|
||||
|
||||
The AnimeThemes API supports the following logical operators:
|
||||
|
||||
AND
|
||||
##### AND
|
||||
|
||||
```powershell
|
||||
# This will match anime where the year is greater than 2000 and less than 2010
|
||||
/anime?filter[year-gt-and]=2000&filter[year-lt-and]=2010
|
||||
```
|
||||
|
||||
OR
|
||||
##### OR
|
||||
|
||||
```powershell
|
||||
# This will match anime where the year is less than 2000 or greater than 2010
|
||||
@@ -473,7 +479,7 @@ If a logical operator is not provided, the filter shall use the AND operator.
|
||||
|
||||
The AnimeThemes API supports the following logical operator for multi-value filter conditions:
|
||||
|
||||
NOT
|
||||
##### NOT
|
||||
|
||||
```powershell
|
||||
# This will match anime where the year is not in {2000,2001,2002}
|
||||
@@ -487,9 +493,11 @@ If the multi-value logical operator is not specified, the filter shall exclude t
|
||||
/anime?filter[year]=2000,2001,2002
|
||||
```
|
||||
|
||||
**Special Filters**
|
||||
#### Special Filters
|
||||
|
||||
Trashed Filter
|
||||
These filters do not act strictly against a field or are otherwise deserving of distinguishing.
|
||||
|
||||
##### Trashed Filter
|
||||
|
||||
```powershell
|
||||
# This filter will include soft-deleted anime that are excluded by default
|
||||
@@ -507,7 +515,7 @@ Trashed Filter
|
||||
/anime?filter[trashed]=without
|
||||
```
|
||||
|
||||
Has Filter
|
||||
##### Has Filter
|
||||
|
||||
```powershell
|
||||
# This filter will return anime that have at least one related resource
|
||||
@@ -0,0 +1,23 @@
|
||||
---
|
||||
title: List
|
||||
---
|
||||
|
||||
# List
|
||||
|
||||
---
|
||||
|
||||
List API resources pertain to user playlists.
|
||||
|
||||
## Resources
|
||||
|
||||
**[Playlist](/list/playlist/)**
|
||||
|
||||
A playlist API resource represents a list of ordered tracks intended for continuous playback.
|
||||
|
||||
**[Playlist Image](/list/playlistimage/)**
|
||||
|
||||
A playlist image API resource represents the association between a playlist and an image.
|
||||
|
||||
**[Playlist Track](/list/playlist/track/)**
|
||||
|
||||
A playlist track API resource represents an entry in a playlist.
|
||||
@@ -0,0 +1,70 @@
|
||||
---
|
||||
title: Playlist Backward Index
|
||||
---
|
||||
|
||||
# Playlist Backward Index Endpoint
|
||||
|
||||
The playlist backward index endpoint returns a listing of tracks for the playlist in backward order.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /playlist/{id}/backward
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: view playlist track
|
||||
|
||||
**Other Requirements**: If the playlist is private, the user must own the playlist
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
| :----------: | :------: | :--------------------------------------------------------------- |
|
||||
| fields | No | Sparse fieldsets for resource types |
|
||||
| include | No | Inclusion of related resources |
|
||||
| page[number] | No | The page of playlist resources to display |
|
||||
| page[size] | No | The number of playlist resources to display for the current page |
|
||||
|
||||
## Allowed Include Paths
|
||||
|
||||
* video
|
||||
* video.animethemeentries.animetheme.anime.images
|
||||
* video.animethemeentries.animetheme.song.artists
|
||||
* video.audio
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
tracks: [
|
||||
{
|
||||
id: "id",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
deleted_at: "deleted_at"
|
||||
},
|
||||
...
|
||||
],
|
||||
links: {
|
||||
first: "first",
|
||||
last: "last",
|
||||
prev: "prev",
|
||||
next: "next"
|
||||
},
|
||||
meta: {
|
||||
current_page: current_page,
|
||||
from: from,
|
||||
path: "path",
|
||||
per_page: per_page,
|
||||
to: to
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl https://api.animethemes.moe/playlist/N4hG/backward
|
||||
```
|
||||
@@ -0,0 +1,49 @@
|
||||
---
|
||||
title: Playlist Destroy
|
||||
---
|
||||
|
||||
# Playlist Destroy Endpoint
|
||||
|
||||
The playlist destroy endpoint soft deletes a playlist and returns the deleted playlist resource.
|
||||
|
||||
For example, the `/playlist/N4hG` endpoint will soft delete the playlist of id N4hG and return the deleted playlist resource.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
DELETE /playlist/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: delete playlist
|
||||
|
||||
**Other Requirements**: User must own playlist & playlist must not be soft deleted
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
playlist: {
|
||||
id: "id",
|
||||
name: "name",
|
||||
visibility: "visibility",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
deleted_at: "deleted_at",
|
||||
views_count: views_count,
|
||||
tracks_exists: tracks_exists,
|
||||
tracks_count: tracks_count
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X DELETE -H "Authorization: Bearer {token}" https://api.animethemes.moe/playlist/N4hG
|
||||
```
|
||||
@@ -0,0 +1,39 @@
|
||||
---
|
||||
title: Playlist Force Delete
|
||||
---
|
||||
|
||||
# Playlist Force Delete Endpoint
|
||||
|
||||
The playlist force delete endpoint hard deletes a playlist and returns a confirmation message.
|
||||
|
||||
For example, the `/forceDelete/playlist/N4hG` endpoint will hard delete the playlist of id N4hG and return a confirmation message.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
DELETE /forceDelete/playlist/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: force delete playlist
|
||||
|
||||
**Roles with Permission**: Admin
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
message: "The Playlist 'Name' was deleted.",
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X DELETE -H "Authorization: Bearer {token}" https://api.animethemes.moe/forceDelete/playlist/N4hG
|
||||
```
|
||||
@@ -0,0 +1,70 @@
|
||||
---
|
||||
title: Playlist Forward Index
|
||||
---
|
||||
|
||||
# Playlist Forward Index Endpoint
|
||||
|
||||
The playlist forward index endpoint returns a listing of tracks for the playlist in forward order.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /playlist/{id}/forward
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: view playlist track
|
||||
|
||||
**Other Requirements**: If the playlist is private, the user must own the playlist
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
| :----------: | :------: | :--------------------------------------------------------------- |
|
||||
| fields | No | Sparse fieldsets for resource types |
|
||||
| include | No | Inclusion of related resources |
|
||||
| page[number] | No | The page of playlist resources to display |
|
||||
| page[size] | No | The number of playlist resources to display for the current page |
|
||||
|
||||
## Allowed Include Paths
|
||||
|
||||
* video
|
||||
* video.animethemeentries.animetheme.anime.images
|
||||
* video.animethemeentries.animetheme.song.artists
|
||||
* video.audio
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
tracks: [
|
||||
{
|
||||
id: "id",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
deleted_at: "deleted_at"
|
||||
},
|
||||
...
|
||||
],
|
||||
links: {
|
||||
first: "first",
|
||||
last: "last",
|
||||
prev: "prev",
|
||||
next: "next"
|
||||
},
|
||||
meta: {
|
||||
current_page: current_page,
|
||||
from: from,
|
||||
path: "path",
|
||||
per_page: per_page,
|
||||
to: to
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl https://api.animethemes.moe/playlist/N4hG/forward
|
||||
```
|
||||
@@ -0,0 +1,71 @@
|
||||
---
|
||||
title: Playlist
|
||||
---
|
||||
|
||||
# Playlist
|
||||
|
||||
---
|
||||
|
||||
A playlist API resource represents a list of ordered tracks intended for continuous playback.
|
||||
|
||||
For example, a "/r/anime's Best OPs and EDs of 2022" playlist may contain a collection of tracks allowing the continuous playback of Best OP and ED nominations for the /r/anime Awards.
|
||||
|
||||
## Fields
|
||||
|
||||
| Name | Type | Nullable | Default | Description |
|
||||
| :-----------: | :-----: | :------: | :-----: | :---------------------------------------------------------------- |
|
||||
| id | String | No | Yes | The primary key of the resource |
|
||||
| name | String | No | Yes | The title of the playlist |
|
||||
| visibility | Enum | Yes | Yes | The state of who can see the playlist [Private, Unlisted, Public] |
|
||||
| created_at | Date | No | No | The date that the resource was created |
|
||||
| updated_at | Date | No | No | The date that the resource was last modified |
|
||||
| deleted_at | Date | Yes | No | The date that the resource was deleted |
|
||||
| views_count | Integer | No | No | The number of views recorded for the resource |
|
||||
| tracks_exists | Boolean | No | No | The existence of tracks belonging to the resource |
|
||||
| tracks_count | Integer | No | No | The number of tracks belonging to the resource |
|
||||
|
||||
## Allowed Include Paths
|
||||
|
||||
* first
|
||||
* images
|
||||
* last
|
||||
* tracks
|
||||
* user
|
||||
|
||||
## Endpoints
|
||||
|
||||
**[Playlist Destroy](/list/playlist/destroy/)**
|
||||
|
||||
The playlist destroy endpoint soft deletes a playlist and returns the deleted playlist resource.
|
||||
|
||||
**[Playlist Force Delete](/list/playlist/forceDelete/)**
|
||||
|
||||
The playlist force delete endpoint hard deletes a playlist and returns a confirmation message.
|
||||
|
||||
**[Playlist Index](/list/playlist/index/)**
|
||||
|
||||
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.
|
||||
|
||||
**[Playlist Store](/list/playlist/store/)**
|
||||
|
||||
The playlist store endpoint creates a new playlist and returns the new playlist resource.
|
||||
|
||||
**[Playlist Update](/list/playlist/update/)**
|
||||
|
||||
The playlist update endpoint updates a playlist and returns the updated playlist resource.
|
||||
|
||||
**[Playlist Forward Index](/list/playlist/forward/)**
|
||||
|
||||
The playlist forward index endpoint returns a listing of tracks for the playlist in forward order.
|
||||
|
||||
**[Playlist Backward Index](/list/playlist/backward/)**
|
||||
|
||||
The playlist backward index endpoint returns a listing of tracks for the playlist in backward order.
|
||||
@@ -0,0 +1,100 @@
|
||||
---
|
||||
title: Playlist Index
|
||||
---
|
||||
|
||||
# Playlist Index Endpoint
|
||||
|
||||
The playlist index endpoint returns a listing of public playlist resources.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /playlist/
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: view playlist
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
| :----------: | :------: | :------------------------------------------------------------------------------- |
|
||||
| fields | No | Sparse fieldsets for resource types |
|
||||
| filter | No | Filters for playlist resources & constraining the inclusion of related resources |
|
||||
| include | No | Inclusion of related resources |
|
||||
| page[number] | No | The page of playlist resources to display |
|
||||
| page[size] | No | The number of playlist resources to display for the current page |
|
||||
| q | No | The query to search for matching playlist resources |
|
||||
| sort | No | The list of fields to sort the resources |
|
||||
|
||||
## Allowed Sort Fields
|
||||
|
||||
| Name | Description |
|
||||
| :-----------: | :------------------------------------------------------------------ |
|
||||
| id | Sort resources on the primary key |
|
||||
| name | Sort resources on the title of the playlist |
|
||||
| visibility | Sort resources on the visibility state of the playlist |
|
||||
| views_count | Sort resources on the number of recorded views |
|
||||
| tracks_exists | Sort resources on the existence of tracks |
|
||||
| tracks_count | Sort resources on the number of tracks |
|
||||
| created_at | Sort resources on the resource creation date |
|
||||
| updated_at | Sort resources on the resource last modified date |
|
||||
| deleted_at | Sort resources on the resource deletion date |
|
||||
| random | Sort resources randomly. Ignored if other sort fields are provided. |
|
||||
|
||||
## Filters
|
||||
|
||||
| Name | Description |
|
||||
| :-----------: | :----------------------------------------------------------------------------------- |
|
||||
| id | Filter resources on the primary key |
|
||||
| name | Filter resources on the title of the playlist |
|
||||
| visibility | Filter resources on the visibility state of the playlist [Public, Private, Unlisted] |
|
||||
| views_count | Filter resources on the number of recorded views |
|
||||
| tracks_exists | Filter resources on existence of tracks |
|
||||
| tracks_count | Filter resources on the number of tracks |
|
||||
| created_at | Filter resources on the resource creation date |
|
||||
| updated_at | Filter resources on the resource last modified date |
|
||||
| deleted_at | Filter resources on the resource deletion date |
|
||||
| trashed | Filter resources on trashed (deleted) status [With, Without, Only] |
|
||||
| has | Filter resources on relations within allowed include paths |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
playlists: [
|
||||
{
|
||||
id: "id",
|
||||
name: "name",
|
||||
visibility: "visibility",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
deleted_at: "deleted_at",
|
||||
views_count: views_count,
|
||||
tracks_exists: tracks_exists,
|
||||
tracks_count: tracks_count
|
||||
},
|
||||
...
|
||||
],
|
||||
links: {
|
||||
first: "first",
|
||||
last: "last",
|
||||
prev: "prev",
|
||||
next: "next"
|
||||
},
|
||||
meta: {
|
||||
current_page: current_page,
|
||||
from: from,
|
||||
path: "path",
|
||||
per_page: per_page,
|
||||
to: to
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl https://api.animethemes.moe/playlist/
|
||||
```
|
||||
@@ -0,0 +1,49 @@
|
||||
---
|
||||
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/N4hG` endpoint will restore the soft deleted playlist of id N4hG and return the restored playlist resource.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
PATCH /restore/playlist/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: restore playlist
|
||||
|
||||
**Other Requirements**: User must own playlist & playlist must be soft deleted
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
playlist: {
|
||||
id: "id",
|
||||
name: "name",
|
||||
visibility: "visibility",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
deleted_at: "deleted_at",
|
||||
views_count: views_count,
|
||||
tracks_exists: tracks_exists,
|
||||
tracks_count: tracks_count
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X PATCH -H "Authorization: Bearer {token}" https://api.animethemes.moe/restore/playlist/N4hG
|
||||
```
|
||||
@@ -0,0 +1,52 @@
|
||||
---
|
||||
title: Playlist Show
|
||||
---
|
||||
|
||||
# Playlist Show Endpoint
|
||||
|
||||
The playlist show endpoint returns a playlist resource.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /playlist/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: view playlist
|
||||
|
||||
**Other Requirements**: If the playlist is private, the user must own the playlist
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
| :-----: | :------: | :------------------------------------------------------ |
|
||||
| fields | No | Sparse fieldsets for resource types |
|
||||
| filter | No | Filters to constrain the inclusion of related resources |
|
||||
| include | No | Inclusion of related resources |
|
||||
| sort | No | Sort related resources |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
playlist: {
|
||||
id: "id",
|
||||
name: "name",
|
||||
visibility: "visibility",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
deleted_at: "deleted_at",
|
||||
views_count: views_count,
|
||||
tracks_exists: tracks_exists,
|
||||
tracks_count: tracks_count
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl https://api.animethemes.moe/playlist/N4hG
|
||||
```
|
||||
@@ -0,0 +1,50 @@
|
||||
---
|
||||
title: Playlist Store
|
||||
---
|
||||
|
||||
# Playlist Store Endpoint
|
||||
|
||||
The playlist store endpoint creates a new playlist and returns the new playlist resource.
|
||||
|
||||
For example, the `/playlist?name=Best+OPs` endpoint will create a new playlist and return the new playlist resource.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
POST /playlist
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: create playlist
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Rules |
|
||||
| :--------: | :------: | :------------------------------------ |
|
||||
| name | Yes | string, max:192 |
|
||||
| visibility | Yes | EnumValue [Public, Private, Unlisted] |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
playlist: {
|
||||
id: "id",
|
||||
name: "name",
|
||||
visibility: "visibility",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
deleted_at: "deleted_at",
|
||||
views_count: views_count,
|
||||
tracks_exists: tracks_exists,
|
||||
tracks_count: tracks_count
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X POST -H "Authorization: Bearer {token}" https://api.animethemes.moe/playlist/
|
||||
```
|
||||
@@ -0,0 +1,70 @@
|
||||
---
|
||||
title: Track Backward Index
|
||||
---
|
||||
|
||||
# Track Backward Index Endpoint
|
||||
|
||||
The track backward index endpoint returns a listing of tracks for the playlist in backward order before the specified track.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /playlist/{playlist:id}/track/{track:id}/backward
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: view playlist track
|
||||
|
||||
**Other Requirements**: If the playlist is private, the user must own the playlist
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
| :----------: | :------: | :--------------------------------------------------------------- |
|
||||
| fields | No | Sparse fieldsets for resource types |
|
||||
| include | No | Inclusion of related resources |
|
||||
| page[number] | No | The page of playlist resources to display |
|
||||
| page[size] | No | The number of playlist resources to display for the current page |
|
||||
|
||||
## Allowed Include Paths
|
||||
|
||||
* video
|
||||
* video.animethemeentries.animetheme.anime.images
|
||||
* video.animethemeentries.animetheme.song.artists
|
||||
* video.audio
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
tracks: [
|
||||
{
|
||||
id: "id",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
deleted_at: "deleted_at"
|
||||
},
|
||||
...
|
||||
],
|
||||
links: {
|
||||
first: "first",
|
||||
last: "last",
|
||||
prev: "prev",
|
||||
next: "next"
|
||||
},
|
||||
meta: {
|
||||
current_page: current_page,
|
||||
from: from,
|
||||
path: "path",
|
||||
per_page: per_page,
|
||||
to: to
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl https://api.animethemes.moe/playlist/N4hG/track/Q3hD/backward
|
||||
```
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
title: Playlist Track Destroy
|
||||
---
|
||||
|
||||
# Playlist Track Destroy Endpoint
|
||||
|
||||
The playlist track destroy endpoint soft deletes a playlist track and returns the deleted playlist track resource.
|
||||
|
||||
For example, the `/playlist/N4hG/track/Q3hD` endpoint will soft delete the playlist track of id Q3hD and return the deleted playlist track resource.
|
||||
|
||||
The track will be dissociated from the list of tracks within the playlist.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
DELETE /playlist/{id}/track/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: delete playlist track
|
||||
|
||||
**Other Requirements**: User must own playlist & playlist track must not be soft deleted
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
track: {
|
||||
id: "id",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
deleted_at: "deleted_at"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X DELETE -H "Authorization: Bearer {token}" https://api.animethemes.moe/playlist/N4hG/track/Q3hD
|
||||
```
|
||||
@@ -0,0 +1,39 @@
|
||||
---
|
||||
title: Playlist Track Force Delete
|
||||
---
|
||||
|
||||
# Playlist Track Force Delete Endpoint
|
||||
|
||||
The playlist track force delete endpoint hard deletes a playlist track and returns a confirmation message.
|
||||
|
||||
For example, the `/forceDelete/playlist/N4hG/track/Q3hD` endpoint will hard delete the playlist track of id Q3hD and return a confirmation message.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
DELETE /forceDelete/playlist/{id}/track/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: force delete playlist
|
||||
|
||||
**Roles with Permission**: Admin
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
message: "The Playlist Track 'Q3hD' was deleted.",
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X DELETE -H "Authorization: Bearer {token}" https://api.animethemes.moe/forceDelete/playlist/N4hG/track/Q3hD
|
||||
```
|
||||
@@ -0,0 +1,70 @@
|
||||
---
|
||||
title: Track Forward Index
|
||||
---
|
||||
|
||||
# Track Forward Index Endpoint
|
||||
|
||||
The track forward index endpoint returns a listing of tracks for the playlist in forward order after the specified track.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /playlist/{playlist:id}/track/{track:id}/forward
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: view playlist track
|
||||
|
||||
**Other Requirements**: If the playlist is private, the user must own the playlist
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
| :----------: | :------: | :--------------------------------------------------------------- |
|
||||
| fields | No | Sparse fieldsets for resource types |
|
||||
| include | No | Inclusion of related resources |
|
||||
| page[number] | No | The page of playlist resources to display |
|
||||
| page[size] | No | The number of playlist resources to display for the current page |
|
||||
|
||||
## Allowed Include Paths
|
||||
|
||||
* video
|
||||
* video.animethemeentries.animetheme.anime.images
|
||||
* video.animethemeentries.animetheme.song.artists
|
||||
* video.audio
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
tracks: [
|
||||
{
|
||||
id: "id",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
deleted_at: "deleted_at"
|
||||
},
|
||||
...
|
||||
],
|
||||
links: {
|
||||
first: "first",
|
||||
last: "last",
|
||||
prev: "prev",
|
||||
next: "next"
|
||||
},
|
||||
meta: {
|
||||
current_page: current_page,
|
||||
from: from,
|
||||
path: "path",
|
||||
per_page: per_page,
|
||||
to: to
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl https://api.animethemes.moe/playlist/N4hG/track/Q3hD/forward
|
||||
```
|
||||
@@ -0,0 +1,68 @@
|
||||
---
|
||||
title: Playlist Track
|
||||
---
|
||||
|
||||
# Playlist Track
|
||||
|
||||
---
|
||||
|
||||
A playlist track API resource represents an entry in a playlist.
|
||||
|
||||
For example, a "/r/anime's Best OPs and EDs of 2022" playlist may contain a track for the ParipiKoumei-OP1.webm video.
|
||||
|
||||
## Fields
|
||||
|
||||
| Name | Type | Nullable | Default | Description |
|
||||
| :--------: | :-----: | :------: | :-----: | :------------------------------------------- |
|
||||
| id | String | No | Yes | The primary key of the resource |
|
||||
| created_at | Date | No | No | The date that the resource was created |
|
||||
| updated_at | Date | No | No | The date that the resource was last modified |
|
||||
| deleted_at | Date | Yes | No | The date that the resource was deleted |
|
||||
|
||||
## Allowed Include Paths
|
||||
|
||||
* next
|
||||
* playlist
|
||||
* previous
|
||||
* video
|
||||
* video.animethemeentries.animetheme.anime.images
|
||||
* video.animethemeentries.animetheme.song.artists
|
||||
* video.audio
|
||||
|
||||
## Endpoints
|
||||
|
||||
**[Playlist Track Destroy](/list/playlist/track/destroy/)**
|
||||
|
||||
The playlist track destroy endpoint soft deletes a playlist track and returns the deleted playlist track resource.
|
||||
|
||||
**[Playlist Track Force Delete](/list/playlist/track/forceDelete/)**
|
||||
|
||||
The playlist track force delete endpoint hard deletes a playlist track and returns a confirmation message.
|
||||
|
||||
**[Playlist Track Index](/list/playlist/track/index/)**
|
||||
|
||||
The playlist track index endpoint displays a listing of playlist track resources.
|
||||
|
||||
**[Playlist Track Restore](/list/playlist/track/restore/)**
|
||||
|
||||
The playlist track restore endpoint restores a soft deleted playlist track and returns the restored playlist track resource.
|
||||
|
||||
**[Playlist Track Show](/list/playlist/track/show/)**
|
||||
|
||||
The playlist track show endpoint returns a playlist track resource.
|
||||
|
||||
**[Playlist Track Store](/list/playlist/track/store/)**
|
||||
|
||||
The playlist track store endpoint creates a new playlist track and returns the new playlist track resource.
|
||||
|
||||
**[Playlist Track Update](/list/playlist/track/update/)**
|
||||
|
||||
The playlist track update endpoint updates a playlist track and returns the updated playlist track resource.
|
||||
|
||||
**[Track Forward Index](/list/playlist/track/forward/)**
|
||||
|
||||
The track forward index endpoint returns a listing of tracks for the playlist in forward order after the specified track.
|
||||
|
||||
**[Track Backward Index](/list/playlist/track/backward/)**
|
||||
|
||||
The track backward index endpoint returns a listing of tracks for the playlist in backward order before the specified track.
|
||||
@@ -1,43 +1,39 @@
|
||||
---
|
||||
title: Anime Index
|
||||
title: Playlist Track Index
|
||||
---
|
||||
|
||||
# Anime Index Endpoint
|
||||
# Playlist Track Index Endpoint
|
||||
|
||||
The anime index endpoint returns a listing of anime resources.
|
||||
The playlist track index endpoint returns a listing of tracks for the playlist.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /anime/
|
||||
GET /playlist/{id}/track
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
**Required Permission**: view playlist track
|
||||
|
||||
**Other Requirements**: If the playlist is private, the user must own the playlist
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
| :----------: | :------: | :---------------------------------------------------------------------------- |
|
||||
| fields | No | Sparse fieldsets for resource types |
|
||||
| filter | No | Filters for anime resources & constraining the inclusion of related resources |
|
||||
| include | No | Inclusion of related resources |
|
||||
| page[number] | No | The page of anime resources to display |
|
||||
| page[size] | No | The number of anime resources to display for the current page |
|
||||
| q | No | The query to search for matching anime resources |
|
||||
| sort | No | The list of fields to sort the resources |
|
||||
| Name | Required | Description |
|
||||
| :----------: | :------: | :------------------------------------------------------------------------------- |
|
||||
| fields | No | Sparse fieldsets for resource types |
|
||||
| filter | No | Filters for playlist resources & constraining the inclusion of related resources |
|
||||
| include | No | Inclusion of related resources |
|
||||
| page[number] | No | The page of playlist resources to display |
|
||||
| page[size] | No | The number of playlist resources to display for the current page |
|
||||
| sort | No | The list of fields to sort the resources |
|
||||
|
||||
## Allowed Sort Fields
|
||||
|
||||
| Name | Description |
|
||||
| :--------: | :------------------------------------------------------------------ |
|
||||
| id | Sort resources on the primary key |
|
||||
| name | Sort resources on the title of the anime |
|
||||
| slug | Sort resources on the URL slug of the anime |
|
||||
| year | Sort resources on the premiere year of the anime |
|
||||
| season | Sort resources on the premiere season of the anime |
|
||||
| synopsis | Sort resources on the brief summary of the anime |
|
||||
| created_at | Sort resources on the resource creation date |
|
||||
| updated_at | Sort resources on the resource last modified date |
|
||||
| deleted_at | Sort resources on the resource deletion date |
|
||||
@@ -48,11 +44,7 @@ None
|
||||
| Name | Description |
|
||||
| :--------: | :----------------------------------------------------------------- |
|
||||
| id | Filter resources on the primary key |
|
||||
| name | Filter resources on the title of the anime |
|
||||
| slug | Filter resources on the URL slug of the anime |
|
||||
| year | Filter resources on the premiere year of the anime |
|
||||
| season | Filter resources on the premiere season of the anime |
|
||||
| synopsis | Filter resources on the brief summary of the anime |
|
||||
| video_id | Filter resources on related video ID |
|
||||
| created_at | Filter resources on the resource creation date |
|
||||
| updated_at | Filter resources on the resource last modified date |
|
||||
| deleted_at | Filter resources on the resource deletion date |
|
||||
@@ -63,14 +55,9 @@ None
|
||||
|
||||
```json
|
||||
{
|
||||
anime: [
|
||||
tracks: [
|
||||
{
|
||||
id: id,
|
||||
name: "name",
|
||||
slug: "slug",
|
||||
year: year,
|
||||
season: "season",
|
||||
synopsis: "synopsis",
|
||||
id: "id",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
deleted_at: "deleted_at"
|
||||
@@ -96,5 +83,5 @@ None
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl https://api.animethemes.moe/anime/
|
||||
curl https://api.animethemes.moe/playlist/N4hG/track
|
||||
```
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
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/N4hG/track/Q3hD` endpoint will restore the soft deleted playlist track of id Q3hD and return the restored playlist track resource.
|
||||
|
||||
The restored track will be appended to the end of the list of tracks in the playlist.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
PATCH /restore/playlist/{id}/track/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: restore playlist track
|
||||
|
||||
**Other Requirements**: User must own playlist & playlist track must be soft deleted
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
track: {
|
||||
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/N4hG/track/Q3hD
|
||||
```
|
||||
@@ -0,0 +1,47 @@
|
||||
---
|
||||
title: Playlist Track Show
|
||||
---
|
||||
|
||||
# Playlist Track Show Endpoint
|
||||
|
||||
The playlist track show endpoint returns a playlist track resource.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /playlist/{id}/track/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: view playlist track
|
||||
|
||||
**Other Requirements**: If the playlist is private, the user must own the playlist
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
| :-----: | :------: | :------------------------------------------------------ |
|
||||
| fields | No | Sparse fieldsets for resource types |
|
||||
| filter | No | Filters to constrain the inclusion of related resources |
|
||||
| include | No | Inclusion of related resources |
|
||||
| sort | No | Sort related resources |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
track: {
|
||||
id: "id",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
deleted_at: "deleted_at"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl https://api.animethemes.moe/playlist/N4hG/track/Q3hD
|
||||
```
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user