mirror of
https://github.com/AnimeThemes/animethemes-api-docs.git
synced 2026-07-11 01:34:06 +02:00
docs: Moved JSON:API docs
This commit is contained in:
@@ -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.
|
||||
@@ -0,0 +1,533 @@
|
||||
---
|
||||
title: JSON:API
|
||||
---
|
||||
|
||||
# JSON:API
|
||||
|
||||
---
|
||||
|
||||
The AnimeThemes API selectively implements the [**JSON:API Specification**](https://jsonapi.org/format/).
|
||||
|
||||
Here we will provide an overview of where the AnimeThemes API adheres to or deviates from the specification.
|
||||
|
||||
## Content Negotiation
|
||||
|
||||
The AnimeThemes API does **NOT** require a `Content-Type` or `Accept` header. AnimeThemes filters API requests and sets the `Accept` header on behalf of the client.
|
||||
|
||||
```powershell
|
||||
# A simple curl request can be made without specifying headers.
|
||||
curl https://api.animethemes.moe/anime
|
||||
```
|
||||
|
||||
## Document Structure
|
||||
|
||||
### Top Level
|
||||
|
||||
The AnimeThemes API specifies a custom `data` wrap for top-level members.
|
||||
|
||||
```json
|
||||
// The anime show endpoint uses the custom data wrap 'anime'.
|
||||
{
|
||||
anime: {
|
||||
...
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Resource Objects
|
||||
|
||||
The AnimeThemes API Resource Objects do **NOT** contain top-level member `type`.
|
||||
|
||||
```json
|
||||
// Types are hinted by their custom data wrapper
|
||||
{
|
||||
anime: {
|
||||
...
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The AnimeThemes API Resource Object attributes are included as top-level members and are **NOT** contained in an `attributes` object.
|
||||
|
||||
```json
|
||||
// The show anime endpoint includes attributes as top-level members
|
||||
{
|
||||
anime: {
|
||||
id: id,
|
||||
name: "name",
|
||||
slug: "slug",
|
||||
year: year,
|
||||
season: "season",
|
||||
media_format: "media_format",
|
||||
synopsis: "synopsis",
|
||||
...
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The AnimeThemes API Resource Objects relationships are included as top-level members and are **NOT** contained in a `relationships` object.
|
||||
|
||||
```json
|
||||
// The show anime endpoint includes relationships as top-level members
|
||||
{
|
||||
anime: {
|
||||
...
|
||||
animesynonyms: [
|
||||
...
|
||||
],
|
||||
animethemes: [
|
||||
...
|
||||
],
|
||||
series: [
|
||||
...
|
||||
],
|
||||
resources: [
|
||||
...
|
||||
],
|
||||
images: [
|
||||
...
|
||||
],
|
||||
studios: [
|
||||
...
|
||||
],
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The AnimeThemes API Resource Object collections shall contain `links` and `meta` members for pagination strategies.
|
||||
|
||||
```json
|
||||
// The anime index endpoint contains links and meta members
|
||||
{
|
||||
anime: [
|
||||
{
|
||||
id: id,
|
||||
name: "name",
|
||||
slug: "slug",
|
||||
year: year,
|
||||
season: "season",
|
||||
media_format: "media_format",
|
||||
synopsis: "synopsis",
|
||||
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
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Fetching Data
|
||||
|
||||
### Fetching Resources & Relationships
|
||||
|
||||
The AnimeThemes API does **NOT** support fetching resources or relationships.
|
||||
|
||||
```json
|
||||
// The show anime endpoint relationships can be fetched directly
|
||||
{
|
||||
anime: {
|
||||
...
|
||||
animesynonyms: [
|
||||
...
|
||||
],
|
||||
animethemes: [
|
||||
...
|
||||
],
|
||||
series: [
|
||||
...
|
||||
],
|
||||
resources: [
|
||||
...
|
||||
],
|
||||
images: [
|
||||
...
|
||||
],
|
||||
studios: [
|
||||
...
|
||||
],
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Inclusion of Related Resources
|
||||
|
||||
The AnimeThemes API supports inclusion of related resources for every endpoint unless otherwise specified.
|
||||
|
||||
```json
|
||||
// /anime/{slug}?include=animethemes,series
|
||||
{
|
||||
anime: {
|
||||
...
|
||||
animethemes: [
|
||||
...
|
||||
],
|
||||
series: [
|
||||
...
|
||||
],
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
For endpoints that produce responses of mixed typed top-level members, inclusion of related resources are scoped by type `include[type]`.
|
||||
|
||||
```json
|
||||
// /search?q={query}&include[anime]=resources
|
||||
{
|
||||
search: {
|
||||
anime: [
|
||||
{
|
||||
...
|
||||
resources: [
|
||||
...
|
||||
],
|
||||
},
|
||||
...
|
||||
],
|
||||
...
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
If inclusion of related resources is not specified, the AnimeThemes API shall **NOT** include any related resources.
|
||||
|
||||
```json
|
||||
// /anime/{slug}
|
||||
// No relationships are included by default
|
||||
{
|
||||
anime: {
|
||||
id: id,
|
||||
name: "name",
|
||||
slug: "slug",
|
||||
year: year,
|
||||
season: "season",
|
||||
media_format: "media_format",
|
||||
synopsis: "synopsis",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
deleted_at: "deleted_at"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Sparse Fieldsets
|
||||
|
||||
The AnimeThemes API supports sparse fieldsets for every endpoint unless otherwise specified.
|
||||
|
||||
```json
|
||||
// /anime/{slug}?fields[anime]=name,year
|
||||
{
|
||||
anime: {
|
||||
name: "name",
|
||||
year: year
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
If the client does not specify the set of fields for a given resource type, the AnimeThemes API shall send all fields.
|
||||
|
||||
```json
|
||||
// /anime/{slug}
|
||||
{
|
||||
anime: {
|
||||
id: id,
|
||||
name: "name",
|
||||
slug: "slug",
|
||||
year: year,
|
||||
season: "season",
|
||||
media_format: "media_format",
|
||||
synopsis: "synopsis",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
deleted_at: "deleted_at"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Sorting
|
||||
|
||||
The AnimeThemes API supports sorting for every endpoint that returns a collection of resources.
|
||||
|
||||
```json
|
||||
// /anime?sort=year
|
||||
{
|
||||
anime: [
|
||||
{
|
||||
id: id,
|
||||
name: "name",
|
||||
slug: "slug",
|
||||
year: 1963,
|
||||
season: "season",
|
||||
media_format: "media_format",
|
||||
synopsis: "synopsis",
|
||||
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
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Pagination
|
||||
|
||||
The AnimeThemes API supports an offset pagination strategy for every endpoint that returns a collection of resources. For these endpoints, the AnimeThemes API supports the `page[number]` and `page[size]` query parameters.
|
||||
|
||||
```json
|
||||
// /anime?page[number]=2&page[size]=15
|
||||
{
|
||||
anime: [
|
||||
{
|
||||
id: id,
|
||||
name: "name",
|
||||
slug: "slug",
|
||||
year: year,
|
||||
season: "season",
|
||||
media_format: "media_format",
|
||||
synopsis: "synopsis",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
deleted_at: "deleted_at"
|
||||
},
|
||||
...
|
||||
],
|
||||
links: {
|
||||
first: "first",
|
||||
last: "last",
|
||||
prev: "prev",
|
||||
next: "next"
|
||||
},
|
||||
meta: {
|
||||
current_page: 2,
|
||||
from: 16,
|
||||
path: "path",
|
||||
per_page: 15,
|
||||
to: 30
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
For endpoints that produce responses of mixed typed top-level members, the AnimeThemes.moe supports a limit pagination strategy. For these endpoints, the AnimeThemes API support the `page[limit]` query parameter.
|
||||
|
||||
```json
|
||||
// /search?q={query}&page[limit]=1
|
||||
{
|
||||
search: {
|
||||
anime: [
|
||||
{
|
||||
...
|
||||
resources: [
|
||||
...
|
||||
],
|
||||
}
|
||||
],
|
||||
...
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Filtering
|
||||
|
||||
The AnimeThemes API supports filtering for every endpoint unless otherwise specified.
|
||||
|
||||
```powershell
|
||||
# The show anime endpoint allows filtering on the year attribute, for example
|
||||
/anime?filter[year]=2000
|
||||
```
|
||||
|
||||
#### Strategy
|
||||
|
||||
The AnimeThemes API supports the [**recommended**](https://jsonapi.org/recommendations/#filtering) base strategy for filtering with the following extended syntax:
|
||||
|
||||
```powershell
|
||||
filter[scope][field-{comparison operator}-{logical operator}]=value(s)
|
||||
```
|
||||
|
||||
#### Scope
|
||||
|
||||
The AnimeThemes API supports scoping filters by resource type.
|
||||
|
||||
```powershell
|
||||
# This will match the created_at filter for anime resources and will not apply the filter for other types
|
||||
/anime?filter[anime][created_at]=2021-01-01
|
||||
```
|
||||
|
||||
If a scope is not provided, the filter shall match all types.
|
||||
|
||||
```powershell
|
||||
# This will match the created_at filter for all types
|
||||
/anime?filter[created_at]=2021-01-01
|
||||
```
|
||||
|
||||
#### Comparison Operator
|
||||
|
||||
The AnimeThemes API supports the following comparison operators for filter conditions:
|
||||
|
||||
##### EQ
|
||||
|
||||
```powershell
|
||||
# This will match anime of year 2000
|
||||
/anime?filter[year-eq]=2000
|
||||
```
|
||||
|
||||
##### NE
|
||||
|
||||
```powershell
|
||||
# This will match anime not of year 2000
|
||||
/anime?filter[year-ne]=2000
|
||||
```
|
||||
|
||||
##### LT
|
||||
|
||||
```powershell
|
||||
# This will match anime where the year is less than 2000
|
||||
/anime?filter[year-lt]=2000
|
||||
```
|
||||
|
||||
##### GT
|
||||
|
||||
```powershell
|
||||
# This will match anime where the year is greater than 2000
|
||||
/anime?filter[year-gt]=2000
|
||||
```
|
||||
|
||||
##### LTE
|
||||
|
||||
```powershell
|
||||
# This will match anime where the year is less than or equal to 2000
|
||||
/anime?filter[year-lte]=2000
|
||||
```
|
||||
|
||||
##### GTE
|
||||
|
||||
```powershell
|
||||
# This will match anime where the year is greater than 2000
|
||||
/anime?filter[year-gte]=2000
|
||||
```
|
||||
|
||||
##### LIKE
|
||||
|
||||
```powershell
|
||||
# This will match anime where the name matches the pattern '%monogatari%'
|
||||
/anime?filter[name-like]=%monogatari%
|
||||
```
|
||||
|
||||
##### NOT LIKE
|
||||
|
||||
```powershell
|
||||
# This will match anime where the name does not match the pattern '%monogatari%'
|
||||
/anime?filter[name-notlike]=%monogatari%
|
||||
```
|
||||
|
||||
If a comparison operator is not provided, the filter shall use the EQ operator.
|
||||
|
||||
```powershell
|
||||
# This will match anime of year 2000
|
||||
/anime?filter[year]=2000
|
||||
```
|
||||
|
||||
#### Logical Operators
|
||||
|
||||
The AnimeThemes API supports the following logical operators:
|
||||
|
||||
##### 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
|
||||
|
||||
```powershell
|
||||
# This will match anime where the year is less than 2000 or greater than 2010
|
||||
/anime?filter[year-lt-or]=2000&filter[year-gt-or]=2010
|
||||
```
|
||||
|
||||
If a logical operator is not provided, the filter shall use the AND operator.
|
||||
|
||||
```powershell
|
||||
# This will match anime where the year is greater than 2000 and less than 2010
|
||||
/anime?filter[year-gt]=2000&filter[year-lt]=2010
|
||||
```
|
||||
|
||||
The AnimeThemes API supports the following logical operator for multi-value filter conditions:
|
||||
|
||||
##### NOT
|
||||
|
||||
```powershell
|
||||
# This will match anime where the year is not in {2000,2001,2002}
|
||||
/anime?filter[year-not]=2000,2001,2002
|
||||
```
|
||||
|
||||
If the multi-value logical operator is not specified, the filter shall exclude the multi-value logical operator.
|
||||
|
||||
```powershell
|
||||
# This will match anime where the year is in {2000,2001,2002}
|
||||
/anime?filter[year]=2000,2001,2002
|
||||
```
|
||||
|
||||
#### Special Filters
|
||||
|
||||
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
|
||||
/anime?filter[trashed]=with
|
||||
```
|
||||
|
||||
```powershell
|
||||
# This filter will return only soft-deleted anime
|
||||
/anime?filter[trashed]=only
|
||||
```
|
||||
|
||||
```powershell
|
||||
# This filter will return only anime that are not soft-deleted
|
||||
# This is the default behavior
|
||||
/anime?filter[trashed]=without
|
||||
```
|
||||
|
||||
##### Has Filter
|
||||
|
||||
```powershell
|
||||
# This filter will return anime that have at least one related resource
|
||||
/anime?filter[has]=resources
|
||||
```
|
||||
|
||||
```powershell
|
||||
# This filter will return anime that have at least one related resource or related series
|
||||
/anime?filter[has-or]=resources,series
|
||||
```
|
||||
|
||||
```powershell
|
||||
# This filter will return anime that have at least one related resource of site MyAnimeList and external_id 41457
|
||||
/anime?filter[has]=resources&filter[site]=MyAnimeList&filter[external_id]=41457
|
||||
```
|
||||
@@ -0,0 +1,45 @@
|
||||
---
|
||||
title: Rate Limiting
|
||||
---
|
||||
|
||||
# Rate Limiting
|
||||
|
||||
---
|
||||
|
||||
The AnimeThemes API applies the standard named rate limiter of the Laravel Framework.
|
||||
|
||||
Here we will provide an overview of managing request quotas.
|
||||
|
||||
## Response Headers
|
||||
|
||||
The AnimeThemes API limits requests to 90 per minute.
|
||||
|
||||
The AnimeThemes API will return `X-RateLimit-Limit` and `X-RateLimit-Remaining` headers in the response.
|
||||
|
||||
```sh
|
||||
...
|
||||
X-RateLimit-Limit: 90
|
||||
X-RateLimit-Remaining: 89
|
||||
...
|
||||
```
|
||||
|
||||
## Exceeding the Rate Limit
|
||||
|
||||
If the rate limit is exceeded, the AnimeThemes API will return `Retry-After` and `X-RateLimit-Reset` headers in the response.
|
||||
|
||||
```sh
|
||||
...
|
||||
X-RateLimit-Limit: 90
|
||||
X-RateLimit-Remaining: 0
|
||||
Retry-After: 60
|
||||
X-RateLimit-Reset: 1625073463180
|
||||
...
|
||||
```
|
||||
|
||||
Additionally, the AnimeThemes API will return an error message in the response body.
|
||||
|
||||
```json
|
||||
{
|
||||
message: "Too Many Attempts."
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,72 @@
|
||||
---
|
||||
title: Validation
|
||||
---
|
||||
|
||||
# Validation
|
||||
|
||||
---
|
||||
|
||||
The AnimeThemes API uses form requests to validate query parameters.
|
||||
|
||||
## Parameter Validation
|
||||
|
||||
Form Requests define a set of rules for parameter fields and values.
|
||||
|
||||
If the parameter field-value pair passes every rule, the pair is considered valid.
|
||||
|
||||
```powershell
|
||||
# Integer values are valid for the Anime Year Filter
|
||||
/anime?filter[year]=2000
|
||||
```
|
||||
|
||||
If the parameter field-value pair fails any rule, the pair is considered invalid.
|
||||
|
||||
```powershell
|
||||
# String values are not valid for the Anime Year Filter
|
||||
/anime?filter[year]=current
|
||||
```
|
||||
|
||||
## Response
|
||||
|
||||
If every field-value pair is valid, the request will be executed normally.
|
||||
|
||||
```powershell
|
||||
/anime?filter[year]=2000&filter[season]=winter
|
||||
```
|
||||
|
||||
```json
|
||||
// Status Code: 200 OK
|
||||
{
|
||||
anime: [
|
||||
{
|
||||
...
|
||||
year: 2000,
|
||||
season: "Winter",
|
||||
...
|
||||
},
|
||||
...
|
||||
],
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
If any field-value pair is invalid, the request will return a list of validation errors.
|
||||
|
||||
```powershell
|
||||
/anime?filter[year]=current&filter[season]=autumn
|
||||
```
|
||||
|
||||
```json
|
||||
// Status Code: 422 Unprocessable Entity
|
||||
{
|
||||
message: "The selected filter.season is invalid. (and 1 more error)",
|
||||
errors: {
|
||||
filter.season: [
|
||||
"The selected filter.season is invalid."
|
||||
],
|
||||
filter.year: [
|
||||
"The filter.year must be an integer."
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,44 @@
|
||||
---
|
||||
title: Announcement Destroy
|
||||
---
|
||||
|
||||
# Announcement Destroy Endpoint
|
||||
|
||||
The announcement destroy endpoint deletes an announcement and returns a confirmation message.
|
||||
|
||||
For example, the `/announcement/1` endpoint will delete the announcement of id '1' and return a confirmation message.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
DELETE /announcement/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: delete announcement
|
||||
|
||||
**Roles with Permission**: Admin
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
announcement: {
|
||||
id: id,
|
||||
content: "content",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X DELETE -H "Authorization: Bearer {token}" https://api.animethemes.moe/announcement/1
|
||||
```
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
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 |
|
||||
|
||||
## Allowed Include Paths
|
||||
|
||||
None
|
||||
|
||||
## Endpoints
|
||||
|
||||
**[Announcement Destroy](/admin/announcement/destroy/)**
|
||||
|
||||
The announcement destroy endpoint deletes an announcement and returns a confirmation message.
|
||||
|
||||
**[Announcement Index](/admin/announcement/index/)**
|
||||
|
||||
The announcement index endpoint displays a listing of announcement resources.
|
||||
|
||||
**[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,81 @@
|
||||
---
|
||||
title: Announcement Index
|
||||
---
|
||||
|
||||
# Announcement Index Endpoint
|
||||
|
||||
The announcement index endpoint returns a listing of announcement resources.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /announcement/
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
| :----------: | :------: | :----------------------------------------------------------------------------------- |
|
||||
| fields | No | Sparse fieldsets for resource types |
|
||||
| filter | No | Filters for announcement resources & constraining the inclusion of related resources |
|
||||
| page[number] | No | The page of announcement resources to display |
|
||||
| page[size] | No | The number of announcement resources to display for the current page |
|
||||
| sort | No | The list of fields to sort the announcement resources |
|
||||
|
||||
## Allowed Sort Fields
|
||||
|
||||
| Name | Description |
|
||||
| :--------: | :------------------------------------------------------------------ |
|
||||
| id | Sort resources on the primary key |
|
||||
| content | Sort resources on the announcement text |
|
||||
| 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 |
|
||||
| content | Filter resources on the announcement text |
|
||||
| created_at | Filter resources on the resource creation date |
|
||||
| updated_at | Filter resources on the resource last modified date |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
announcements: [
|
||||
{
|
||||
id: id,
|
||||
content: "content",
|
||||
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/announcement/
|
||||
```
|
||||
@@ -0,0 +1,42 @@
|
||||
---
|
||||
title: Announcement Show
|
||||
---
|
||||
|
||||
# Announcement Show Endpoint
|
||||
|
||||
The announcement show endpoint returns an announcement resource.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /announcement/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
| :-----: | :------: | :------------------------------------------------------ |
|
||||
| fields | No | Sparse fieldsets for resource types |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
announcement: {
|
||||
id: id,
|
||||
content: "content",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl https://api.animethemes.moe/announcement/1
|
||||
```
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
title: Announcement Store
|
||||
---
|
||||
|
||||
# Announcement Store Endpoint
|
||||
|
||||
The announcement store endpoint creates a new announcement and returns the new announcement resource.
|
||||
|
||||
For example, the `/announcement?content=Lorem+Ipsum` endpoint will create a new announcement and return the new announcement resource.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
POST /announcement
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: create announcement
|
||||
|
||||
**Roles with Permission**: Admin
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Rules |
|
||||
| :-----: | :------: | :---------------- |
|
||||
| content | Yes | string, max:65535 |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
announcement: {
|
||||
id: id,
|
||||
content: "content",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X POST -H "Authorization: Bearer {token}" https://api.animethemes.moe/announcement/
|
||||
```
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
title: Announcement Update
|
||||
---
|
||||
|
||||
# Announcement Update Endpoint
|
||||
|
||||
The announcement update endpoint updates an announcement and returns the updated announcement resource.
|
||||
|
||||
For example, the `/announcement/1?content=The+Release+Has+Been+Deployed!` endpoint will update the announcement content attribute and return the updated announcement resource.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
PUT|PATCH /announcement/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: update announcement
|
||||
|
||||
**Roles with Permission**: Admin
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Rules |
|
||||
| :-----: | :------: | :---------------- |
|
||||
| content | No | string, max:65535 |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
announcement: {
|
||||
id: id,
|
||||
content: "content",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X PATCH -H "Authorization: Bearer {token}" https://api.animethemes.moe/announcement/1
|
||||
```
|
||||
@@ -0,0 +1,45 @@
|
||||
---
|
||||
title: Dump Destroy
|
||||
---
|
||||
|
||||
# Dump Destroy Endpoint
|
||||
|
||||
The dump destroy endpoint deletes a dump and returns a confirmation message.
|
||||
|
||||
For example, the `/dump/1` endpoint will delete the dump of id '1' and return a confirmation message.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
DELETE /dump/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: delete dump
|
||||
|
||||
**Roles with Permission**: Admin
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
dump: {
|
||||
id: id,
|
||||
path: "path",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
link: "link
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X DELETE -H "Authorization: Bearer {token}" https://api.animethemes.moe/dump/1
|
||||
```
|
||||
@@ -0,0 +1,47 @@
|
||||
---
|
||||
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 |
|
||||
| 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 deletes a dump and returns a confirmation message.
|
||||
|
||||
**[Dump Index](/admin/dump/index/)**
|
||||
|
||||
The dump index endpoint displays a listing of dump resources.
|
||||
|
||||
**[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,82 @@
|
||||
---
|
||||
title: Dump Index
|
||||
---
|
||||
|
||||
# Dump Index Endpoint
|
||||
|
||||
The dump index endpoint returns a listing of dump resources.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /dump/
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
| :----------: | :------: | :----------------------------------------------------------- |
|
||||
| fields | No | Sparse fieldsets for resource types |
|
||||
| filter | No | Filters for dump resources |
|
||||
| page[number] | No | The page of dump resources to display |
|
||||
| page[size] | No | The number of dump resources to display for the current page |
|
||||
| sort | No | The list of fields to sort the dump resources |
|
||||
|
||||
## Allowed Sort Fields
|
||||
|
||||
| Name | Description |
|
||||
| :--------: | :------------------------------------------------------------------ |
|
||||
| id | Sort resources on the primary key |
|
||||
| path | Sort resources on the path of the file in storage |
|
||||
| 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 |
|
||||
| path | Filter resources on the path of the file in storage |
|
||||
| created_at | Filter resources on the resource creation date |
|
||||
| updated_at | Filter resources on the resource last modified date |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
dumps: [
|
||||
{
|
||||
id: id,
|
||||
path: "path",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
link: "link"
|
||||
},
|
||||
...
|
||||
],
|
||||
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/dump/
|
||||
```
|
||||
@@ -0,0 +1,43 @@
|
||||
---
|
||||
title: Dump Show
|
||||
---
|
||||
|
||||
# Dump Show Endpoint
|
||||
|
||||
The dump show endpoint returns a dump resource.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /dump/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
| :-----: | :------: | :------------------------------------------------------ |
|
||||
| fields | No | Sparse fieldsets for resource types |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
dump: {
|
||||
id: id,
|
||||
path: "path",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
link: "link"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl https://api.animethemes.moe/dump/1
|
||||
```
|
||||
@@ -0,0 +1,47 @@
|
||||
---
|
||||
title: Dump Store
|
||||
---
|
||||
|
||||
# Dump Store Endpoint
|
||||
|
||||
The dump store endpoint creates a new dump and returns the new dump resource.
|
||||
|
||||
For example, the `/dump?path=animethemes-db-dump-wiki-1663559663946.sql` endpoint will create a new dump and return the new dump resource.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
POST /dump
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: create dump
|
||||
|
||||
**Roles with Permission**: Admin
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Rules |
|
||||
| :-----: | :------: | :---------------- |
|
||||
| path | Yes | string, max:192 |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
dump: {
|
||||
id: id,
|
||||
path: "path",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
link: "link"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X POST -H "Authorization: Bearer {token}" https://api.animethemes.moe/dump/
|
||||
```
|
||||
@@ -0,0 +1,47 @@
|
||||
---
|
||||
title: Dump Update
|
||||
---
|
||||
|
||||
# Dump Update Endpoint
|
||||
|
||||
The dump update endpoint updates a dump and returns the updated dump resource.
|
||||
|
||||
For example, the `/dump/1?path=animethemes-db-dump-wiki-1663559663946.sql` endpoint will update the dump path attribute and return the updated dump resource.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
PUT|PATCH /dump/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: update dump
|
||||
|
||||
**Roles with Permission**: Admin
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Rules |
|
||||
| :-----: | :------: | :---------------- |
|
||||
| path | No | string, max:192 |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
dump: {
|
||||
id: id,
|
||||
path: "path",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
link: "link"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X PATCH -H "Authorization: Bearer {token}" https://api.animethemes.moe/dump/1
|
||||
```
|
||||
@@ -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/
|
||||
```
|
||||
@@ -0,0 +1,43 @@
|
||||
---
|
||||
title: Feature Show
|
||||
---
|
||||
|
||||
# Feature Show Endpoint
|
||||
|
||||
The feature show endpoint returns a feature resource.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /feature/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
| :-----: | :------: | :------------------------------------------------------ |
|
||||
| fields | No | Sparse fieldsets for resource types |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
feature: {
|
||||
id: id,
|
||||
name: "name",
|
||||
value: "value",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
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,46 @@
|
||||
---
|
||||
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"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl https://api.animethemes.moe/current/featuredtheme/
|
||||
```
|
||||
@@ -0,0 +1,45 @@
|
||||
---
|
||||
title: Featured Theme Destroy
|
||||
---
|
||||
|
||||
# Featured Theme Destroy Endpoint
|
||||
|
||||
The featured theme destroy endpoint deletes a featured theme and returns a confirmation message.
|
||||
|
||||
For example, the `/featuredtheme/1` endpoint will delete the featured theme of id '1' and return a confirmation message.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
DELETE /featuredtheme/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: delete featured theme
|
||||
|
||||
**Roles with Permission**: Admin
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
featuredtheme: {
|
||||
id: id,
|
||||
start_at: "start_at",
|
||||
end_at: "end_at",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X DELETE -H "Authorization: Bearer {token}" https://api.animethemes.moe/featuredtheme/1
|
||||
```
|
||||
@@ -0,0 +1,57 @@
|
||||
---
|
||||
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 |
|
||||
|
||||
## Allowed Include Paths
|
||||
|
||||
* animethemeentry
|
||||
* animethemeentry.animetheme
|
||||
* animethemeentry.animetheme.anime
|
||||
* animethemeentry.animetheme.anime.images
|
||||
* animethemeentry.animetheme.group
|
||||
* 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 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 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.
|
||||
@@ -0,0 +1,84 @@
|
||||
---
|
||||
title: Featured Theme Index
|
||||
---
|
||||
|
||||
# Featured Theme Index Endpoint
|
||||
|
||||
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 /featuredtheme/
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| 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 |
|
||||
| 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 |
|
||||
| random | Sort resources randomly. Ignored if other sort fields are provided. |
|
||||
|
||||
## Filters
|
||||
|
||||
| Name | Description |
|
||||
| :--------: | :----------------------------------------------------------------- |
|
||||
| id | Filter resources on the primary key |
|
||||
| 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 |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
featuredthemes: [
|
||||
{
|
||||
id: id,
|
||||
start_at: "start_at",
|
||||
end_at: "end_at",
|
||||
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/featuredtheme/
|
||||
```
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
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"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl https://api.animethemes.moe/featuredtheme/1
|
||||
```
|
||||
@@ -0,0 +1,51 @@
|
||||
---
|
||||
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"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X POST -H "Authorization: Bearer {token}" https://api.animethemes.moe/featuredtheme/
|
||||
```
|
||||
@@ -0,0 +1,51 @@
|
||||
---
|
||||
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
|
||||
|
||||
## 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"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## 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.
|
||||
@@ -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,26 @@
|
||||
---
|
||||
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 |
|
||||
|
||||
## Allowed Include Paths
|
||||
|
||||
* permissions
|
||||
@@ -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,39 @@
|
||||
---
|
||||
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
|
||||
* roles.permissions
|
||||
|
||||
## 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,93 @@
|
||||
---
|
||||
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 |
|
||||
| description | Sort resources on the description 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 |
|
||||
| description | Filter resources on the description 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",
|
||||
description: "description",
|
||||
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
|
||||
```
|
||||
@@ -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.
|
||||
@@ -0,0 +1,49 @@
|
||||
---
|
||||
title: Page Destroy
|
||||
---
|
||||
|
||||
# Page Destroy Endpoint
|
||||
|
||||
The page destroy endpoint soft deletes a page and returns the deleted page resource.
|
||||
|
||||
For example, the `/page/encoding` endpoint will soft delete the Encoding page and return the deleted Encoding resource.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
DELETE /page/{slug}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: delete page
|
||||
|
||||
**Roles with Permission**: Wiki Editor, Encoder, Admin
|
||||
|
||||
**Other Requirements**: Page must not 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 DELETE -H "Authorization: Bearer {token}" https://api.animethemes.moe/page/encoding
|
||||
```
|
||||
@@ -0,0 +1,39 @@
|
||||
---
|
||||
title: Page Force Delete
|
||||
---
|
||||
|
||||
# Page Force Delete Endpoint
|
||||
|
||||
The page force delete endpoint hard deletes a page and returns a confirmation message.
|
||||
|
||||
For example, the `/forceDelete/page/encoding` endpoint will hard delete the Encoding page and return a confirmation message.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
DELETE /forceDelete/page/{slug}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: force delete page
|
||||
|
||||
**Roles with Permission**: Admin
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
message: "The Page 'Encoding' was deleted.",
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X DELETE -H "Authorization: Bearer {token}" https://api.animethemes.moe/forceDelete/page/encoding
|
||||
```
|
||||
@@ -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,88 @@
|
||||
---
|
||||
title: Page Index
|
||||
---
|
||||
|
||||
# Page Index Endpoint
|
||||
|
||||
The page index endpoint returns a listing of page resources.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /page/
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
| :----------: | :------: | :--------------------------------------------------------------------------- |
|
||||
| fields | No | Sparse fieldsets for resource types |
|
||||
| filter | No | Filters for page resources |
|
||||
| page[number] | No | The page of page resources to display |
|
||||
| page[size] | No | The number of page 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 page |
|
||||
| slug | Sort resources on the URL slug of the page |
|
||||
| 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 page |
|
||||
| slug | Filter resources on the URL slug of the page |
|
||||
| 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
|
||||
{
|
||||
pages: [
|
||||
{
|
||||
id: id,
|
||||
name: "name",
|
||||
slug: "slug",
|
||||
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/page/
|
||||
```
|
||||
@@ -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, Encoder, 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
|
||||
```
|
||||
@@ -0,0 +1,47 @@
|
||||
---
|
||||
title: Page Show
|
||||
---
|
||||
|
||||
# Page Show Endpoint
|
||||
|
||||
The page show endpoint returns a page resource.
|
||||
|
||||
For example, the `/page/encoding` endpoint will return the Encoding page resource.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /page/{slug}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
| :-----: | :------: | :------------------------------------------------------ |
|
||||
| fields | No | Sparse fieldsets for resource types |
|
||||
|
||||
## 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 https://api.animethemes.moe/page/encoding
|
||||
```
|
||||
@@ -0,0 +1,51 @@
|
||||
---
|
||||
title: Page Store
|
||||
---
|
||||
|
||||
# Page Store Endpoint
|
||||
|
||||
The page store endpoint creates a new page and returns the new page resource.
|
||||
|
||||
For example, the `/page?name=Encoding&slug=encoding&body=Lorem+Ipsum` endpoint will create a new Encoding page and return the new Encoding resource.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
POST /page
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: create page
|
||||
|
||||
**Roles with Permission**: Wiki Editor, Encoder, Admin
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Rules |
|
||||
| :------: | :------: | :--------------------------------------------------- |
|
||||
| name | Yes | string, max:192 |
|
||||
| slug | Yes | string, max:192, regex:/^[\pL\pM\pN\/_-]+$/u, unique |
|
||||
| body | Yes | string, max:16777215 |
|
||||
|
||||
## 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 POST -H "Authorization: Bearer {token}" https://api.animethemes.moe/page/
|
||||
```
|
||||
@@ -0,0 +1,53 @@
|
||||
---
|
||||
title: Page Update
|
||||
---
|
||||
|
||||
# Page Update Endpoint
|
||||
|
||||
The page update endpoint updates a page and returns the updated page resource.
|
||||
|
||||
For example, the `/page/encoding?body=Lorem+Ipsum` endpoint will update the Encoding page body attribute and return the updated Encoding resource.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
PUT|PATCH /page/{slug}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: update page
|
||||
|
||||
**Roles with Permission**: Wiki Editor, Encoder, Admin
|
||||
|
||||
**Other Requirements**: Page must not be soft deleted
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Rules |
|
||||
| :------: | :------: | :--------------------------------------------------- |
|
||||
| name | No | string, max:192 |
|
||||
| slug | No | string, max:192, regex:/^[\pL\pM\pN\/_-]+$/u, unique |
|
||||
| body | No | string, max:16777215 |
|
||||
|
||||
## 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/page/encoding
|
||||
```
|
||||
@@ -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.group
|
||||
* video.animethemeentries.animetheme.song.artists
|
||||
* video.audio
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
tracks: [
|
||||
{
|
||||
id: "id",
|
||||
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/playlist/N4hG/backward
|
||||
```
|
||||
@@ -0,0 +1,49 @@
|
||||
---
|
||||
title: Playlist Destroy
|
||||
---
|
||||
|
||||
# Playlist Destroy Endpoint
|
||||
|
||||
The playlist destroy endpoint deletes a playlist and returns a confirmation message.
|
||||
|
||||
For example, the `/playlist/N4hG` endpoint will delete the playlist of id N4hG and return a confirmation message.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
DELETE /playlist/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: delete playlist
|
||||
|
||||
**Other Requirements**: User must own playlist
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
playlist: {
|
||||
id: "id",
|
||||
name: "name",
|
||||
description: "description",
|
||||
visibility: "visibility",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_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,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.group
|
||||
* video.animethemeentries.animetheme.song.artists
|
||||
* video.audio
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
tracks: [
|
||||
{
|
||||
id: "id",
|
||||
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/playlist/N4hG/forward
|
||||
```
|
||||
@@ -0,0 +1,63 @@
|
||||
---
|
||||
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 |
|
||||
| description | String | Yes | No | The description 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 |
|
||||
| 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 deletes a playlist and returns a confirmation message.
|
||||
|
||||
**[Playlist Index](/list/playlist/index/)**
|
||||
|
||||
The playlist index endpoint displays a listing of playlist resources.
|
||||
|
||||
**[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,99 @@
|
||||
---
|
||||
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 |
|
||||
| description | Sort resources on the description 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 |
|
||||
| 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 |
|
||||
| description | Filter resources on the description 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 |
|
||||
| has | Filter resources on relations within allowed include paths |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
playlists: [
|
||||
{
|
||||
id: "id",
|
||||
name: "name",
|
||||
description: "description",
|
||||
visibility: "visibility",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_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,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",
|
||||
description: "description",
|
||||
visibility: "visibility",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_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,51 @@
|
||||
---
|
||||
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 |
|
||||
| description | No | string, max:1000 |
|
||||
| visibility | Yes | EnumValue [Public, Private, Unlisted] |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
playlist: {
|
||||
id: "id",
|
||||
name: "name",
|
||||
description: "description",
|
||||
visibility: "visibility",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_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
|
||||
* animethemeentry.animetheme.anime.images
|
||||
* animethemeentry.animetheme.group
|
||||
* animethemeentry.animetheme.song.artists
|
||||
* video.audio
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
tracks: [
|
||||
{
|
||||
id: "id",
|
||||
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/playlist/N4hG/track/Q3hD/backward
|
||||
```
|
||||
@@ -0,0 +1,45 @@
|
||||
---
|
||||
title: Playlist Track Destroy
|
||||
---
|
||||
|
||||
# Playlist Track Destroy Endpoint
|
||||
|
||||
The playlist track destroy endpoint deletes a playlist track and returns a confirmation message.
|
||||
|
||||
For example, the `/playlist/N4hG/track/Q3hD` endpoint will delete the playlist track of id Q3hD and return a confirmation message.
|
||||
|
||||
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
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
track: {
|
||||
id: "id",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X DELETE -H "Authorization: Bearer {token}" https://api.animethemes.moe/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
|
||||
* animethemeentry.animetheme.anime.images
|
||||
* animethemeentry.animetheme.group
|
||||
* animethemeentry.animetheme.song.artists
|
||||
* video.audio
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
tracks: [
|
||||
{
|
||||
id: "id",
|
||||
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/playlist/N4hG/track/Q3hD/forward
|
||||
```
|
||||
@@ -0,0 +1,60 @@
|
||||
---
|
||||
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 |
|
||||
|
||||
## Allowed Include Paths
|
||||
|
||||
* next
|
||||
* playlist
|
||||
* previous
|
||||
* video
|
||||
* animethemeentry.animetheme.group
|
||||
* animethemeentry.animetheme.anime.images
|
||||
* animethemeentry.animetheme.song.artists
|
||||
* video.audio
|
||||
|
||||
## Endpoints
|
||||
|
||||
**[Playlist Track Destroy](/list/playlist/track/destroy/)**
|
||||
|
||||
The playlist track destroy endpoint 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 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.
|
||||
@@ -0,0 +1,83 @@
|
||||
---
|
||||
title: Playlist Track Index
|
||||
---
|
||||
|
||||
# Playlist Track Index Endpoint
|
||||
|
||||
The playlist track index endpoint returns a listing of tracks for the playlist.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /playlist/{id}/track
|
||||
```
|
||||
|
||||
## 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 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 |
|
||||
| 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 |
|
||||
| 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 |
|
||||
| has | Filter resources on relations within allowed include paths |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
tracks: [
|
||||
{
|
||||
id: "id",
|
||||
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/playlist/N4hG/track
|
||||
```
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
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"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl https://api.animethemes.moe/playlist/N4hG/track/Q3hD
|
||||
```
|
||||
@@ -0,0 +1,55 @@
|
||||
---
|
||||
title: Playlist Track Store
|
||||
---
|
||||
|
||||
# Playlist Track Store Endpoint
|
||||
|
||||
The playlist track store endpoint creates a new playlist track and returns the new playlist track resource.
|
||||
|
||||
For example, the `/playlist/N4hG/track?video_id=2712&entry_id=3814` endpoint will create a new playlist track for the Bakemonogatari-OP1.webm video and return the new playlist track resource.
|
||||
|
||||
If `next` is set, the new track will be inserted before the next track in the playlist.
|
||||
|
||||
If `previous` is set, the new track will be inserted after the previous track in the playlist.
|
||||
|
||||
If neither `next` or `previous` is set, the new track will be appended to the end of the list of tracks in the playlist.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
POST /playlist/{id}/track
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: create playlist track
|
||||
|
||||
**Other Requirements**: The user must own the playlist
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Rules |
|
||||
| :------: | :------: | :--------------------------------------------------------------------------------- |
|
||||
| name | Yes | string, max:192 |
|
||||
| next | No | string, Track ID Exists in Playlist, prohibits:previous |
|
||||
| previous | No | string, Track ID Exists in Playlist, prohibits:next |
|
||||
| entry_id | Yes | integer, Entry ID Exists, Anime Theme Entry Video Exists when video_id is provided |
|
||||
| video_id | Yes | integer, Video ID Exists, Anime Theme Entry Video Exists when entry_id is provided |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
track: {
|
||||
id: "id",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X POST -H "Authorization: Bearer {token}" https://api.animethemes.moe/playlist/N4hG/track
|
||||
```
|
||||
@@ -0,0 +1,52 @@
|
||||
---
|
||||
title: Playlist Track Update
|
||||
---
|
||||
|
||||
# Playlist Track Update Endpoint
|
||||
|
||||
The playlist track update endpoint updates a playlist track and returns a confirmation message.
|
||||
|
||||
For example, the `/playlist/N4hG/track/Q3hD?next_id=2` endpoint will update the playlist track of id Q3hD next_id attribute and return a confirmation message.
|
||||
|
||||
If `next` is set, the track will be moved before the next track in the playlist.
|
||||
|
||||
If `previous` is set, the track will be moved after the previous track in the playlist.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
PUT|PATCH /playlist/{id}/track/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: update playlist track
|
||||
|
||||
**Other Requirements**: User must own playlist
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Rules |
|
||||
| :------: | :------: | :--------------------------------------------------------------------------------- |
|
||||
| next | No | string, Track ID exists & Track Playlist ID matches |
|
||||
| previous | No | string, Track ID exists & Track Playlist ID matches |
|
||||
| entry_id | No | integer, Entry ID Exists, Anime Theme Entry Video Exists when video_id is provided |
|
||||
| video_id | No | integer, Video ID Exists, Anime Theme Entry Video Exists when entry_id is provided |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
track: {
|
||||
id: "id",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X PATCH -H "Authorization: Bearer {token}" https://api.animethemes.moe/playlist/N4hG/track/Q3hD
|
||||
```
|
||||
@@ -0,0 +1,53 @@
|
||||
---
|
||||
title: Playlist Update
|
||||
---
|
||||
|
||||
# Playlist Update Endpoint
|
||||
|
||||
The playlist update endpoint updates a playlist and returns the updated playlist resource.
|
||||
|
||||
For example, the `/playlist/N4hG?visibility=public` endpoint will update the playlist of id N4hG visibility attribute and return the updated playlist resource.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
PUT|PATCH /playlist/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: update playlist
|
||||
|
||||
**Other Requirements**: User must own playlist
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Rules |
|
||||
| :--------: | :------: | :------------------------------------ |
|
||||
| name | No | string, max:192 |
|
||||
| description | No | string, max:1000 |
|
||||
| visibility | No | EnumValue [Public, Private, Unlisted] |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
playlist: {
|
||||
id: "id",
|
||||
name: "name",
|
||||
description: "description",
|
||||
visibility: "visibility",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_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/playlist/N4hG
|
||||
```
|
||||
@@ -0,0 +1,39 @@
|
||||
---
|
||||
title: Playlist Image Destroy
|
||||
---
|
||||
|
||||
# Playlist Image Destroy Endpoint
|
||||
|
||||
The playlist image destroy endpoint deletes a playlist image and returns the deleted playlist image resource.
|
||||
|
||||
For example, the `/playlistimage/N4hG/1` endpoint will delete the association between the playlist of id N4hG and the large cover image of id 1.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
DELETE /playlistimage/{playlist:id}/{image:id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: delete playlist, delete image
|
||||
|
||||
**Other Requirements**: User must own playlist
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
message: "Image 'he3aw0eD3Gm7HKHJ5DRyCWOsK1QeIG91bmUXT2CX.png' has been detached from Playlist '/r/anime's Best OPs and EDs of 2022'.",
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X DELETE -H "Authorization: Bearer {token}" https://api.animethemes.moe/playlistimage/N4hG/1
|
||||
```
|
||||
@@ -0,0 +1,39 @@
|
||||
---
|
||||
title: Playlist Image
|
||||
---
|
||||
|
||||
# Playlist Image
|
||||
|
||||
---
|
||||
|
||||
A playlist image API resource represents the association between a playlist and an image.
|
||||
|
||||
## Fields
|
||||
|
||||
| Name | Type | Nullable | Default | Description |
|
||||
| :--------: | :-----: | :------: | :-----: | :------------------------------------------- |
|
||||
| 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
|
||||
|
||||
* playlist
|
||||
* image
|
||||
|
||||
## Endpoints
|
||||
|
||||
**[Playlist Image Destroy](/list/playlistimage/destroy/)**
|
||||
|
||||
The playlist image destroy endpoint deletes a playlist image and returns a confirmation message.
|
||||
|
||||
**[Playlist Image Index](/list/playlistimage/index/)**
|
||||
|
||||
The playlist image index endpoint displays a listing of playlist image resources.
|
||||
|
||||
**[Playlist Image Show](/list/playlistimage/show/)**
|
||||
|
||||
The playlist image show endpoint returns a playlist image resource.
|
||||
|
||||
**[Playlist Image Store](/list/playlistimage/store/)**
|
||||
|
||||
The playlist image store endpoint creates a new playlist image and returns the new playlist image resource.
|
||||
@@ -0,0 +1,76 @@
|
||||
---
|
||||
title: Playlist Image Index
|
||||
---
|
||||
|
||||
# Playlist Image Index Endpoint
|
||||
|
||||
The playlist image index endpoint returns a listing of playlist image resources.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /playlistimage/
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: view playlist
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
| :----------: | :------: | :------------------------------------------------------------------------------------- |
|
||||
| fields | No | Sparse fieldsets for resource types |
|
||||
| filter | No | Filters for playlist image resources & constraining the inclusion of related resources |
|
||||
| include | No | Inclusion of related resources |
|
||||
| page[number] | No | The page of playlist image resources to display |
|
||||
| page[size] | No | The number of playlist image resources to display for the current page |
|
||||
| sort | No | The list of fields to sort the resources |
|
||||
|
||||
## Allowed Sort Fields
|
||||
|
||||
| Name | Description |
|
||||
| :--------: | :------------------------------------------------ |
|
||||
| created_at | Sort resources on the resource creation date |
|
||||
| updated_at | Sort resources on the resource last modified date |
|
||||
|
||||
## Filters
|
||||
|
||||
| Name | Description |
|
||||
| :--------: | :--------------------------------------------------------- |
|
||||
| created_at | Filter resources on the resource creation date |
|
||||
| updated_at | Filter resources on the resource last modified date |
|
||||
| has | Filter resources on relations within allowed include paths |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
playlistimages: [
|
||||
{
|
||||
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/playlistimage/
|
||||
```
|
||||
@@ -0,0 +1,42 @@
|
||||
---
|
||||
title: Playlist Image Show
|
||||
---
|
||||
|
||||
# Playlist Image Show Endpoint
|
||||
|
||||
The playlist image show endpoint returns an playlist image resource.
|
||||
|
||||
For example, the `/playlistimage/N4hG/1` endpoint will return the playlist image resource for the association between the playlist of id N4hG and the large cover image of id 1.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /playlistimage/{playlist:id}/{image:id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: view playlist
|
||||
|
||||
**Other Requirements**: If the playlist is private, the user must own the playlist
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
playlistimage: {
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl https://api.animethemes.moe/playlistimage/N4hG/1
|
||||
```
|
||||
@@ -0,0 +1,40 @@
|
||||
---
|
||||
title: Playlist Image Store
|
||||
---
|
||||
|
||||
# Playlist Image Store Endpoint
|
||||
|
||||
The playlist image store endpoint creates a new playlist image and returns the new playlist image resource.
|
||||
|
||||
For example, the `/playlistimage/N4hG/1` endpoint will create a new association between the playlist of id N4hG and the large cover image of id 1.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
POST /playlistimage/{playlist:id}/{image:id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: create playlist, create image
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
playlistimage: {
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X POST -H "Authorization: Bearer {token}" https://api.animethemes.moe/playlistimage/N4hG/1
|
||||
```
|
||||
@@ -0,0 +1,205 @@
|
||||
---
|
||||
title: API Reference
|
||||
---
|
||||
|
||||
# API Reference
|
||||
|
||||
## Wiki
|
||||
|
||||
---
|
||||
|
||||
Wiki API resources comprise the repository of anime opening and ending themes and their contextual relations.
|
||||
|
||||
### Resources
|
||||
|
||||
**[Anime](/wiki/anime/)**
|
||||
|
||||
An anime API resource represents a production with at least one opening or ending sequence.
|
||||
|
||||
**[Anime Image](/wiki/animeimage/)**
|
||||
|
||||
An anime image API resource represents the association between an anime and an image.
|
||||
|
||||
**[Anime Resource](/wiki/animeresource/)**
|
||||
|
||||
An anime resource API resource represents the association between an anime and an external resource.
|
||||
|
||||
**[Anime Series](/wiki/animeseries/)**
|
||||
|
||||
An anime series API resource represents the association between an anime and a series.
|
||||
|
||||
**[Anime Studio](/wiki/animestudio/)**
|
||||
|
||||
An anime studio API resource represents the association between an anime and a studio.
|
||||
|
||||
**[Anime Synonym](/wiki/animesynonym/)**
|
||||
|
||||
An anime synonym API resource represents an alternate title or common abbreviation for an anime.
|
||||
|
||||
**[Anime Theme](/wiki/animetheme/)**
|
||||
|
||||
An anime theme API resource represents an OP or ED sequence for an anime.
|
||||
|
||||
**[Anime Theme Entry](/wiki/animethemeentry/)**
|
||||
|
||||
An anime theme entry API resource represents a version of an anime theme.
|
||||
|
||||
**[Anime Theme Entry Video](/wiki/animethemeentryvideo/)**
|
||||
|
||||
An anime theme entry video API resource represents the association between an anime theme entry and a video.
|
||||
|
||||
**[Artist](/wiki/artist/)**
|
||||
|
||||
An artist API resource represents a musical performer of anime sequences.
|
||||
|
||||
**[Artist Image](/wiki/artistimage/)**
|
||||
|
||||
An artist image API resource represents the association between an artist and an image.
|
||||
|
||||
**[Artist Member](/wiki/artistmember/)**
|
||||
|
||||
An artist member API resource represents the association of an artist and a group/unit.
|
||||
|
||||
**[Artist Resource](/wiki/artistresource/)**
|
||||
|
||||
An artist resource API resource represents the association between an artist and an external resource.
|
||||
|
||||
**[Artist Song](/wiki/artistsong/)**
|
||||
|
||||
An artist song API resource represents the association between an artist and a song.
|
||||
|
||||
**[Audio](/wiki/audio/)**
|
||||
|
||||
An audio API resource represents the audio track of a video.
|
||||
|
||||
**[Group](/wiki/group/)**
|
||||
|
||||
A group API resource represents the group that accompanies an AnimeTheme.
|
||||
|
||||
**[Image](/wiki/image/)**
|
||||
|
||||
An image API resource represents a visual component for another resource such as an anime or artist.
|
||||
|
||||
**[Resource](/wiki/resource/)**
|
||||
|
||||
An external API resource represents a site with supplementary information for another resource such as an anime or artist.
|
||||
|
||||
**[Series](/wiki/series/)**
|
||||
|
||||
A series API resource represents a collection of related anime.
|
||||
|
||||
**[Song](/wiki/song/)**
|
||||
|
||||
A song API resource represents the composition that accompanies an AnimeTheme.
|
||||
|
||||
**[Song Resource](/wiki/songresource/)**
|
||||
|
||||
An song resource API resource represents the association between an song and an external resource.
|
||||
|
||||
**[Studio](/wiki/studio/)**
|
||||
|
||||
A studio API resource represents a company that produces anime.
|
||||
|
||||
**[Studio Image](/wiki/studioimage/)**
|
||||
|
||||
A studio image API resource represents the association between a studio and an image.
|
||||
|
||||
**[Studio Resource](/wiki/studioresource/)**
|
||||
|
||||
A studio resource API resource represents the association between a studio and an external resource.
|
||||
|
||||
**[Video](/wiki/video/)**
|
||||
|
||||
A video API resource represents a WebM of an anime theme.
|
||||
|
||||
**[Video Script](/wiki/videoscript/)**
|
||||
|
||||
A video script API resource represents an encoding script used to produce a video.
|
||||
|
||||
## Search
|
||||
|
||||
---
|
||||
|
||||
**[Global Search Endpoint](/search/)**
|
||||
|
||||
The global search endpoint returns a listing of resources that match a given search term.
|
||||
|
||||
## 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.
|
||||
|
||||
## 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.
|
||||
|
||||
## 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.
|
||||
|
||||
## 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,131 @@
|
||||
---
|
||||
title: Global Search
|
||||
---
|
||||
|
||||
# Global Search Endpoint
|
||||
|
||||
The global search endpoint returns a listing of resources that match a given search term.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /search/
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
| :----------: | :------: | :--------------------------------------------------------------------------- |
|
||||
| fields | No | Sparse fieldsets for resource types |
|
||||
| filter | No | Filters for wiki resources & constraining the inclusion of related resources |
|
||||
| include[type] | No | Inclusion of related resources by type |
|
||||
| page[limit] | No | The maximum number of wiki resource matches to return |
|
||||
| q | Yes | The query to search for matching wiki resources |
|
||||
| sort[type] | No | The list of fields to sort the resources |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
search: {
|
||||
anime: [
|
||||
{
|
||||
id: id,
|
||||
name: "name",
|
||||
slug: "slug",
|
||||
year: year,
|
||||
season: "season",
|
||||
media_format: "media_format",
|
||||
synopsis: "synopsis",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
deleted_at: "deleted_at"
|
||||
}
|
||||
],
|
||||
animethemes: [
|
||||
{
|
||||
id: id,
|
||||
type: "type",
|
||||
sequence: sequence,
|
||||
group: "group",
|
||||
slug: "slug",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
deleted_at: "deleted_at"
|
||||
}
|
||||
],
|
||||
artists: [
|
||||
{
|
||||
id: id,
|
||||
name: "name",
|
||||
slug: "slug",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
deleted_at: "deleted_at"
|
||||
}
|
||||
],
|
||||
playlists: [
|
||||
{
|
||||
id: id,
|
||||
name: "name",
|
||||
description: "description",
|
||||
visibility: "visibility",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
deleted_at: "deleted_at"
|
||||
}
|
||||
],
|
||||
series: [
|
||||
{
|
||||
id: id,
|
||||
name: "name",
|
||||
slug: "slug",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
deleted_at: "deleted_at"
|
||||
}
|
||||
],
|
||||
songs: [
|
||||
{
|
||||
id: id,
|
||||
title: "title",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
deleted_at: "deleted_at"
|
||||
}
|
||||
],
|
||||
videos: [
|
||||
{
|
||||
id: id,
|
||||
basename: "basename",
|
||||
filename: "filename",
|
||||
path: "path",
|
||||
size: size,
|
||||
mimetype: "mimetype",
|
||||
resolution: resolution,
|
||||
nc: nc,
|
||||
subbed: subbed,
|
||||
lyrics: lyrics,
|
||||
uncen: uncen,
|
||||
source: "source",
|
||||
overlap: "overlap",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
deleted_at: "deleted_at",
|
||||
tags: "tags",
|
||||
link: "link"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl https://api.animethemes.moe/search?q=
|
||||
```
|
||||
@@ -0,0 +1,52 @@
|
||||
---
|
||||
title: Anime Destroy
|
||||
---
|
||||
|
||||
# Anime Destroy Endpoint
|
||||
|
||||
The anime destroy endpoint soft deletes an anime and returns the deleted anime resource.
|
||||
|
||||
For example, the `/anime/bakemonogatari` endpoint will soft delete the Bakemonogatari anime and return the deleted Bakemonogatari resource.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
DELETE /anime/{slug}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: delete anime
|
||||
|
||||
**Roles with Permission**: Wiki Editor, Encoder, Admin
|
||||
|
||||
**Other Requirements**: Anime must not be soft deleted
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
anime: {
|
||||
id: id,
|
||||
name: "name",
|
||||
slug: "slug",
|
||||
year: year,
|
||||
season: "season",
|
||||
media_format: "media_format",
|
||||
synopsis: "synopsis",
|
||||
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/anime/bakemonogatari
|
||||
```
|
||||
@@ -0,0 +1,39 @@
|
||||
---
|
||||
title: Anime Force Delete
|
||||
---
|
||||
|
||||
# Anime Force Delete Endpoint
|
||||
|
||||
The anime force delete endpoint hard deletes an anime and returns a confirmation message.
|
||||
|
||||
For example, the `/forceDelete/anime/bakemonogatari` endpoint will hard delete the Bakemonogatari anime and return a confirmation message.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
DELETE /forceDelete/anime/{slug}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: force delete anime
|
||||
|
||||
**Roles with Permission**: Admin
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
message: "The Anime 'Bakemonogatari' was deleted.",
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X DELETE -H "Authorization: Bearer {token}" https://api.animethemes.moe/forceDelete/anime/bakemonogatari
|
||||
```
|
||||
@@ -0,0 +1,84 @@
|
||||
---
|
||||
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] |
|
||||
| media_format | Enum | No | The media format of the anime [Unknown, TV, TV Short, OVA, Movie, Special, ONA] |
|
||||
| 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.group
|
||||
* animethemes.song
|
||||
* animethemes.song.artists
|
||||
* images
|
||||
* resources
|
||||
* series
|
||||
* studios
|
||||
|
||||
## Allowed Pivots
|
||||
|
||||
* animeresource
|
||||
|
||||
## Endpoints
|
||||
|
||||
**[Anime Destroy](/wiki/anime/destroy/)**
|
||||
|
||||
The anime destroy endpoint soft deletes an anime and returns the deleted anime resource.
|
||||
|
||||
**[Anime Force Delete](/wiki/anime/forceDelete/)**
|
||||
|
||||
The anime force delete endpoint hard deletes an anime and returns a confirmation message.
|
||||
|
||||
**[Anime Index](/wiki/anime/index/)**
|
||||
|
||||
The anime index endpoint displays a listing of anime resources.
|
||||
|
||||
**[Anime Restore](/wiki/anime/restore/)**
|
||||
|
||||
The anime restore endpoint restores a soft deleted anime and returns the restored anime resource.
|
||||
|
||||
**[Anime Show](/wiki/anime/show/)**
|
||||
|
||||
The anime show endpoint returns an anime resource.
|
||||
|
||||
**[Anime Store](/wiki/anime/store/)**
|
||||
|
||||
The anime store endpoint creates a new anime and returns the new anime resource.
|
||||
|
||||
**[Anime Update](/wiki/anime/update/)**
|
||||
|
||||
The anime update endpoint updates an anime and returns the updated anime resource.
|
||||
|
||||
**[Year Show](/wiki/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](/wiki/animeyear/index/)**
|
||||
|
||||
The year index endpoint returns a list of unique years from all anime resources.
|
||||
@@ -0,0 +1,103 @@
|
||||
---
|
||||
title: Anime Index
|
||||
---
|
||||
|
||||
# Anime Index Endpoint
|
||||
|
||||
The anime index endpoint returns a listing of anime resources.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /anime/
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
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 |
|
||||
| q | No | The query to search for matching anime 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 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 |
|
||||
| media_format | Sort resources on the media format 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 |
|
||||
| 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 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 |
|
||||
| media_format | Filter resources on the media format of the anime |
|
||||
| synopsis | Filter resources on the brief summary of the anime |
|
||||
| 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
|
||||
{
|
||||
anime: [
|
||||
{
|
||||
id: id,
|
||||
name: "name",
|
||||
slug: "slug",
|
||||
year: year,
|
||||
season: "season",
|
||||
media_format: "media_format",
|
||||
synopsis: "synopsis",
|
||||
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/anime/
|
||||
```
|
||||
@@ -0,0 +1,52 @@
|
||||
---
|
||||
title: Anime Restore
|
||||
---
|
||||
|
||||
# Anime Restore Endpoint
|
||||
|
||||
The anime restore endpoint restores a soft deleted anime and returns the restored anime resource.
|
||||
|
||||
For example, the `/restore/anime/bakemonogatari` endpoint will restore the soft deleted Bakemonogatari anime and return the restored Bakemonogatari resource.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
PATCH /restore/anime/{slug}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: restore anime
|
||||
|
||||
**Roles with Permission**: Wiki Editor, Encoder, Admin
|
||||
|
||||
**Other Requirements**: Anime must be soft deleted
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
anime: {
|
||||
id: id,
|
||||
name: "name",
|
||||
slug: "slug",
|
||||
year: year,
|
||||
season: "season",
|
||||
media_format: "media_format",
|
||||
synopsis: "synopsis",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
deleted_at: "deleted_at"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X PATCH -H "Authorization: Bearer {token}" https://api.animethemes.moe/restore/anime/bakemonogatari
|
||||
```
|
||||
@@ -0,0 +1,53 @@
|
||||
---
|
||||
title: Anime Show
|
||||
---
|
||||
|
||||
# Anime Show Endpoint
|
||||
|
||||
The anime show endpoint returns an anime resource.
|
||||
|
||||
For example, the `/anime/bakemonogatari` endpoint will return the Bakemonogatari resource for the Bakemonogatari anime.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /anime/{slug}
|
||||
```
|
||||
|
||||
## 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
|
||||
{
|
||||
anime: {
|
||||
id: id,
|
||||
name: "name",
|
||||
slug: "slug",
|
||||
year: year,
|
||||
season: "season",
|
||||
media_format: "media_format",
|
||||
synopsis: "synopsis",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
deleted_at: "deleted_at"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl https://api.animethemes.moe/anime/bakemonogatari
|
||||
```
|
||||
@@ -0,0 +1,57 @@
|
||||
---
|
||||
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&media_format=tv` 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, Encoder, Admin
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Rules |
|
||||
| :----------: | :------: | :---------------------------------------------------------- |
|
||||
| name | Yes | string, max:192 |
|
||||
| season | Yes | EnumValue [Winter, Spring, Summer, Fall] |
|
||||
| media_format | Yes | EnumValue [Unknown, TV, TV Short, OVA, Movie, Special, ONA] |
|
||||
| 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",
|
||||
media_format: "media_format",
|
||||
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/
|
||||
```
|
||||
@@ -0,0 +1,59 @@
|
||||
---
|
||||
title: Anime Update
|
||||
---
|
||||
|
||||
# Anime Update Endpoint
|
||||
|
||||
The anime update endpoint updates an anime and returns the updated anime resource.
|
||||
|
||||
For example, the `/anime/bakemonogatari?synopsis=updated+text` endpoint will update the Bakemonogatari anime synopsis attribute and return the updated Bakemonogatari resource.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
PUT|PATCH /anime/{slug}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: update anime
|
||||
|
||||
**Roles with Permission**: Wiki Editor, Encoder, Admin
|
||||
|
||||
**Other Requirements**: Anime must not be soft deleted
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Rules |
|
||||
| :----------: | :------: | :---------------------------------------------------------- |
|
||||
| name | No | string, max:192 |
|
||||
| season | No | EnumValue [Winter, Spring, Summer, Fall] |
|
||||
| media_format | No | EnumValue [Unknown, TV, TV Short, OVA, Movie, Special, ONA] |
|
||||
| slug | No | string, max:192, alpha_dash, unique |
|
||||
| synopsis | No | string, max:65535 |
|
||||
| year | No | integer, digits:4, min:1960, max:[current year + 1] |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
anime: {
|
||||
id: id,
|
||||
name: "name",
|
||||
slug: "slug",
|
||||
year: year,
|
||||
season: "season",
|
||||
media_format: "media_format",
|
||||
synopsis: "synopsis",
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
deleted_at: "deleted_at"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X PATCH -H "Authorization: Bearer {token}" https://api.animethemes.moe/anime/bakemonogatari
|
||||
```
|
||||
@@ -0,0 +1,39 @@
|
||||
---
|
||||
title: Anime Image Destroy
|
||||
---
|
||||
|
||||
# Anime Image Destroy Endpoint
|
||||
|
||||
The anime image destroy endpoint deletes an anime image and returns the deleted anime image resource.
|
||||
|
||||
For example, the `/animeimage/bakemonogatari/435` endpoint will delete the association between the Bakemonogatari anime and the large cover image of id 435.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
DELETE /animeimage/{anime:slug}/{image:id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: delete anime, delete image
|
||||
|
||||
**Roles with Permission**: Wiki Editor, Encoder, Admin
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
message: "Image 'OoMI35OjrpjORDlWJvFAZzQOD0vIH1oBQClClSIU.png' has been detached from Anime 'Bakemonogatari'.",
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X DELETE -H "Authorization: Bearer {token}" https://api.animethemes.moe/animeimage/bakemonogatari/435
|
||||
```
|
||||
@@ -0,0 +1,39 @@
|
||||
---
|
||||
title: Anime Image
|
||||
---
|
||||
|
||||
# Anime Image
|
||||
|
||||
---
|
||||
|
||||
An anime image API resource represents the association between an anime and an image.
|
||||
|
||||
## Fields
|
||||
|
||||
| Name | Type | Nullable | Default | Description |
|
||||
| :--------: | :-----: | :------: | :-----: | :------------------------------------------- |
|
||||
| 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
|
||||
|
||||
* anime
|
||||
* image
|
||||
|
||||
## Endpoints
|
||||
|
||||
**[Anime Image Destroy](/wiki/animeimage/destroy/)**
|
||||
|
||||
The anime image destroy endpoint deletes an anime image and returns the deleted anime image resource.
|
||||
|
||||
**[Anime Image Index](/wiki/animeimage/index/)**
|
||||
|
||||
The anime image index endpoint displays a listing of anime image resources.
|
||||
|
||||
**[Anime Image Show](/wiki/animeimage/show/)**
|
||||
|
||||
The anime image show endpoint returns an anime image resource.
|
||||
|
||||
**[Anime Image Store](/wiki/animeimage/store/)**
|
||||
|
||||
The anime image store endpoint creates a new anime image and returns the new anime image resource.
|
||||
@@ -0,0 +1,76 @@
|
||||
---
|
||||
title: Anime Image Index
|
||||
---
|
||||
|
||||
# Anime Image Index Endpoint
|
||||
|
||||
The anime image index endpoint returns a listing of anime image resources.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /animeimage/
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
| :----------: | :------: | :---------------------------------------------------------------------------------- |
|
||||
| fields | No | Sparse fieldsets for resource types |
|
||||
| filter | No | Filters for anime image resources & constraining the inclusion of related resources |
|
||||
| include | No | Inclusion of related resources |
|
||||
| page[number] | No | The page of anime image resources to display |
|
||||
| page[size] | No | The number of anime image resources to display for the current page |
|
||||
| sort | No | The list of fields to sort the resources |
|
||||
|
||||
## Allowed Sort Fields
|
||||
|
||||
| Name | Description |
|
||||
| :--------: | :------------------------------------------------ |
|
||||
| created_at | Sort resources on the resource creation date |
|
||||
| updated_at | Sort resources on the resource last modified date |
|
||||
|
||||
## Filters
|
||||
|
||||
| Name | Description |
|
||||
| :--------: | :--------------------------------------------------------- |
|
||||
| created_at | Filter resources on the resource creation date |
|
||||
| updated_at | Filter resources on the resource last modified date |
|
||||
| has | Filter resources on relations within allowed include paths |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
animeimages: [
|
||||
{
|
||||
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/animeimage/
|
||||
```
|
||||
@@ -0,0 +1,40 @@
|
||||
---
|
||||
title: Anime Image Show
|
||||
---
|
||||
|
||||
# Anime Image Show Endpoint
|
||||
|
||||
The anime image show endpoint returns an anime image resource.
|
||||
|
||||
For example, the `/animeimage/bakemonogatari/435` endpoint will return the anime image resource for the association between the Bakemonogatari anime and the large cover image of id 435.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /animeimage/{anime:slug}/{image:id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
animeimage: {
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl https://api.animethemes.moe/animeimage/bakemonogatari/435
|
||||
```
|
||||
@@ -0,0 +1,42 @@
|
||||
---
|
||||
title: Anime Image Store
|
||||
---
|
||||
|
||||
# Anime Image Store Endpoint
|
||||
|
||||
The anime image store endpoint creates a new anime image and returns the new anime image resource.
|
||||
|
||||
For example, the `/animeimage/bakemonogatari/435` endpoint will create a new association between the Bakemonogatari anime and the large cover image of id 435.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
POST /animeimage/{anime:slug}/{image:id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: create anime, create image
|
||||
|
||||
**Roles with Permission**: Wiki Editor, Encoder, Admin
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
animeimage: {
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X POST -H "Authorization: Bearer {token}" https://api.animethemes.moe/animeimage/bakemonogatari/435
|
||||
```
|
||||
@@ -0,0 +1,39 @@
|
||||
---
|
||||
title: Anime Resource Destroy
|
||||
---
|
||||
|
||||
# Anime Resource Destroy Endpoint
|
||||
|
||||
The anime resource destroy endpoint deletes an anime resource and returns the deleted anime resource resource.
|
||||
|
||||
For example, the `/animeresource/bakemonogatari/1083` endpoint will delete the association between the Bakemonogatari anime and the external resource of id 1083.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
DELETE /animeresource/{anime:slug}/{resource:id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: delete anime, delete external resource
|
||||
|
||||
**Roles with Permission**: Wiki Editor, Encoder, Admin
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
message: "Resource 'https://myanimelist.net/anime/5081' has been detached from Anime 'Bakemonogatari'.",
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X DELETE -H "Authorization: Bearer {token}" https://api.animethemes.moe/animeresource/bakemonogatari/1083
|
||||
```
|
||||
@@ -0,0 +1,44 @@
|
||||
---
|
||||
title: Anime Resource
|
||||
---
|
||||
|
||||
# Anime Resource
|
||||
|
||||
---
|
||||
|
||||
An anime resource API resource represents the association between an anime and an external resource.
|
||||
|
||||
## Fields
|
||||
|
||||
| Name | Type | Nullable | Default | Description |
|
||||
| :--------: | :-----: | :------: | :-----: | :------------------------------------------------------- |
|
||||
| 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 |
|
||||
| as | String | No | Yes | Used to distinguish resources that map to the same anime |
|
||||
|
||||
## Allowed Include Paths
|
||||
|
||||
* anime
|
||||
* resource
|
||||
|
||||
## Endpoints
|
||||
|
||||
**[Anime Resource Destroy](/wiki/animeresource/destroy/)**
|
||||
|
||||
The anime resource destroy endpoint deletes an anime resource and returns the deleted anime resource resource.
|
||||
|
||||
**[Anime Resource Index](/wiki/animeresource/index/)**
|
||||
|
||||
The anime resource index endpoint displays a listing of anime resource resources.
|
||||
|
||||
**[Anime Resource Show](/wiki/animeresource/show/)**
|
||||
|
||||
The anime resource show endpoint returns an anime resource resource.
|
||||
|
||||
**[Anime Resource Store](/wiki/animeresource/store/)**
|
||||
|
||||
The anime resource store endpoint creates a new anime resource and returns the new anime resource resource.
|
||||
|
||||
**[Anime Resource Update](/wiki/animeresource/update/)**
|
||||
|
||||
The anime resource update endpoint updates an anime resource and returns the updated anime resource resource.
|
||||
@@ -0,0 +1,79 @@
|
||||
---
|
||||
title: Anime Resource Index
|
||||
---
|
||||
|
||||
# Anime Resource Index Endpoint
|
||||
|
||||
The anime resource index endpoint returns a listing of anime resource resources.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /animeresource/
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
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 resource resources to display |
|
||||
| page[size] | No | The number of anime resource resources to display for the current page |
|
||||
| sort | No | The list of fields to sort the resources |
|
||||
|
||||
## Allowed Sort Fields
|
||||
|
||||
| Name | Description |
|
||||
| :--------: | :------------------------------------------------ |
|
||||
| created_at | Sort resources on the resource creation date |
|
||||
| updated_at | Sort resources on the resource last modified date |
|
||||
| as | Sort resources on distinguishing label |
|
||||
|
||||
## Filters
|
||||
|
||||
| Name | Description |
|
||||
| :--------: | :--------------------------------------------------------- |
|
||||
| created_at | Filter resources on the resource creation date |
|
||||
| updated_at | Filter resources on the resource last modified date |
|
||||
| as | Filter resources on the resource distinguishing label |
|
||||
| has | Filter resources on relations within allowed include paths |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
animeresources: [
|
||||
{
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
as: "as"
|
||||
},
|
||||
...
|
||||
],
|
||||
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/animeresource/
|
||||
```
|
||||
@@ -0,0 +1,41 @@
|
||||
---
|
||||
title: Anime Resource Show
|
||||
---
|
||||
|
||||
# Anime Resource Show Endpoint
|
||||
|
||||
The anime resource show endpoint returns an anime resource resource.
|
||||
|
||||
For example, the `/animeresource/bakemonogatari/1083` endpoint will return the anime resource resource for the association between the Bakemonogatari anime and the external resource of id 1083.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /animeresource/{anime:slug}/{resource:id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
animeresource: {
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
as: "as"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl https://api.animethemes.moe/animeresource/bakemonogatari/1083
|
||||
```
|
||||
@@ -0,0 +1,45 @@
|
||||
---
|
||||
title: Anime Resource Store
|
||||
---
|
||||
|
||||
# Anime Resource Store Endpoint
|
||||
|
||||
The anime resource store endpoint creates a new anime resource and returns the new anime resource resource.
|
||||
|
||||
For example, the `/animeresource/bakemonogatari/1083` endpoint will create a new association between the Bakemonogatari anime and the external resource of id 1083.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
POST /animeresource/{anime:slug}/{resource:id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: create anime, create external resource
|
||||
|
||||
**Roles with Permission**: Wiki Editor, Encoder, Admin
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Rules |
|
||||
| :--: | :------: | :-------------- |
|
||||
| as | No | string, max:192 |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
animeresource: {
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
as: "as"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X POST -H "Authorization: Bearer {token}" https://api.animethemes.moe/animeresource/bakemonogatari/1083
|
||||
```
|
||||
@@ -0,0 +1,45 @@
|
||||
---
|
||||
title: Anime Resource Update
|
||||
---
|
||||
|
||||
# Anime Resource Update Endpoint
|
||||
|
||||
The anime resource store endpoint updates an anime resource and returns the updated anime resource resource.
|
||||
|
||||
For example, the `/animeresource/bakemonogatari/1083?as=updated+label` endpoint will update the association between the Bakemonogatari anime and the external resource of id 1083.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
PUT|PATCH /animeresource/{anime:slug}/{resource:id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: update anime, update external resource
|
||||
|
||||
**Roles with Permission**: Wiki Editor, Encoder, Admin
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Rules |
|
||||
| :---------: | :------: | :-------------- |
|
||||
| as | No | string, max:192 |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
animeresource: {
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at",
|
||||
as: "as"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X PATCH -H "Authorization: Bearer {token}" https://api.animethemes.moe/animeresource/
|
||||
```
|
||||
@@ -0,0 +1,39 @@
|
||||
---
|
||||
title: Anime Series Destroy
|
||||
---
|
||||
|
||||
# Anime Series Destroy Endpoint
|
||||
|
||||
The anime series destroy endpoint deletes an anime series and returns the deleted anime series resource.
|
||||
|
||||
For example, the `/animeseries/bakemonogatari/monogatari` endpoint will delete the association between the Bakemonogatari anime and the Monogatari series.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
DELETE /animeseries/{anime:slug}/{series:slug}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: delete anime, delete series
|
||||
|
||||
**Roles with Permission**: Wiki Editor, Encoder, Admin
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
message: "Anime 'Bakemonogatari' has been detached from Series 'Monogatari'.",
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X DELETE -H "Authorization: Bearer {token}" https://api.animethemes.moe/animeseries/bakemonogatari/monogatari
|
||||
```
|
||||
@@ -0,0 +1,39 @@
|
||||
---
|
||||
title: Anime Series
|
||||
---
|
||||
|
||||
# Anime Series
|
||||
|
||||
---
|
||||
|
||||
An anime series API resource represents the association between an anime and a series.
|
||||
|
||||
## Fields
|
||||
|
||||
| Name | Type | Nullable | Default | Description |
|
||||
| :--------: | :-----: | :------: | :-----: | :------------------------------------------- |
|
||||
| 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
|
||||
|
||||
* anime
|
||||
* series
|
||||
|
||||
## Endpoints
|
||||
|
||||
**[Anime Series Destroy](/wiki/animeseries/destroy/)**
|
||||
|
||||
The anime series destroy endpoint deletes an anime series and returns the deleted anime series resource.
|
||||
|
||||
**[Anime Series Index](/wiki/animeseries/index/)**
|
||||
|
||||
The anime series index endpoint displays a listing of anime series resources.
|
||||
|
||||
**[Anime Series Show](/wiki/animeseries/show/)**
|
||||
|
||||
The anime series show endpoint returns an anime series resource.
|
||||
|
||||
**[Anime Series Store](/wiki/animeseries/store/)**
|
||||
|
||||
The anime series store endpoint creates a new anime series and returns the new anime series resource.
|
||||
@@ -0,0 +1,76 @@
|
||||
---
|
||||
title: Anime Series Index
|
||||
---
|
||||
|
||||
# Anime Series Index Endpoint
|
||||
|
||||
The anime series index endpoint returns a listing of anime series resources.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /animeseries/
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
| :----------: | :------: | :----------------------------------------------------------------------------------- |
|
||||
| fields | No | Sparse fieldsets for resource types |
|
||||
| filter | No | Filters for anime series resources & constraining the inclusion of related resources |
|
||||
| include | No | Inclusion of related resources |
|
||||
| page[number] | No | The page of anime series resources to display |
|
||||
| page[size] | No | The number of anime series resources to display for the current page |
|
||||
| sort | No | The list of fields to sort the resources |
|
||||
|
||||
## Allowed Sort Fields
|
||||
|
||||
| Name | Description |
|
||||
| :--------: | :------------------------------------------------ |
|
||||
| created_at | Sort resources on the resource creation date |
|
||||
| updated_at | Sort resources on the resource last modified date |
|
||||
|
||||
## Filters
|
||||
|
||||
| Name | Description |
|
||||
| :--------: | :--------------------------------------------------------- |
|
||||
| created_at | Filter resources on the resource creation date |
|
||||
| updated_at | Filter resources on the resource last modified date |
|
||||
| has | Filter resources on relations within allowed include paths |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
animeseries: [
|
||||
{
|
||||
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/animeseries/
|
||||
```
|
||||
@@ -0,0 +1,40 @@
|
||||
---
|
||||
title: Anime Series Show
|
||||
---
|
||||
|
||||
# Anime Series Show Endpoint
|
||||
|
||||
The anime series show endpoint returns an anime series resource.
|
||||
|
||||
For example, the `/animeseries/bakemonogatari/monogatari` endpoint will return the anime series resource for the association between the Bakemonogatari anime and the Monogatari series.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /animeseries/{anime:slug}/{series:slug}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
animeseries: {
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl https://api.animethemes.moe/animeseries/bakemonogatari/monogatari
|
||||
```
|
||||
@@ -0,0 +1,42 @@
|
||||
---
|
||||
title: Anime Series Store
|
||||
---
|
||||
|
||||
# Anime Series Store Endpoint
|
||||
|
||||
The anime series store endpoint creates a new anime series and returns the new anime series resource.
|
||||
|
||||
For example, the `/animeseries/bakemonogatari/monogatari` endpoint will create a new association between the Bakemonogatari anime and the Monogatari series.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
POST /animeseries/{anime:slug}/{series:slug}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: create anime, create series
|
||||
|
||||
**Roles with Permission**: Wiki Editor, Encoder, Admin
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
animeseries: {
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X POST -H "Authorization: Bearer {token}" https://api.animethemes.moe/animeseries/bakemonogatari/monogatari
|
||||
```
|
||||
@@ -0,0 +1,39 @@
|
||||
---
|
||||
title: Anime Studio Destroy
|
||||
---
|
||||
|
||||
# Anime Studio Destroy Endpoint
|
||||
|
||||
The anime studio destroy endpoint deletes an anime studio and returns the deleted anime studio resource.
|
||||
|
||||
For example, the `/animestudio/bakemonogatari/shaft` endpoint will delete the association between the Bakemonogatari anime and the Shaft studio.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
DELETE /animestudio/{anime:slug}/{studio:slug}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: delete anime, delete studio
|
||||
|
||||
**Roles with Permission**: Wiki Editor, Encoder, Admin
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
message: "Anime 'Bakemonogatari' has been detached from Studio 'Shaft'.",
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X DELETE -H "Authorization: Bearer {token}" https://api.animethemes.moe/animestudio/bakemonogatari/shaft
|
||||
```
|
||||
@@ -0,0 +1,39 @@
|
||||
---
|
||||
title: Anime Studio
|
||||
---
|
||||
|
||||
# Anime Studio
|
||||
|
||||
---
|
||||
|
||||
An anime studio API resource represents the association between an anime and a studio.
|
||||
|
||||
## Fields
|
||||
|
||||
| Name | Type | Nullable | Default | Description |
|
||||
| :--------: | :-----: | :------: | :-----: | :------------------------------------------- |
|
||||
| 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
|
||||
|
||||
* anime
|
||||
* studio
|
||||
|
||||
## Endpoints
|
||||
|
||||
**[Anime Studio Destroy](/wiki/animestudio/destroy/)**
|
||||
|
||||
The anime studio destroy endpoint deletes an anime studio and returns the deleted anime studio resource.
|
||||
|
||||
**[Anime Studio Index](/wiki/animestudio/index/)**
|
||||
|
||||
The anime studio index endpoint displays a listing of anime studio resources.
|
||||
|
||||
**[Anime Studio Show](/wiki/animestudio/show/)**
|
||||
|
||||
The anime studio show endpoint returns an anime studio resource.
|
||||
|
||||
**[Anime Studio Store](/wiki/animestudio/store/)**
|
||||
|
||||
The anime studio store endpoint creates a new anime studio and returns the new anime studio resource.
|
||||
@@ -0,0 +1,76 @@
|
||||
---
|
||||
title: Anime Studio Index
|
||||
---
|
||||
|
||||
# Anime Studio Index Endpoint
|
||||
|
||||
The anime studio index endpoint returns a listing of anime studio resources.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /animestudio/
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
| Name | Required | Description |
|
||||
| :----------: | :------: | :----------------------------------------------------------------------------------- |
|
||||
| fields | No | Sparse fieldsets for resource types |
|
||||
| filter | No | Filters for anime studio resources & constraining the inclusion of related resources |
|
||||
| include | No | Inclusion of related resources |
|
||||
| page[number] | No | The page of anime studio resources to display |
|
||||
| page[size] | No | The number of anime studio resources to display for the current page |
|
||||
| sort | No | The list of fields to sort the resources |
|
||||
|
||||
## Allowed Sort Fields
|
||||
|
||||
| Name | Description |
|
||||
| :--------: | :------------------------------------------------ |
|
||||
| created_at | Sort resources on the resource creation date |
|
||||
| updated_at | Sort resources on the resource last modified date |
|
||||
|
||||
## Filters
|
||||
|
||||
| Name | Description |
|
||||
| :--------: | :--------------------------------------------------------- |
|
||||
| created_at | Filter resources on the resource creation date |
|
||||
| updated_at | Filter resources on the resource last modified date |
|
||||
| has | Filter resources on relations within allowed include paths |
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
animestudios: [
|
||||
{
|
||||
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/animestudio/
|
||||
```
|
||||
@@ -0,0 +1,40 @@
|
||||
---
|
||||
title: Anime Studio Show
|
||||
---
|
||||
|
||||
# Anime Studio Show Endpoint
|
||||
|
||||
The anime studio show endpoint returns an anime studio resource.
|
||||
|
||||
For example, the `/animestudio/bakemonogatari/shaft` endpoint will return the anime studio resource for the association between the Bakemonogatari anime and the Shaft studio.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
GET /animestudio/{anime:slug}/{studio:slug}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
None
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
animestudio: {
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl https://api.animethemes.moe/animestudio/bakemonogatari/shaft
|
||||
```
|
||||
@@ -0,0 +1,42 @@
|
||||
---
|
||||
title: Anime Studio Store
|
||||
---
|
||||
|
||||
# Anime Studio Store Endpoint
|
||||
|
||||
The anime studio store endpoint creates a new anime studio and returns the new anime studio resource.
|
||||
|
||||
For example, the `/animestudio/bakemonogatari/shaft` endpoint will create a new association between the Bakemonogatari anime and the Shaft studio.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
POST /animestudio/{anime:slug}/{studio:slug}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: create anime, create studio
|
||||
|
||||
**Roles with Permission**: Wiki Editor, Encoder, Admin
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
animestudio: {
|
||||
created_at: "created_at",
|
||||
updated_at: "updated_at"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X POST -H "Authorization: Bearer {token}" https://api.animethemes.moe/animestudio/bakemonogatari/shaft
|
||||
```
|
||||
@@ -0,0 +1,48 @@
|
||||
---
|
||||
title: Anime Synonym Destroy
|
||||
---
|
||||
|
||||
# Anime Synonym Destroy Endpoint
|
||||
|
||||
The anime synonym destroy endpoint soft deletes an anime synonym and returns the deleted anime synonym resource.
|
||||
|
||||
For example, the `/animesynonym/1523` endpoint will soft delete the Monstory synonym for the Bakemonogatari anime and return the deleted anime synonym resource.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
DELETE /animesynonym/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: delete anime synonym
|
||||
|
||||
**Roles with Permission**: Wiki Editor, Encoder, Admin
|
||||
|
||||
**Other Requirements**: Anime synonym must not be soft deleted
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
animesynonym: {
|
||||
id: id,
|
||||
text: "text",
|
||||
type: "type",
|
||||
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/animesynonym/1523
|
||||
```
|
||||
@@ -0,0 +1,39 @@
|
||||
---
|
||||
title: Anime Synonym Force Delete
|
||||
---
|
||||
|
||||
# Anime Synonym Force Delete Endpoint
|
||||
|
||||
The anime synonym force delete endpoint hard deletes an anime synonym and returns a confirmation message.
|
||||
|
||||
For example, the `/forceDelete/animesynonym/1523` endpoint will hard delete the Monstory synonym for the Bakemonogatari anime and return a confirmation message.
|
||||
|
||||
## URL
|
||||
|
||||
```sh
|
||||
DELETE /forceDelete/animesynonym/{id}
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
**Required Permission**: force delete anime synonym
|
||||
|
||||
**Roles with Permission**: Admin
|
||||
|
||||
## Parameters
|
||||
|
||||
None
|
||||
|
||||
## Response
|
||||
|
||||
```json
|
||||
{
|
||||
message: "The AnimeSynonym 'Monstory' was deleted.",
|
||||
}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
curl -X DELETE -H "Authorization: Bearer {token}" https://api.animethemes.moe/forceDelete/animesynonym/1523
|
||||
```
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user