feat: adding resource write endpoints (#30)

This commit is contained in:
paranarimasu authored and GitHub committed 2022-06-11 09:34:50 -05:00
1 parent 73145b6ad2
commit 16aefdf447
7 files changed
+369 -114

No files matched your search

+56
View File
@@ -0,0 +1,56 @@
---
title: Resource Destroy
---
<Block>
# Resource Destroy Endpoint
The resource destroy endpoint soft deletes an external resource and returns the deleted external resource.
For example, the `/api/resource/1083` endpoint will soft delete the MyAnimeList resource for the Bakemonogatari anime and return the deleted MyAnimeList resource.
## URL
```sh
DELETE /api/resource/{id}
```
## Authentication
**Required Permission**: delete external resource
**Roles with Permission**: Wiki Editor, Admin
## Parameters
None
## Response
```json
{
resource: {
id: id,
link: "link",
external_id: external_id,
site: "site",
created_at: "created_at",
updated_at: "updated_at",
deleted_at: "deleted_at",
link: "link"
}
}
```
<Example>
<CURL>
```bash
curl -X DELETE -H "Authorization: Bearer {token}" https://api.animethemes.moe/resource/1083
```
</CURL>
</Example>
</Block>