diff --git a/docs/.vitepress/config.js b/docs/.vitepress/config.js index 4545ea8..b2ae039 100644 --- a/docs/.vitepress/config.js +++ b/docs/.vitepress/config.js @@ -100,6 +100,7 @@ export default { { text: 'Anime Theme', link: '/wiki/animetheme/' }, { text: 'Anime Theme Entry', link: '/wiki/animethemeentry/' }, { text: 'Artist', link: '/wiki/artist/' }, + { text: 'Artist Image', link: '/wiki/artistimage/' }, { text: 'Audio', link: '/wiki/audio/' }, { text: 'Image', link: '/wiki/image/' }, { text: 'Resource', link: '/wiki/resource/' }, @@ -385,6 +386,17 @@ export default { { text: 'Update', link: '/wiki/artist/update/' } ] }, + { + text: 'Artist Image', + collapsible: true, + items: [ + { text: 'Resource', link: '/wiki/artistimage/' }, + { text: 'Destroy', link: '/wiki/artistimage/destroy/' }, + { text: 'Index', link: '/wiki/artistimage/index/' }, + { text: 'Show', link: '/wiki/artistimage/show/' }, + { text: 'Store', link: '/wiki/artistimage/store/' } + ] + }, { text: 'Audio', collapsible: true, diff --git a/docs/wiki/animeimage/destroy/index.md b/docs/wiki/animeimage/destroy/index.md index f2a89bc..67cd85f 100644 --- a/docs/wiki/animeimage/destroy/index.md +++ b/docs/wiki/animeimage/destroy/index.md @@ -28,10 +28,7 @@ None ```json { - animeimage: { - created_at: "created_at", - updated_at: "updated_at" - } + message: "Image 'OoMI35OjrpjORDlWJvFAZzQOD0vIH1oBQClClSIU.png' has been detached from Anime 'Bakemonogatari'.", } ``` diff --git a/docs/wiki/animeseries/destroy/index.md b/docs/wiki/animeseries/destroy/index.md index aab9afe..7af9a93 100644 --- a/docs/wiki/animeseries/destroy/index.md +++ b/docs/wiki/animeseries/destroy/index.md @@ -28,10 +28,7 @@ None ```json { - animeseries: { - created_at: "created_at", - updated_at: "updated_at" - } + message: "Anime 'Bakemonogatari' has been detached from Series 'Monogatari'.", } ``` diff --git a/docs/wiki/animestudio/destroy/index.md b/docs/wiki/animestudio/destroy/index.md index 3e63257..fbee0b6 100644 --- a/docs/wiki/animestudio/destroy/index.md +++ b/docs/wiki/animestudio/destroy/index.md @@ -28,10 +28,7 @@ None ```json { - animestudio: { - created_at: "created_at", - updated_at: "updated_at" - } + message: "Anime 'Bakemonogatari' has been detached from Studio 'Shaft'.", } ``` diff --git a/docs/wiki/artist/destroy/index.md b/docs/wiki/artist/destroy/index.md index 22dfc3e..76089e4 100644 --- a/docs/wiki/artist/destroy/index.md +++ b/docs/wiki/artist/destroy/index.md @@ -6,7 +6,7 @@ title: Artist Destroy The artist destroy endpoint soft deletes an artist and returns the deleted artist resource. -For example, the `/artist/chiwa_saito` endpoint will soft delete the Chiwa Saito artist and return the deleted Chiwa Saito resource. +For example, the `/artist/chiwa_saitou` endpoint will soft delete the Chiwa Saitou artist and return the deleted Chiwa Saitou resource. ## URL @@ -44,5 +44,5 @@ None ## Example ```bash -curl -X DELETE -H "Authorization: Bearer {token}" https://api.animethemes.moe/artist/chiwa_saito +curl -X DELETE -H "Authorization: Bearer {token}" https://api.animethemes.moe/artist/chiwa_saitou ``` diff --git a/docs/wiki/artist/forceDelete/index.md b/docs/wiki/artist/forceDelete/index.md index f337392..c205ff0 100644 --- a/docs/wiki/artist/forceDelete/index.md +++ b/docs/wiki/artist/forceDelete/index.md @@ -6,7 +6,7 @@ title: Artist Force Delete The artist force delete endpoint hard deletes an artist and returns a confirmation message. -For example, the `/forceDelete/artist/chiwa_saito` endpoint will hard delete the Chiwa Saito artist and return a confirmation message. +For example, the `/forceDelete/artist/chiwa_saitou` endpoint will hard delete the Chiwa Saitou artist and return a confirmation message. ## URL @@ -28,12 +28,12 @@ None ```json { - message: "The Artist 'Chiwa Saito' was deleted.", + message: "The Artist 'Chiwa Saitou' was deleted.", } ``` ## Example ```bash -curl -X DELETE -H "Authorization: Bearer {token}" https://api.animethemes.moe/forceDelete/artist/chiwa_saito +curl -X DELETE -H "Authorization: Bearer {token}" https://api.animethemes.moe/forceDelete/artist/chiwa_saitou ``` diff --git a/docs/wiki/artist/index.md b/docs/wiki/artist/index.md index 71a5054..fb7d39e 100644 --- a/docs/wiki/artist/index.md +++ b/docs/wiki/artist/index.md @@ -8,7 +8,7 @@ title: Artist An artist API resource represents a musical performer of anime sequences. -For example, Chiwa Saito is the musical performer of the Bakemonogatari OP1 theme, among many others. +For example, Chiwa Saitou is the musical performer of the Bakemonogatari OP1 theme, among many others. ## Fields diff --git a/docs/wiki/artist/restore/index.md b/docs/wiki/artist/restore/index.md index 98083d3..4d1f10f 100644 --- a/docs/wiki/artist/restore/index.md +++ b/docs/wiki/artist/restore/index.md @@ -6,7 +6,7 @@ title: Artist Restore The artist restore endpoint restores a soft deleted artist and returns the restored artist resource. -For example, the `/restore/artist/chiwa_saito` endpoint will restore the soft deleted Chiwa Saito artist and return the restored Chiwa Saito resource. +For example, the `/restore/artist/chiwa_saitou` endpoint will restore the soft deleted Chiwa Saitou artist and return the restored Chiwa Saitou resource. ## URL @@ -44,5 +44,5 @@ None ## Example ```bash -curl -X PATCH -H "Authorization: Bearer {token}" https://api.animethemes.moe/restore/artist/chiwa_saito +curl -X PATCH -H "Authorization: Bearer {token}" https://api.animethemes.moe/restore/artist/chiwa_saitou ``` diff --git a/docs/wiki/artist/show/index.md b/docs/wiki/artist/show/index.md index a4a8a72..3ba781c 100644 --- a/docs/wiki/artist/show/index.md +++ b/docs/wiki/artist/show/index.md @@ -6,7 +6,7 @@ title: Artist Show The artist show endpoint returns an artist resource. -For example, the `/artist/chiwa_saito` endpoint will return the artist resource for the artist Chiwa Saito. +For example, the `/artist/chiwa_saitou` endpoint will return the artist resource for the artist Chiwa Saitou. ## URL @@ -45,5 +45,5 @@ None ## Example ```bash -curl https://api.animethemes.moe/artist/chiwa_saito +curl https://api.animethemes.moe/artist/chiwa_saitou ``` diff --git a/docs/wiki/artist/store/index.md b/docs/wiki/artist/store/index.md index bcee7e5..2e43e77 100644 --- a/docs/wiki/artist/store/index.md +++ b/docs/wiki/artist/store/index.md @@ -6,7 +6,7 @@ title: Artist Store The artist store endpoint creates a new artist and returns the new artist resource. -For example, the `/artist?name=Chiwa+Saito&slug=chiwa_saito` endpoint will create a new Chiwa Saito artist and return the new Chiwa Saito resource. +For example, the `/artist?name=Chiwa+Saito&slug=chiwa_saitou` endpoint will create a new Chiwa Saitou artist and return the new Chiwa Saitou resource. ## URL diff --git a/docs/wiki/artist/update/index.md b/docs/wiki/artist/update/index.md index 105c920..41528fd 100644 --- a/docs/wiki/artist/update/index.md +++ b/docs/wiki/artist/update/index.md @@ -6,7 +6,7 @@ title: Artist Update The artist update endpoint updates an artist and returns the updated artist resource. -For example, the `/artist/chiwa_saito?name=Chiwa+Saito` endpoint will update the Chiwa Saito artist name attribute and return the updated Chiwa Saito resource. +For example, the `/artist/chiwa_saitou?name=Chiwa+Saito` endpoint will update the Chiwa Saitou artist name attribute and return the updated Chiwa Saitou resource. ## URL @@ -47,5 +47,5 @@ PUT|PATCH /artist/{slug} ## Example ```bash -curl -X PATCH -H "Authorization: Bearer {token}" https://api.animethemes.moe/artist/chiwa_saito +curl -X PATCH -H "Authorization: Bearer {token}" https://api.animethemes.moe/artist/chiwa_saitou ``` diff --git a/docs/wiki/artistimage/destroy/index.md b/docs/wiki/artistimage/destroy/index.md new file mode 100644 index 0000000..fcd2def --- /dev/null +++ b/docs/wiki/artistimage/destroy/index.md @@ -0,0 +1,39 @@ +--- +title: Artist Image Destroy +--- + +# Artist Image Destroy Endpoint + +The artist image destroy endpoint deletes an artist image and returns the deleted artist image resource. + +For example, the `/artistimage/chiwa_saitou/6703` endpoint will delete the association between the Chiwa Saitou artist and the large cover image of id 6703. + +## URL + +```sh +DELETE /artistimage/{artist:slug}/{image:id} +``` + +## Authentication + +**Required Permission**: delete artist, delete image + +**Roles with Permission**: Wiki Editor, Admin + +## Parameters + +None + +## Response + +```json +{ + message: "Image 'KXWxcUb0dF3Kb1SmWP2GRcd72Nv6a0OEjj33pDmP.png' has been detached from Artist 'Chiwa Saitou'.", +} +``` + +## Example + +```bash +curl -X DELETE -H "Authorization: Bearer {token}" https://api.artistthemes.moe/artistimage/chiwa_saitou/6703 +``` diff --git a/docs/wiki/artistimage/index.md b/docs/wiki/artistimage/index.md new file mode 100644 index 0000000..aa27fa4 --- /dev/null +++ b/docs/wiki/artistimage/index.md @@ -0,0 +1,39 @@ +--- +title: Artist Image +--- + +# Artist Image + +--- + +An artist image API resource represents the association between an artist and an image. + +## Fields + +| Name | Type | Nullable | Description | +| :--------: | :-----: | :------: | :------------------------------------------- | +| created_at | Date | No | The date that the resource was created | +| updated_at | Date | No | The date that the resource was last modified | + +## Allowed Include Paths + +* artist +* image + +## Endpoints + +**[Artist Image Destroy](/wiki/artistimage/destroy/)** + +The artist image destroy endpoint deletes an artist image and returns the deleted artist image resource. + +**[Artist Image Index](/wiki/artistimage/index/)** + +The artist image index endpoint displays a listing of artist image resources. + +**[Artist Image Show](/wiki/artistimage/show/)** + +The artist image show endpoint returns an artist image resource. + +**[Artist Image Store](/wiki/artistimage/store/)** + +The artist image store endpoint creates a new artist image and returns the new artist image resource. \ No newline at end of file diff --git a/docs/wiki/artistimage/index/index.md b/docs/wiki/artistimage/index/index.md new file mode 100644 index 0000000..9df8521 --- /dev/null +++ b/docs/wiki/artistimage/index/index.md @@ -0,0 +1,76 @@ +--- +title: Artist Image Index +--- + +# Artist Image Index Endpoint + +The artist image index endpoint returns a listing of artist image resources. + +## URL + +```sh +GET /artistimage/ +``` + +## Authentication + +None + +## Parameters + +| Name | Required | Description | +| :----------: | :------: | :----------------------------------------------------------------------------------- | +| fields | No | Sparse fieldsets for resource types | +| filter | No | Filters for artist image resources & constraining the inclusion of related resources | +| include | No | Inclusion of related resources | +| page[number] | No | The page of artist image resources to display | +| page[size] | No | The number of artist 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 +{ + artistimages: [ + { + 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.artistthemes.moe/artistimage/ +``` diff --git a/docs/wiki/artistimage/show/index.md b/docs/wiki/artistimage/show/index.md new file mode 100644 index 0000000..c66c3d6 --- /dev/null +++ b/docs/wiki/artistimage/show/index.md @@ -0,0 +1,40 @@ +--- +title: Artist Image Show +--- + +# Artist Image Show Endpoint + +The artist image show endpoint returns an artist image resource. + +For example, the `/artistimage/chiwa_saitou/6703` endpoint will return the artist image resource for the association between the Chiwa Saitou artist and the large cover image of id 6703. + +## URL + +```sh +GET /artistimage/{artist:slug}/{image:id} +``` + +## Authentication + +None + +## Parameters + +None + +## Response + +```json +{ + artistimage: { + created_at: "created_at", + updated_at: "updated_at" + } +} +``` + +## Example + +```bash +curl https://api.artistthemes.moe/artistimage/chiwa_saitou/6703 +``` diff --git a/docs/wiki/artistimage/store/index.md b/docs/wiki/artistimage/store/index.md new file mode 100644 index 0000000..18f93e8 --- /dev/null +++ b/docs/wiki/artistimage/store/index.md @@ -0,0 +1,45 @@ +--- +title: Artist Image Store +--- + +# Artist Image Store Endpoint + +The artist image store endpoint creates a new artist image and returns the new artist image resource. + +For example, the `/artistimage?artist_id=53&image_id=6703` endpoint will create a new association between the Chiwa Saitou artist and the large cover image of id 6703. + +## URL + +```sh +POST /artistimage +``` + +## Authentication + +**Required Permission**: create artist, create image + +**Roles with Permission**: Wiki Editor, Admin + +## Parameters + +| Name | Required | Rules | +| :-------: | :------: | :------------------------ | +| artist_id | Yes | integer, Artist ID exists | +| image_id | Yes | integer, Image ID exists | + +## Response + +```json +{ + artistimage: { + created_at: "created_at", + updated_at: "updated_at" + } +} +``` + +## Example + +```bash +curl -X POST -H "Authorization: Bearer {token}" https://api.artistthemes.moe/artistimage/ +``` diff --git a/docs/wiki/index.md b/docs/wiki/index.md index 53382e5..c063446 100644 --- a/docs/wiki/index.md +++ b/docs/wiki/index.md @@ -46,6 +46,10 @@ An anime theme entry API resource represents a version of an anime theme. 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. + **[Audio](/wiki/audio/)** An audio API resource represents the audio track of a video.