From 65d1e186aa01f736a24131f344bb3e7908e96827 Mon Sep 17 00:00:00 2001 From: paranarimasu <33796518+paranarimasu@users.noreply.github.com> Date: Tue, 29 Jun 2021 23:06:37 -0500 Subject: [PATCH] first pass on remaining endpoints --- docs/.vuepress/config.js | 152 ++++++++++++++++++++++++++++++ docs/anime/README.md | 16 ++-- docs/anime/index/README.md | 6 +- docs/anime/show/README.md | 6 +- docs/announcement/README.md | 35 +++++++ docs/announcement/index/README.md | 84 +++++++++++++++++ docs/announcement/show/README.md | 51 ++++++++++ docs/artist/README.md | 9 +- docs/artist/index/README.md | 8 +- docs/artist/show/README.md | 6 +- docs/balance/README.md | 37 ++++++++ docs/balance/index/README.md | 96 +++++++++++++++++++ docs/balance/show/README.md | 55 +++++++++++ docs/entry/README.md | 45 ++++----- docs/entry/index/README.md | 49 +++++----- docs/entry/show/README.md | 28 +++--- docs/image/README.md | 40 ++++++++ docs/image/index/README.md | 93 ++++++++++++++++++ docs/image/show/README.md | 57 +++++++++++ docs/resource/README.md | 39 ++++++++ docs/resource/index/README.md | 91 ++++++++++++++++++ docs/resource/show/README.md | 56 +++++++++++ docs/search/README.md | 146 ++++++++++++++++++++++++++++ docs/series/README.md | 36 +++++++ docs/series/index/README.md | 88 +++++++++++++++++ docs/series/show/README.md | 54 +++++++++++ docs/song/README.md | 38 ++++++++ docs/song/index/README.md | 86 +++++++++++++++++ docs/song/show/README.md | 53 +++++++++++ docs/synonym/README.md | 35 +++++++ docs/synonym/index/README.md | 87 +++++++++++++++++ docs/synonym/show/README.md | 53 +++++++++++ docs/theme/README.md | 43 +++++++++ docs/theme/index/README.md | 97 +++++++++++++++++++ docs/theme/show/README.md | 56 +++++++++++ docs/transaction/README.md | 37 ++++++++ docs/transaction/index/README.md | 95 +++++++++++++++++++ docs/transaction/show/README.md | 55 +++++++++++ docs/video/README.md | 50 ++++++++++ docs/video/index/README.md | 117 +++++++++++++++++++++++ docs/video/show/README.md | 66 +++++++++++++ docs/year/index/README.md | 44 +++++++++ docs/year/show/README.md | 102 ++++++++++++++++++++ 43 files changed, 2411 insertions(+), 86 deletions(-) create mode 100644 docs/announcement/README.md create mode 100644 docs/announcement/index/README.md create mode 100644 docs/announcement/show/README.md create mode 100644 docs/balance/README.md create mode 100644 docs/balance/index/README.md create mode 100644 docs/balance/show/README.md create mode 100644 docs/image/README.md create mode 100644 docs/image/index/README.md create mode 100644 docs/image/show/README.md create mode 100644 docs/resource/README.md create mode 100644 docs/resource/index/README.md create mode 100644 docs/resource/show/README.md create mode 100644 docs/search/README.md create mode 100644 docs/series/README.md create mode 100644 docs/series/index/README.md create mode 100644 docs/series/show/README.md create mode 100644 docs/song/README.md create mode 100644 docs/song/index/README.md create mode 100644 docs/song/show/README.md create mode 100644 docs/synonym/README.md create mode 100644 docs/synonym/index/README.md create mode 100644 docs/synonym/show/README.md create mode 100644 docs/theme/README.md create mode 100644 docs/theme/index/README.md create mode 100644 docs/theme/show/README.md create mode 100644 docs/transaction/README.md create mode 100644 docs/transaction/index/README.md create mode 100644 docs/transaction/show/README.md create mode 100644 docs/video/README.md create mode 100644 docs/video/index/README.md create mode 100644 docs/video/show/README.md create mode 100644 docs/year/index/README.md create mode 100644 docs/year/show/README.md diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 9f03423..a337ac6 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -24,6 +24,28 @@ module.exports = { { title: 'Index', to: '/anime/index/' + }, + { + title: 'Year Index', + to: '/year/index/' + }, + { + title: 'Year Show', + to: '/year/show/' + } + ] + }, + 'announcement': { + title: 'Resource', + to: '/announcement', + children: [ + { + title: 'Show', + to: '/announcement/show/', + }, + { + title: 'Index', + to: '/announcement/index/' } ] }, @@ -41,6 +63,20 @@ module.exports = { } ] }, + 'balance': { + title: 'Resource', + to: '/balance', + children: [ + { + title: 'Show', + to: '/balance/show/', + }, + { + title: 'Index', + to: '/balance/index/' + } + ] + }, 'entry': { title: 'Resource', to: '/entry', @@ -55,6 +91,122 @@ module.exports = { } ] }, + 'image': { + title: 'Resource', + to: '/image', + children: [ + { + title: 'Show', + to: '/image/show/', + }, + { + title: 'Index', + to: '/image/index/' + } + ] + }, + 'resource': { + title: 'Resource', + to: '/resource', + children: [ + { + title: 'Show', + to: '/resource/show/', + }, + { + title: 'Index', + to: '/resource/index/' + } + ] + }, + 'series': { + title: 'Resource', + to: '/series', + children: [ + { + title: 'Show', + to: '/series/show/', + }, + { + title: 'Index', + to: '/series/index/' + } + ] + }, + 'song': { + title: 'Resource', + to: '/song', + children: [ + { + title: 'Show', + to: '/song/show/', + }, + { + title: 'Index', + to: '/song/index/' + } + ] + }, + 'synonym': { + title: 'Resource', + to: '/synonym', + children: [ + { + title: 'Show', + to: '/synonym/show/', + }, + { + title: 'Index', + to: '/synonym/index/' + } + ] + }, + 'theme': { + title: 'Resource', + to: '/theme', + children: [ + { + title: 'Show', + to: '/theme/show/', + }, + { + title: 'Index', + to: '/theme/index/' + } + ] + }, + 'transaction': { + title: 'Resource', + to: '/transaction', + children: [ + { + title: 'Show', + to: '/transaction/show/', + }, + { + title: 'Index', + to: '/transaction/index/' + } + ] + }, + 'video': { + title: 'Resource', + to: '/video', + children: [ + { + title: 'Show', + to: '/video/show/', + }, + { + title: 'Index', + to: '/video/index/' + } + ] + }, + 'wiki': { + title: 'Global Search', + to: '/search' + } } }, title: 'AnimeThemes' diff --git a/docs/anime/README.md b/docs/anime/README.md index ab32cc7..44d90e0 100644 --- a/docs/anime/README.md +++ b/docs/anime/README.md @@ -6,7 +6,9 @@ title: Anime --- -An Anime API Resource represents a production with at least one opening or ending sequence. +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 @@ -37,16 +39,16 @@ An Anime API Resource represents a production with at least one opening or endin **[Anime Show](/anime/show/)** -The Anime Show endpoint returns an Anime Resource. +The anime show endpoint returns an anime resource. **[Anime Index](/anime/index/)** -The Anime Index endpoint displays a listing of Anime Resources. +The anime index endpoint displays a listing of anime resources. -**Year Show** +**[Year Show](/year/show/)** -The Year Show endpoint +The year show endpoint return a listing of anime resources for a given year grouped by season and ordered by name. -**Year Index** +**[Year Index](/year/index/)** -The Year Index endpoint \ No newline at end of file +The year index endpoint returns a list of unique years from all anime resources. \ No newline at end of file diff --git a/docs/anime/index/README.md b/docs/anime/index/README.md index 21779df..6761470 100644 --- a/docs/anime/index/README.md +++ b/docs/anime/index/README.md @@ -6,7 +6,7 @@ title: Anime Index # Anime Index Endpoint -The Anime Index endpoint returns a listing of Anime Resources. +The anime index endpoint returns a listing of anime resources. ## URL @@ -21,7 +21,7 @@ GET /api/anime/ | fields | No | Sparse fieldsets for resource types | | include | No | Inclusion of related resources | | filter | No | Filters for anime resources & constraining the inclusion of related resources | -| sort | No | The list of fields to sort the anime resources | +| sort | No | The list of fields to sort the resources. Ignored if search query is present. | | q | No | The query to search for matching anime resources | | page[size] | No | The number of anime resources to display for the current page | | page[number] | No | The page of anime resources to display | @@ -62,7 +62,7 @@ Status: 200 synopsis: "synopsis", created_at: "created_at", updated_at: "updated_at", - deleted_at: "deleted_at", + deleted_at: "deleted_at" }, ... ], diff --git a/docs/anime/show/README.md b/docs/anime/show/README.md index c92936a..4489935 100644 --- a/docs/anime/show/README.md +++ b/docs/anime/show/README.md @@ -6,7 +6,9 @@ title: Anime Show # Anime Show Endpoint -The Anime Show endpoint returns an Anime Resource. +The anime show endpoint returns an anime resource. + +For example, the `/api/anime/bakemonogatari` endpoint will return the Bakemonogatari resource for the Bakemonogatari anime. ## URL @@ -37,7 +39,7 @@ Status: 200 synopsis: "synopsis", created_at: "created_at", updated_at: "updated_at", - deleted_at: "deleted_at", + deleted_at: "deleted_at" } } ``` diff --git a/docs/announcement/README.md b/docs/announcement/README.md new file mode 100644 index 0000000..3a3d52b --- /dev/null +++ b/docs/announcement/README.md @@ -0,0 +1,35 @@ +--- +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 | Description | +| :--------: | :-----: | :-------------------------------------------------------------- | +| id | Integer | The primary key of the resource | +| content | String | The announcement text | +| created_at | Date | The date that the resource was created | +| updated_at | Date | The date that the resource was last modified | +| deleted_at | Date | The date that the resource was deleted | + +### Allowed Include Paths + +None + +### Endpoints + +**[Announcement Show](/announcement/show/)** + +The announcement show endpoint returns an announcement resource. + +**[Announcement Index](/announcement/index/)** + +The announcement index endpoint displays a listing of announcement resources. \ No newline at end of file diff --git a/docs/announcement/index/README.md b/docs/announcement/index/README.md new file mode 100644 index 0000000..dc51da8 --- /dev/null +++ b/docs/announcement/index/README.md @@ -0,0 +1,84 @@ +--- +title: Announcement Index +--- + + + +# Announcement Index Endpoint + +The announcement index endpoint returns a listing of announcement resources. + +## URL + +```sh +GET /api/announcement/ +``` + +## Parameters + +| Name | Required | Description | +| :----------: | :------: | :----------------------------------------------------------------------------------- | +| fields | No | Sparse fieldsets for resource types | +| include | No | Inclusion of related resources | +| filter | No | Filters for announcement resources & constraining the inclusion of related resources | +| sort | No | The list of fields to sort the announcement resources | +| page[size] | No | The number of announcement resources to display for the current page | +| page[number] | No | The page of announcement resources to display | + +## Allowed Sort Fields + +* announcement_id +* created_at +* updated_at +* deleted_at + +## Filters + +* created_at +* updated_at +* deleted_at +* trashed status + +## Response + +```json +Status: 200 + +{ + announcements: [ + { + id: id, + content: "content", + 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 + } +} +``` + + + + +```bash +curl https://staging.animethemes.moe/api/announcement/ +``` + + + + + \ No newline at end of file diff --git a/docs/announcement/show/README.md b/docs/announcement/show/README.md new file mode 100644 index 0000000..832df70 --- /dev/null +++ b/docs/announcement/show/README.md @@ -0,0 +1,51 @@ +--- +title: Announcement Show +--- + + + +# Announcement Show Endpoint + +The announcement show endpoint returns an announcement resource. + +## URL + +```sh +GET /api/announcement/{id} +``` + +## Parameters + +| Name | Required | Description | +| :-----: | :------: | :------------------------------------------------------ | +| fields | No | Sparse fieldsets for resource types | +| include | No | Inclusion of related resources | +| filter | No | Filters to constrain the inclusion of related resources | + +## Response + +```json +Status: 200 + +{ + announcement: { + id: id, + content: "content", + created_at: "created_at", + updated_at: "updated_at", + deleted_at: "deleted_at" + } +} +``` + + + + +```bash +curl https://staging.animethemes.moe/api/announcement/1 +``` + + + + + \ No newline at end of file diff --git a/docs/artist/README.md b/docs/artist/README.md index 5560994..a04a498 100644 --- a/docs/artist/README.md +++ b/docs/artist/README.md @@ -6,7 +6,9 @@ title: Artist --- -An Artist API Resource represents a musical performer of Anime sequences. +An artist API resource represents a musical performer of anime sequences. + +For example, Chiwa Saito is the musical performer of the Bakemonogatari OP1 theme, among many others. ### Fields @@ -15,6 +17,7 @@ An Artist API Resource represents a musical performer of Anime sequences. | id | Integer | The primary key of the resource | | name | String | The primary title of the artist | | slug | String | The URL slug & route key of the resource | +| as | String | Used to distinguish a performance by alias, character or group | | created_at | Date | The date that the resource was created | | updated_at | Date | The date that the resource was last modified | | deleted_at | Date | The date that the resource was deleted | @@ -33,8 +36,8 @@ An Artist API Resource represents a musical performer of Anime sequences. **[Artist Show](/artist/show/)** -The Artist Show endpoint returns an Artist Resource. +The artist show endpoint returns an artist resource. **[Artist Index](/artist/index/)** -The Artist Index endpoint displays a listing of Artist Resources. \ No newline at end of file +The artist index endpoint displays a listing of artist resources. \ No newline at end of file diff --git a/docs/artist/index/README.md b/docs/artist/index/README.md index 7fb7291..7f3d671 100644 --- a/docs/artist/index/README.md +++ b/docs/artist/index/README.md @@ -1,4 +1,4 @@ ---- +0--- title: Artist Index --- @@ -6,7 +6,7 @@ title: Artist Index # Artist Index Endpoint -The Artist Index endpoint returns a listing of Artist Resources. +The artist index endpoint returns a listing of artist resources. ## URL @@ -21,7 +21,7 @@ GET /api/artist/ | fields | No | Sparse fieldsets for resource types | | include | No | Inclusion of related resources | | filter | No | Filters for artist resources & constraining the inclusion of related resources | -| sort | No | The list of fields to sort the artist resources | +| sort | No | The list of fields to sort the resources. Ignored if search query is present. | | q | No | The query to search for matching artist resources | | page[size] | No | The number of artist resources to display for the current page | | page[number] | No | The page of artist resources to display | @@ -55,7 +55,7 @@ Status: 200 slug: "slug", created_at: "created_at", updated_at: "updated_at", - deleted_at: "deleted_at", + deleted_at: "deleted_at" }, ... ], diff --git a/docs/artist/show/README.md b/docs/artist/show/README.md index 986d5b2..52cb139 100644 --- a/docs/artist/show/README.md +++ b/docs/artist/show/README.md @@ -6,7 +6,9 @@ title: Artist Show # Artist Show Endpoint -The Artist Show endpoint returns an Artist Resource. +The artist show endpoint returns an artist resource. + +For example, the `/api/artist/chiwa_saito` endpoint will return the artist resource for the artist Chiwa Saito. ## URL @@ -34,7 +36,7 @@ Status: 200 slug: "slug", created_at: "created_at", updated_at: "updated_at", - deleted_at: "deleted_at", + deleted_at: "deleted_at" } } ``` diff --git a/docs/balance/README.md b/docs/balance/README.md new file mode 100644 index 0000000..d14911d --- /dev/null +++ b/docs/balance/README.md @@ -0,0 +1,37 @@ +--- +title: Balance +--- + +# Balance + +--- + +A balance API resource represents an account balance against usage or upcoming charges for the given month. + +### Fields + +| Name | Type | Description | +| :-------------------: | :-----: | :------------------------------------------------------------------------------------------------------- | +| id | Integer | The primary key of the resource | +| date | Date | The given month that the account balance applies to | +| service | Enum | The service that is billing AnimeThemes {Other, DigitalOcean, AWS, Hover, WalkerServers} | +| frequency | Enum | The frequency that AnimeThemes is billed by the service {Once, Annually, Biannually, Quarterly, Monthly} | +| usage | Decimal | The amount of services consumed by AnimeThemes in the billing period | +| month_to_date_balance | Decimal | The balance of the AnimeThemes account with consideration to usage | +| created_at | Date | The date that the resource was created | +| updated_at | Date | The date that the resource was last modified | +| deleted_at | Date | The date that the resource was deleted | + +### Allowed Include Paths + +None + +### Endpoints + +**[Balance Show](/balance/show/)** + +The balance show endpoint returns a balance resource. + +**[Balance Index](/balance/index/)** + +The balance index endpoint displays a listing of balance resources. \ No newline at end of file diff --git a/docs/balance/index/README.md b/docs/balance/index/README.md new file mode 100644 index 0000000..67109be --- /dev/null +++ b/docs/balance/index/README.md @@ -0,0 +1,96 @@ +--- +title: Balance Index +--- + + + +# Balance Index Endpoint + +The balance index endpoint returns a listing of balance resources. + +## URL + +```sh +GET /api/balance/ +``` + +## Parameters + +| Name | Required | Description | +| :----------: | :------: | :---------------------------------------------------------------------------- | +| fields | No | Sparse fieldsets for resource types | +| include | No | Inclusion of related resources | +| filter | No | Filters for balance resources & constraining the inclusion of related resources | +| sort | No | The list of fields to sort the balance resources | +| page[size] | No | The number of balance resources to display for the current page | +| page[number] | No | The page of balance resources to display | + +## Allowed Sort Fields + +* balance_id +* date +* service +* frequency +* usage +* month_to_date_balance +* created_at +* updated_at +* deleted_at + +## Filters + +* date +* service +* frequency +* created_at +* updated_at +* deleted_at +* trashed status + +## Response + +```json +Status: 200 + +{ + balances: [ + { + id: id, + date: "date", + service: "service", + frequency: "frequency", + usage: usage, + month_to_date_balance: month_to_date_balance, + created_at: "created_at", + updated_at: "updated_at", + deleted_at: "deleted_at" + }, + ... + ], + links: { + first: "first", + last: "last", + prev: "prev", + next: "next" + }, + meta: { + current_page: current_page, + from: from, + path: "path", + per_page: per_page, + to: to + } +} +``` + + + + +```bash +curl https://staging.animethemes.moe/api/balance/ +``` + + + + + \ No newline at end of file diff --git a/docs/balance/show/README.md b/docs/balance/show/README.md new file mode 100644 index 0000000..6540f1b --- /dev/null +++ b/docs/balance/show/README.md @@ -0,0 +1,55 @@ +--- +title: Balance Show +--- + + + +# Balance Show Endpoint + +The balance show endpoint returns a balance resource. + +## URL + +```sh +GET /api/balance/{id} +``` + +## Parameters + +| Name | Required | Description | +| :-----: | :------: | :------------------------------------------------------ | +| fields | No | Sparse fieldsets for resource types | +| include | No | Inclusion of related resources | +| filter | No | Filters to constrain the inclusion of related resources | + +## Response + +```json +Status: 200 + +{ + balance: { + id: id, + date: "date", + service: "service", + frequency: "frequency", + usage: usage, + month_to_date_balance: month_to_date_balance, + created_at: "created_at", + updated_at: "updated_at", + deleted_at: "deleted_at" + } +} +``` + + + + +```bash +curl https://staging.animethemes.moe/api/balance/1 +``` + + + + + \ No newline at end of file diff --git a/docs/entry/README.md b/docs/entry/README.md index ab32cc7..f4e5c59 100644 --- a/docs/entry/README.md +++ b/docs/entry/README.md @@ -1,52 +1,41 @@ --- -title: Anime +title: Entry --- -# Anime +# Entry --- -An Anime API Resource represents a production with at least one opening or ending sequence. +An entry API resource represents a version of an anime theme. + +For example, the Bakemonogatari ED theme has three entries to represent three versions. ### Fields | Name | Type | Description | | :--------: | :-----: | :-------------------------------------------------------------- | | id | Integer | The primary key of the resource | -| name | String | The primary title of the anime | -| slug | String | The URL slug & route key of the resource | -| year | Integer | The premiere year of the anime | -| season | Enum | The premiere season of the anime {Winter, Spring, Summer, Fall} | -| synopsis | String | The brief summary of the anime | +| version | Integer | The version number of the theme | +| episodes | String | The URL slug & route key of the resource | +| nsfw | Boolean | Is not safe for work content included? | +| spoiler | Boolean | Is content included that may spoil the viewer? | +| notes | String | Any additional information for this sequence | | created_at | Date | The date that the resource was created | | updated_at | Date | The date that the resource was last modified | | deleted_at | Date | The date that the resource was deleted | ### Allowed Include Paths -* synonyms -* series -* themes -* themes.entries.videos -* themes.song -* themes.song.artists -* resources -* images +* theme +* theme.anime +* videos ### Endpoints -**[Anime Show](/anime/show/)** +**[Entry Show](/entry/show/)** -The Anime Show endpoint returns an Anime Resource. +The entry show endpoint returns an entry resource. -**[Anime Index](/anime/index/)** +**[Entry Index](/entry/index/)** -The Anime Index endpoint displays a listing of Anime Resources. - -**Year Show** - -The Year Show endpoint - -**Year Index** - -The Year Index endpoint \ No newline at end of file +The entry index endpoint displays a listing of entry resources. \ No newline at end of file diff --git a/docs/entry/index/README.md b/docs/entry/index/README.md index 21779df..67956a5 100644 --- a/docs/entry/index/README.md +++ b/docs/entry/index/README.md @@ -1,17 +1,17 @@ --- -title: Anime Index +title: Entry Index --- -# Anime Index Endpoint +# Entry Index Endpoint -The Anime Index endpoint returns a listing of Anime Resources. +The entry index endpoint returns a listing of entry resources. ## URL ```sh -GET /api/anime/ +GET /api/entry/ ``` ## Parameters @@ -20,27 +20,28 @@ GET /api/anime/ | :----------: | :------: | :---------------------------------------------------------------------------- | | fields | No | Sparse fieldsets for resource types | | include | No | Inclusion of related resources | -| filter | No | Filters for anime resources & constraining the inclusion of related resources | -| sort | No | The list of fields to sort the anime resources | -| q | No | The query to search for matching anime resources | -| page[size] | No | The number of anime resources to display for the current page | -| page[number] | No | The page of anime resources to display | +| filter | No | Filters for entry resources & constraining the inclusion of related resources | +| sort | No | The list of fields to sort the resources. Ignored if search query is present. | +| q | No | The query to search for matching entry resources | +| page[size] | No | The number of entry resources to display for the current page | +| page[number] | No | The page of entry resources to display | ## Allowed Sort Fields -* anime_id -* name -* slug -* year -* season +* entry_id +* theme_id +* version +* nsfw +* spoiler * created_at * updated_at * deleted_at ## Filters -* year -* season +* version +* nsfw +* spoiler * created_at * updated_at * deleted_at @@ -52,17 +53,17 @@ GET /api/anime/ Status: 200 { - anime: [ + entries: [ { id: id, - name: "name", - slug: "slug", - year: year, - season: "season", - synopsis: "synopsis", + version: version, + episodes: "episodes", + nsfw: nsfw, + spoiler: spoiler, + notes: "notes", created_at: "created_at", updated_at: "updated_at", - deleted_at: "deleted_at", + deleted_at: "deleted_at" }, ... ], @@ -86,7 +87,7 @@ Status: 200 ```bash -curl https://staging.animethemes.moe/api/anime/ +curl https://staging.animethemes.moe/api/entry/ ``` diff --git a/docs/entry/show/README.md b/docs/entry/show/README.md index c92936a..e631b29 100644 --- a/docs/entry/show/README.md +++ b/docs/entry/show/README.md @@ -1,18 +1,20 @@ --- -title: Anime Show +title: Entry Show --- -# Anime Show Endpoint +# Entry Show Endpoint -The Anime Show endpoint returns an Anime Resource. +The entry show endpoint returns an entry resource. + +For example, the `/api/entry/3822` endpoint will return the second version of the Bakemonogatari ED theme. ## URL ```sh -GET /api/anime/{slug} -``` +GET /api/entry/{id} +```00 ## Parameters @@ -28,16 +30,16 @@ GET /api/anime/{slug} Status: 200 { - anime: { + entry: { id: id, - name: "name", - slug: "slug", - year: year, - season: "season", - synopsis: "synopsis", + version: version, + episodes: "episodes", + nsfw: nsfw, + spoiler: spoiler, + notes: "notes", created_at: "created_at", updated_at: "updated_at", - deleted_at: "deleted_at", + deleted_at: "deleted_at" } } ``` @@ -46,7 +48,7 @@ Status: 200 ```bash -curl https://staging.animethemes.moe/api/anime/bakemonogatari +curl https://staging.animethemes.moe/api/entry/3822 ``` diff --git a/docs/image/README.md b/docs/image/README.md new file mode 100644 index 0000000..4d0d7cc --- /dev/null +++ b/docs/image/README.md @@ -0,0 +1,40 @@ +--- +title: Image +--- + +# Image + +--- + +An image API resource represents a visual component for another resource such as an anime or artist. + +For example, the Bakemonogatari anime has two images to represent small and large cover images. + +### Fields + +| Name | Type | Description | +| :--------: | :-----: | :------------------------------------------------------------------------- | +| id | Integer | The primary key of the resource | +| path | String | The path of the file in storage | +| size | Integer | The size of the file in storage in Bytes | +| mimetype | String | The media type of the file in storage | +| facet | Enum | The component that the resource is intended for {Small Cover, Large Cover} | +| link | String | The URL to stream the file from storage | +| created_at | Date | The date that the resource was created | +| updated_at | Date | The date that the resource was last modified | +| deleted_at | Date | The date that the resource was deleted | + +### Allowed Include Paths + +* anime +* artists + +### Endpoints + +**[Image Show](/image/show/)** + +The image show endpoint returns an image resource. + +**[Image Index](/image/index/)** + +The image index endpoint displays a listing of image resources. \ No newline at end of file diff --git a/docs/image/index/README.md b/docs/image/index/README.md new file mode 100644 index 0000000..829138c --- /dev/null +++ b/docs/image/index/README.md @@ -0,0 +1,93 @@ +--- +title: Image Index +--- + + + +# Image Index Endpoint + +The image index endpoint returns a listing of image resources. + +## URL + +```sh +GET /api/image/ +``` + +## Parameters + +| Name | Required | Description | +| :----------: | :------: | :---------------------------------------------------------------------------- | +| fields | No | Sparse fieldsets for resource types | +| include | No | Inclusion of related resources | +| filter | No | Filters for image resources & constraining the inclusion of related resources | +| sort | No | The list of fields to sort the image resources | +| page[size] | No | The number of image resources to display for the current page | +| page[number] | No | The page of image resources to display | + +## Allowed Sort Fields + +* image_id +* path +* size +* mimetype +* facet +* created_at +* updated_at +* deleted_at + +## Filters + +* facet +* created_at +* updated_at +* deleted_at +* trashed status + +## Response + +```json +Status: 200 + +{ + images: [ + { + id: id, + path: "path", + size: size, + mimetype: "mimetype", + facet: "facet", + created_at: "created_at", + updated_at: "updated_at", + deleted_at: "deleted_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 + } +} +``` + + + + +```bash +curl https://staging.animethemes.moe/api/image/ +``` + + + + + \ No newline at end of file diff --git a/docs/image/show/README.md b/docs/image/show/README.md new file mode 100644 index 0000000..ec8ee7f --- /dev/null +++ b/docs/image/show/README.md @@ -0,0 +1,57 @@ +--- +title: Image Show +--- + + + +# Image Show Endpoint + +The image show endpoint returns an image resource. + +For example, `/api/image/435` endpoint will return the large cover image for the Bakemonogatari anime. + +## URL + +```sh +GET /api/image/{id} +``` + +## Parameters + +| Name | Required | Description | +| :-----: | :------: | :------------------------------------------------------ | +| fields | No | Sparse fieldsets for resource types | +| include | No | Inclusion of related resources | +| filter | No | Filters to constrain the inclusion of related resources | + +## Response + +```json +Status: 200 + +{ + image: { + id: id, + path: "path", + size: size, + mimetype: "mimetype", + facet: "facet", + created_at: "created_at", + updated_at: "updated_at", + deleted_at: "deleted_at", + link: "link" + } +} +``` + + + + +```bash +curl https://staging.animethemes.moe/api/image/435 +``` + + + + + \ No newline at end of file diff --git a/docs/resource/README.md b/docs/resource/README.md new file mode 100644 index 0000000..06dcf52 --- /dev/null +++ b/docs/resource/README.md @@ -0,0 +1,39 @@ +--- +title: Resource +--- + +# Resource + +--- + +An external API resource represents a site with supplementary information for another resource such as an anime or artist. + +For example, the Bakemonogatari anime has MyAnimeList, AniList and AniDB resources. + +### Fields + +| Name | Type | Description | +| :---------: | :-----: | :------------------------------------------------------------------------- | +| id | Integer | The primary key of the resource | +| link | String | The URL of the external site | +| external_id | Integer | The primary key of the resource in the external site | +| site | Enum | The external site that the resource belongs to {Official Website, Twitter, AniDB, Anilist, Anime-Planet, Anime News Network, Kitsu, MyAnimeList, Wikipedia} | +| as | String | Used to distinguish resources that map to the same artist or anime | +| created_at | Date | The date that the resource was created | +| updated_at | Date | The date that the resource was last modified | +| deleted_at | Date | The date that the resource was deleted | + +### Allowed Include Paths + +* anime +* artists + +### Endpoints + +**[Resource Show](/resource/show/)** + +The resource show endpoint returns an external resource. + +**[Resource Index](/resource/index/)** + +The resource index endpoint displays a listing of external resources. \ No newline at end of file diff --git a/docs/resource/index/README.md b/docs/resource/index/README.md new file mode 100644 index 0000000..abe5c27 --- /dev/null +++ b/docs/resource/index/README.md @@ -0,0 +1,91 @@ +--- +title: Resource Index +--- + + + +# Resource Index Endpoint + +The resource index endpoint returns a listing of external resources. + +## URL + +```sh +GET /api/resource/ +``` + +## Parameters + +| Name | Required | Description | +| :----------: | :------: | :------------------------------------------------------------------------------- | +| fields | No | Sparse fieldsets for resource types | +| include | No | Inclusion of related resources | +| filter | No | Filters for external resources & constraining the inclusion of related resources | +| sort | No | The list of fields to sort the external resources | +| page[size] | No | The number of external resources to display for the current page | +| page[number] | No | The page of external resources to display | + +## Allowed Sort Fields + +* resource_id +* link +* external_id +* site +* created_at +* updated_at +* deleted_at + +## Filters + +* site +* created_at +* updated_at +* deleted_at +* trashed status + +## Response + +```json +Status: 200 + +{ + resources: [ + { + id: id, + link: "link", + external_id: external_id, + site: "site", + created_at: "created_at", + updated_at: "updated_at", + deleted_at: "deleted_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 + } +} +``` + + + + +```bash +curl https://staging.animethemes.moe/api/resource/ +``` + + + + + \ No newline at end of file diff --git a/docs/resource/show/README.md b/docs/resource/show/README.md new file mode 100644 index 0000000..43a9934 --- /dev/null +++ b/docs/resource/show/README.md @@ -0,0 +1,56 @@ +--- +title: Resource Show +--- + + + +# Resource Show Endpoint + +The resource show endpoint returns an external resource. + +For example, the `/api/resource/1083` will return the MyAnimeList resource for the Bakemonogatari anime. + +## URL + +```sh +GET /api/resource/{id} +``` + +## Parameters + +| Name | Required | Description | +| :-----: | :------: | :------------------------------------------------------ | +| fields | No | Sparse fieldsets for resource types | +| include | No | Inclusion of related resources | +| filter | No | Filters to constrain the inclusion of related resources | + +## Response + +```json +Status: 200 + +{ + resource: { + id: id, + link: "link", + external_id: external_id, + site: "site", + created_at: "created_at", + updated_at: "updated_at", + deleted_at: "deleted_at", + link: "link" + } +} +``` + + + + +```bash +curl https://staging.animethemes.moe/api/resource/1083 +``` + + + + + \ No newline at end of file diff --git a/docs/search/README.md b/docs/search/README.md new file mode 100644 index 0000000..ec6426c --- /dev/null +++ b/docs/search/README.md @@ -0,0 +1,146 @@ +--- +title: Global Search +--- + + + +# Global Search Endpoint + +The global search endpoint returns a listing of wiki resources that match a given search term. + +## URL + +```sh +GET /api/search/ +``` + +## Parameters + +| Name | Required | Description | +| :----------: | :------: | :--------------------------------------------------------------------------- | +| fields | No | Sparse fieldsets for resource types | +| include[type] | No | Inclusion of related resources by type | +| filter | No | Filters for wiki resources & constraining the inclusion of related resources | +| q | Yes | The query to search for matching wiki resources | +| limit | No | The maximum number of wiki resource matches to return | + +## Response + +```json +Status: 200 + +{ + search: { + anime: [ + { + id: id, + name: "name", + slug: "slug", + year: year, + season: "season", + synopsis: "synopsis", + created_at: "created_at", + updated_at: "updated_at", + deleted_at: "deleted_at" + } + ], + artists: [ + { + id: id, + name: "name", + slug: "slug", + created_at: "created_at", + updated_at: "updated_at", + deleted_at: "deleted_at" + } + ], + entries: [ + { + id: id, + version: version, + episodes: "episodes", + nsfw: nsfw, + spoiler: spoiler, + notes: "notes", + 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" + } + ], + synonyms: [ + { + id: id, + text: "text", + created_at: "created_at", + updated_at: "updated_at", + deleted_at: "deleted_at" + } + ], + themes: [ + { + id: id, + type: "type", + sequence: sequence, + group: "group", + slug: "slug", + 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" + } + ] + } +} +``` + + + + +```bash +curl https://staging.animethemes.moe/api/search?q= +``` + + + + + \ No newline at end of file diff --git a/docs/series/README.md b/docs/series/README.md new file mode 100644 index 0000000..1c53cf8 --- /dev/null +++ b/docs/series/README.md @@ -0,0 +1,36 @@ +--- +title: Series +--- + +# Series + +--- + +A series API resource represents a collection of related anime. + +For example, the Monogatari series is the collection of the Bakemonogatari anime and its related productions. + +### Fields + +| Name | Type | Description | +| :--------: | :-----: | :-------------------------------------------------------------- | +| id | Integer | The primary key of the resource | +| name | String | The primary title of the series | +| slug | String | The URL slug & route key of the resource | +| created_at | Date | The date that the resource was created | +| updated_at | Date | The date that the resource was last modified | +| deleted_at | Date | The date that the resource was deleted | + +### Allowed Include Paths + +* anime + +### Endpoints + +**[Series Show](/series/show/)** + +The series show endpoint returns a series resource. + +**[Series Index](/series/index/)** + +The series index endpoint displays a listing of series resources. \ No newline at end of file diff --git a/docs/series/index/README.md b/docs/series/index/README.md new file mode 100644 index 0000000..fd8568b --- /dev/null +++ b/docs/series/index/README.md @@ -0,0 +1,88 @@ +--- +title: Series Index +--- + + + +# Series Index Endpoint + +The series index endpoint returns a listing of series resources. + +## URL + +```sh +GET /api/series/ +``` + +## Parameters + +| Name | Required | Description | +| :----------: | :------: | :----------------------------------------------------------------------------- | +| fields | No | Sparse fieldsets for resource types | +| include | No | Inclusion of related resources | +| filter | No | Filters for series resources & constraining the inclusion of related resources | +| sort | No | The list of fields to sort the resources. Ignored if search query is present. | +| q | No | The query to search for matching series resources | +| page[size] | No | The number of series resources to display for the current page | +| page[number] | No | The page of series resources to display | + +## Allowed Sort Fields + +* series_id +* name +* slug +* created_at +* updated_at +* deleted_at + +## Filters + +* created_at +* updated_at +* deleted_at +* trashed status + +## Response + +```json +Status: 200 + +{ + series: [ + { + 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 + } +} +``` + + + + +```bash +curl https://staging.animethemes.moe/api/series/ +``` + + + + + \ No newline at end of file diff --git a/docs/series/show/README.md b/docs/series/show/README.md new file mode 100644 index 0000000..4de1dcb --- /dev/null +++ b/docs/series/show/README.md @@ -0,0 +1,54 @@ +--- +title: Series Show +--- + + + +# Series Show Endpoint + +The series show endpoint returns a series resource. + +For example, the `/api/series/monogatari` endpoint will return the series resource for the Monogatari series. + +## URL + +```sh +GET /api/series/{slug} +``` + +## Parameters + +| Name | Required | Description | +| :-----: | :------: | :------------------------------------------------------ | +| fields | No | Sparse fieldsets for resource types | +| include | No | Inclusion of related resources | +| filter | No | Filters to constrain the inclusion of related resources | + +## Response + +```json +Status: 200 + +{ + series: { + id: id, + name: "name", + slug: "slug", + created_at: "created_at", + updated_at: "updated_at", + deleted_at: "deleted_at" + } +} +``` + + + + +```bash +curl https://staging.animethemes.moe/api/series/monogatari +``` + + + + + \ No newline at end of file diff --git a/docs/song/README.md b/docs/song/README.md new file mode 100644 index 0000000..f94f37d --- /dev/null +++ b/docs/song/README.md @@ -0,0 +1,38 @@ +--- +title: Song +--- + +# Song + +--- + +A song API resource represents the composition that accompanies an anime theme. + +For example, Staple Stable is the song for the Bakemonogatari OP1 theme. + +### Fields + +| Name | Type | Description | +| :--------: | :-----: | :-------------------------------------------------------------- | +| id | Integer | The primary key of the resource | +| title | String | The name of the composition | +| as | String | Used to distinguish a performance by alias, character or group | +| created_at | Date | The date that the resource was created | +| updated_at | Date | The date that the resource was last modified | +| deleted_at | Date | The date that the resource was deleted | + +### Allowed Include Paths + +* themes +* themes.anime +* artists + +### Endpoints + +**[Song Show](/song/show/)** + +The song show endpoint returns a song resource. + +**[Song Index](/song/index/)** + +The song index endpoint displays a listing of song resources. \ No newline at end of file diff --git a/docs/song/index/README.md b/docs/song/index/README.md new file mode 100644 index 0000000..c10142f --- /dev/null +++ b/docs/song/index/README.md @@ -0,0 +1,86 @@ +--- +title: Song Index +--- + + + +# Song Index Endpoint + +The song index endpoint returns a listing of song resources. + +## URL + +```sh +GET /api/song/ +``` + +## Parameters + +| Name | Required | Description | +| :----------: | :------: | :---------------------------------------------------------------------------- | +| fields | No | Sparse fieldsets for resource types | +| include | No | Inclusion of related resources | +| filter | No | Filters for song resources & constraining the inclusion of related resources | +| sort | No | The list of fields to sort the resources. Ignored if search query is present. | +| q | No | The query to search for matching song resources | +| page[size] | No | The number of song resources to display for the current page | +| page[number] | No | The page of song resources to display | + +## Allowed Sort Fields + +* song_id +* title +* created_at +* updated_at +* deleted_at + +## Filters + +* created_at +* updated_at +* deleted_at +* trashed status + +## Response + +```json +Status: 200 + +{ + songs: [ + { + id: id, + title: "title", + 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 + } +} +``` + + + + +```bash +curl https://staging.animethemes.moe/api/song/ +``` + + + + + \ No newline at end of file diff --git a/docs/song/show/README.md b/docs/song/show/README.md new file mode 100644 index 0000000..afe4758 --- /dev/null +++ b/docs/song/show/README.md @@ -0,0 +1,53 @@ +--- +title: Song Show +--- + + + +# Song Show Endpoint + +The song show endpoint returns a song resource. + +For example, the `/api/song/3373` endpoint will return the song resource for the Staple Stable song. + +## URL + +```sh +GET /api/song/{id} +``` + +## Parameters + +| Name | Required | Description | +| :-----: | :------: | :------------------------------------------------------ | +| fields | No | Sparse fieldsets for resource types | +| include | No | Inclusion of related resources | +| filter | No | Filters to constrain the inclusion of related resources | + +## Response + +```json +Status: 200 + +{ + song: { + id: id, + title: "title", + created_at: "created_at", + updated_at: "updated_at", + deleted_at: "deleted_at" + } +} +``` + + + + +```bash +curl https://staging.animethemes.moe/api/song/3373 +``` + + + + + \ No newline at end of file diff --git a/docs/synonym/README.md b/docs/synonym/README.md new file mode 100644 index 0000000..56c4286 --- /dev/null +++ b/docs/synonym/README.md @@ -0,0 +1,35 @@ +--- +title: Synonym +--- + +# Synonym + +--- + +A synonym API resource represents an alternate title or common abbreviation for an anime. + +For example, the anime Bakemonogatari has the synonym "Ghostory". + +### Fields + +| Name | Type | Description | +| :--------: | :-----: | :-------------------------------------------------------------- | +| id | Integer | The primary key of the resource | +| text | String | The alternate title or common abbreviations | +| created_at | Date | The date that the resource was created | +| updated_at | Date | The date that the resource was last modified | +| deleted_at | Date | The date that the resource was deleted | + +### Allowed Include Paths + +* anime + +### Endpoints + +**[Synonym Show](/synonym/show/)** + +The synonym show endpoint returns a synonym resource. + +**[Synonym Index](/synonym/index/)** + +The synonym index endpoint displays a listing of synonym resources. \ No newline at end of file diff --git a/docs/synonym/index/README.md b/docs/synonym/index/README.md new file mode 100644 index 0000000..81d2f98 --- /dev/null +++ b/docs/synonym/index/README.md @@ -0,0 +1,87 @@ +--- +title: Synonym Index +--- + + + +# Synonym Index Endpoint + +The synonym index endpoint returns a listing of synonym resources. + +## URL + +```sh +GET /api/synonym/ +``` + +## Parameters + +| Name | Required | Description | +| :----------: | :------: | :------------------------------------------------------------------------------ | +| fields | No | Sparse fieldsets for resource types | +| include | No | Inclusion of related resources | +| filter | No | Filters for synonym resources & constraining the inclusion of related resources | +| sort | No | The list of fields to sort the resources. Ignored if search query is present. | +| q | No | The query to search for matching synonym resources | +| page[size] | No | The number of synonym resources to display for the current page | +| page[number] | No | The page of synonym resources to display | + +## Allowed Sort Fields + +* synonym_id +* text +* created_at +* updated_at +* deleted_at +* anime_id + +## Filters + +* created_at +* updated_at +* deleted_at +* trashed status + +## Response + +```json +Status: 200 + +{ + synonyms: [ + { + id: id, + text: "text", + 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 + } +} +``` + + + + +```bash +curl https://staging.animethemes.moe/api/synonym/ +``` + + + + + \ No newline at end of file diff --git a/docs/synonym/show/README.md b/docs/synonym/show/README.md new file mode 100644 index 0000000..3a57ce1 --- /dev/null +++ b/docs/synonym/show/README.md @@ -0,0 +1,53 @@ +--- +title: Synonym Show +--- + + + +# Synonym Show Endpoint + +The synonym show endpoint returns a synonym resource. + +For example, the `/api/synonym/1523` endpoint will return the synonym resource "Ghostory" for the anime Bakemonogatari. + +## URL + +```sh +GET /api/synonym/{id} +``` + +## Parameters + +| Name | Required | Description | +| :-----: | :------: | :------------------------------------------------------ | +| fields | No | Sparse fieldsets for resource types | +| include | No | Inclusion of related resources | +| filter | No | Filters to constrain the inclusion of related resources | + +## Response + +```json +Status: 200 + +{ + synonym: { + id: id, + text: "text", + created_at: "created_at", + updated_at: "updated_at", + deleted_at: "deleted_at" + } +} +``` + + + + +```bash +curl https://staging.animethemes.moe/api/synonym/1523 +``` + + + + + \ No newline at end of file diff --git a/docs/theme/README.md b/docs/theme/README.md new file mode 100644 index 0000000..c544475 --- /dev/null +++ b/docs/theme/README.md @@ -0,0 +1,43 @@ +--- +title: Theme +--- + +# Theme + +--- + +A theme API resource represents an OP or ED sequence for an anime. + +For example, the anime Bakemonogatari has five OP themes and one ED theme. + +### Fields + +| Name | Type | Description | +| :--------: | :-----: | :--------------------------------------------------------------- | +| id | Integer | The primary key of the resource | +| type | Enum | The type of the sequence {OP, ED} | +| sequence | Integer | The numeric ordering of the theme | +| group | String | Used to distinguish sequence belongs to dubs, rebroadcasts, etc. | +| slug | String | The URL slug & route key of the resource | +| created_at | Date | The date that the resource was created | +| updated_at | Date | The date that the resource was last modified | +| deleted_at | Date | The date that the resource was deleted | + +### Allowed Include Paths + +* anime +* anime.images +* entries +* entries.videos +* song +* song.artists + +### Endpoints + +**[Theme Show](/theme/show/)** + +The theme show endpoint returns a theme resource. + +**[Theme Index](/theme/index/)** + +The theme index endpoint displays a listing of theme resources. \ No newline at end of file diff --git a/docs/theme/index/README.md b/docs/theme/index/README.md new file mode 100644 index 0000000..d6e79da --- /dev/null +++ b/docs/theme/index/README.md @@ -0,0 +1,97 @@ +--- +title: Theme Index +--- + + + +# Theme Index Endpoint + +The theme index endpoint returns a listing of theme resources. + +## URL + +```sh +GET /api/theme/ +``` + +## Parameters + +| Name | Required | Description | +| :----------: | :------: | :---------------------------------------------------------------------------- | +| fields | No | Sparse fieldsets for resource types | +| include | No | Inclusion of related resources | +| filter | No | Filters for theme resources & constraining the inclusion of related resources | +| sort | No | The list of fields to sort the resources. Ignored if search query is present. | +| q | No | The query to search for matching theme resources | +| page[size] | No | The number of theme resources to display for the current page | +| page[number] | No | The page of theme resources to display | + +## Allowed Sort Fields + +* theme_id +* type +* sequence +* group +* slug +* created_at +* updated_at +* deleted_at +* anime_id +* song_id + +## Filters + +* type +* sequence +* group +* created_at +* updated_at +* deleted_at +* trashed status + +## Response + +```json +Status: 200 + +{ + themes: [ + { + id: id, + type: "type", + sequence: sequence, + group: "group", + 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 + } +} +``` + + + + +```bash +curl https://staging.animethemes.moe/api/theme/ +``` + + + + + \ No newline at end of file diff --git a/docs/theme/show/README.md b/docs/theme/show/README.md new file mode 100644 index 0000000..92beb9f --- /dev/null +++ b/docs/theme/show/README.md @@ -0,0 +1,56 @@ +--- +title: Theme Show +--- + + + +# Theme Show Endpoint + +The theme show endpoint returns a theme resource. + +For example, the `/api/theme/3373` endpoint will return the theme resource Bakemonogatari OP1. + +## URL + +```sh +GET /api/theme/{id} +``` + +## Parameters + +| Name | Required | Description | +| :-----: | :------: | :------------------------------------------------------ | +| fields | No | Sparse fieldsets for resource types | +| include | No | Inclusion of related resources | +| filter | No | Filters to constrain the inclusion of related resources | + +## Response + +```json +Status: 200 + +{ + theme: { + id: id, + type: "type", + sequence: sequence, + group: "group", + slug: "slug", + created_at: "created_at", + updated_at: "updated_at", + deleted_at: "deleted_at" + } +} +``` + + + + +```bash +curl https://staging.animethemes.moe/api/theme/3373 +``` + + + + + \ No newline at end of file diff --git a/docs/transaction/README.md b/docs/transaction/README.md new file mode 100644 index 0000000..1e6ef76 --- /dev/null +++ b/docs/transaction/README.md @@ -0,0 +1,37 @@ +--- +title: Transaction +--- + +# Transaction + +--- + +A transaction API resource represents an invoice from or a payment to a billing service by AnimeThemes. + +### Fields + +| Name | Type | Description | +| :-------------------: | :-----: | :--------------------------------------------------------------------------------------- | +| id | Integer | The primary key of the resource | +| date | Date | The date that the transaction was made | +| service | Enum | The service that is billing AnimeThemes {Other, DigitalOcean, AWS, Hover, WalkerServers} | +| description | String | The short description of what the transaction is for | +| amount | Decimal | The amount of the transaction billed by or paid to the billing service by AnimeThemes | +| external_id | Integer | The identifier used by the service for the transaction, if applicable | +| created_at | Date | The date that the resource was created | +| updated_at | Date | The date that the resource was last modified | +| deleted_at | Date | The date that the resource was deleted | + +### Allowed Include Paths + +None + +### Endpoints + +**[Transaction Show](/transaction/show/)** + +The transaction show endpoint returns a transaction resource. + +**[Transaction Index](/transaction/index/)** + +The transaction index endpoint displays a listing of transaction resources. \ No newline at end of file diff --git a/docs/transaction/index/README.md b/docs/transaction/index/README.md new file mode 100644 index 0000000..13530b1 --- /dev/null +++ b/docs/transaction/index/README.md @@ -0,0 +1,95 @@ +--- +title: Transaction Index +--- + + + +# Transaction Index Endpoint + +The transaction index endpoint returns a listing of transaction resources. + +## URL + +```sh +GET /api/transaction/ +``` + +## Parameters + +| Name | Required | Description | +| :----------: | :------: | :---------------------------------------------------------------------------------- | +| fields | No | Sparse fieldsets for resource types | +| include | No | Inclusion of related resources | +| filter | No | Filters for transaction resources & constraining the inclusion of related resources | +| sort | No | The list of fields to sort the transaction resources | +| page[size] | No | The number of transaction resources to display for the current page | +| page[number] | No | The page of transaction resources to display | + +## Allowed Sort Fields + +* transaction_id +* date +* service +* description +* amount +* external_id +* created_at +* updated_at +* deleted_at + +## Filters + +* date +* service +* created_at +* updated_at +* deleted_at +* trashed status + +## Response + +```json +Status: 200 + +{ + transactions: [ + { + id: id, + date: "date", + service: "service", + description: "description", + amount: amount, + external_id: external_id, + created_at: "created_at", + updated_at: "updated_at", + deleted_at: "deleted_at" + }, + ... + ], + links: { + first: "first", + last: "last", + prev: "prev", + next: "next" + }, + meta: { + current_page: current_page, + from: from, + path: "path", + per_page: per_page, + to: to + } +} +``` + + + + +```bash +curl https://staging.animethemes.moe/api/transaction/ +``` + + + + + \ No newline at end of file diff --git a/docs/transaction/show/README.md b/docs/transaction/show/README.md new file mode 100644 index 0000000..17d36e7 --- /dev/null +++ b/docs/transaction/show/README.md @@ -0,0 +1,55 @@ +--- +title: Transaction Show +--- + + + +# Transaction Show Endpoint + +The transaction show endpoint returns a transaction resource. + +## URL + +```sh +GET /api/transaction/{id} +``` + +## Parameters + +| Name | Required | Description | +| :-----: | :------: | :------------------------------------------------------ | +| fields | No | Sparse fieldsets for resource types | +| include | No | Inclusion of related resources | +| filter | No | Filters to constrain the inclusion of related resources | + +## Response + +```json +Status: 200 + +{ + transaction: { + id: id, + date: "date", + service: "service", + description: "description", + amount: amount, + external_id: external_id, + created_at: "created_at", + updated_at: "updated_at", + deleted_at: "deleted_at" + } +} +``` + + + + +```bash +curl https://staging.animethemes.moe/api/transaction/1 +``` + + + + + \ No newline at end of file diff --git a/docs/video/README.md b/docs/video/README.md new file mode 100644 index 0000000..bcf3bd6 --- /dev/null +++ b/docs/video/README.md @@ -0,0 +1,50 @@ +--- +title: Video +--- + +# Video + +--- + +A video API resource represents a WebM of an anime theme. + +For example, the video Bakemonogatari-OP1.webm represents the WebM of the Bakemonogatari OP1 theme. + +### Fields + +| Name | Type | Description | +| :--------: | :-----: | :------------------------------------------------------------------------- | +| id | Integer | The primary key of the resource | +| basename | String | The basename of the file in storage | +| filename | String | The filename of the file in storage | +| path | String | The path of the file in storage | +| size | Integer | The size of the file in storage in Bytes | +| mimetype | String | The media type of the file in storage | +| resolution | Integer | The frame height of the file in storage | +| nc | Boolean | Is the video creditless? | +| subbed | Boolean | Does the video include subtitles of dialogue? | +| lyrics | Boolean | Does the video include subtitles of song lyrics? | +| uncen | Boolean | Is the video an uncensored version of a censored sequence? | +| source | Enum | Where did this video come from? {WEB, RAW, BD, DVD, VHS, LD} | +| overlap | Enum | The degree to which the sequence and episode content overlap {None, Transition, Over} | +| tags | String | The attributes used to distinguish the file within the context of a theme | +| link | String | The URL to stream the file from storage | +| created_at | Date | The date that the resource was created | +| updated_at | Date | The date that the resource was last modified | +| deleted_at | Date | The date that the resource was deleted | + +### Allowed Include Paths + +* entries +* entries.theme +* entries.theme.anime + +### Endpoints + +**[Video Show](/video/show/)** + +The video show endpoint returns a video resource. + +**[Video Index](/video/index/)** + +The video index endpoint displays a listing of video resources. \ No newline at end of file diff --git a/docs/video/index/README.md b/docs/video/index/README.md new file mode 100644 index 0000000..9b5e001 --- /dev/null +++ b/docs/video/index/README.md @@ -0,0 +1,117 @@ +--- +title: Video Index +--- + + + +# Video Index Endpoint + +The video index endpoint returns a listing of video resources. + +## URL + +```sh +GET /api/video/ +``` + +## Parameters + +| Name | Required | Description | +| :----------: | :------: | :---------------------------------------------------------------------------- | +| fields | No | Sparse fieldsets for resource types | +| include | No | Inclusion of related resources | +| filter | No | Filters for video resources & constraining the inclusion of related resources | +| sort | No | The list of fields to sort the resources. Ignored if search query is present. | +| q | No | The query to search for matching video resources | +| page[size] | No | The number of video resources to display for the current page | +| page[number] | No | The page of video resources to display | + +## Allowed Sort Fields + +* video_id +* basename +* filename +* path +* size +* mimetype +* resolution +* nc +* subbed +* lyrics +* uncen +* source +* overlap +* created_at +* updated_at +* deleted_at + +## Filters + +* resolution +* nc +* subbed +* lyrics +* uncen +* source +* overlap +* created_at +* updated_at +* deleted_at +* trashed status + +## Response + +```json +Status: 200 + +{ + 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" + }, + ... + ], + links: { + first: "first", + last: "last", + prev: "prev", + next: "next" + }, + meta: { + current_page: current_page, + from: from, + path: "path", + per_page: per_page, + to: to + } +} +``` + + + + +```bash +curl https://staging.animethemes.moe/api/video/ +``` + + + + + \ No newline at end of file diff --git a/docs/video/show/README.md b/docs/video/show/README.md new file mode 100644 index 0000000..bea33e6 --- /dev/null +++ b/docs/video/show/README.md @@ -0,0 +1,66 @@ +--- +title: Video Show +--- + + + +# Video Show Endpoint + +The video show endpoint returns a video resource. + +For example, `/api/video/Bakemonogatari-OP1.webm` endpoint will return the video for the Bakemonogatari OP1 theme. + +## URL + +```sh +GET /api/video/{basename} +``` + +## Parameters + +| Name | Required | Description | +| :-----: | :------: | :------------------------------------------------------ | +| fields | No | Sparse fieldsets for resource types | +| include | No | Inclusion of related resources | +| filter | No | Filters to constrain the inclusion of related resources | + +## Response + +```json +Status: 200 + +{ + video: { + id: id, + basename: "basename", + filename: "filename", + path: "path", + size: size, + mimetype: "mimetype", + resolution: resolution, + nc: nc, + subbed: subbed, + lyrics: lyrics, + uncen: uncen, + source: "source", + overlap: "overlap", + created_at: "created_at", + updated_at: "updated_at", + deleted_at: "deleted_at", + tags: "tags", + link: "link" + } +} +``` + + + + +```bash +curl https://staging.animethemes.moe/api/video/Bakemonogatari-OP1.webm +``` + + + + + \ No newline at end of file diff --git a/docs/year/index/README.md b/docs/year/index/README.md new file mode 100644 index 0000000..60b616d --- /dev/null +++ b/docs/year/index/README.md @@ -0,0 +1,44 @@ +--- +title: Year Index +--- + + + +# Year Index Endpoint + +The year index endpoint returns a list of unique years from all anime resources. + +## URL + +```sh +GET /api/year/ +``` + +## Parameters + +None + +## Response + +```json +Status: 200 + +[ + 1963, + 1964, + 1965, + ... +] +``` + + + + +```bash +curl https://staging.animethemes.moe/api/year/ +``` + + + + + \ No newline at end of file diff --git a/docs/year/show/README.md b/docs/year/show/README.md new file mode 100644 index 0000000..f80f4d1 --- /dev/null +++ b/docs/year/show/README.md @@ -0,0 +1,102 @@ +--- +title: Year Show +--- + + + +# Year Show Endpoint + +The year show endpoint return a listing of anime resources for a given year grouped by season and ordered by name. + +For example, the `/api/year/2000` endpoint will return a listing of anime resources of year 2000 grouped by season and ordered by name. + +## URL + +```sh +GET /api/year/{year} +``` + +## Parameters + +| Name | Required | Description | +| :-----: | :------: | :------------------------------------------------------ | +| fields | No | Sparse fieldsets for resource types | +| include | No | Inclusion of related resources | +| filter | No | Filters to constrain the inclusion of related resources | + +## Response + +```json +Status: 200 + +{ + winter: [ + { + id: id, + name: "name", + slug: "slug", + year: year, + season: "season", + synopsis: "synopsis", + created_at: "created_at", + updated_at: "updated_at", + deleted_at: "deleted_at" + }, + ... + ], + spring: [ + { + id: id, + name: "name", + slug: "slug", + year: year, + season: "season", + synopsis: "synopsis", + created_at: "created_at", + updated_at: "updated_at", + deleted_at: "deleted_at" + }, + ... + ], + summer: [ + { + id: id, + name: "name", + slug: "slug", + year: year, + season: "season", + synopsis: "synopsis", + created_at: "created_at", + updated_at: "updated_at", + deleted_at: "deleted_at" + }, + ... + ], + fall: [ + { + id: id, + name: "name", + slug: "slug", + year: year, + season: "season", + synopsis: "synopsis", + created_at: "created_at", + updated_at: "updated_at", + deleted_at: "deleted_at" + }, + ... + ], +} +``` + + + + +```bash +curl https://staging.animethemes.moe/api/year/2000 +``` + + + + + \ No newline at end of file