182 lines
2.7 KiB
Markdown
182 lines
2.7 KiB
Markdown
# seadex
|
|
|
|
Base URL: `https://notifier.gansejunge.com/internal/seadex`
|
|
|
|
### `POST /admin/update/names`
|
|
|
|
**Update All Names To Most Recently Available**
|
|
|
|
**Example:**
|
|
|
|
```bash
|
|
curl -X POST 'https://notifier.gansejunge.com/internal/seadex/admin/update/names' \
|
|
-H 'X-API-Key: <api_key>'
|
|
```
|
|
|
|
**Responses:**
|
|
|
|
- `200`: Successful Response
|
|
|
|
### `POST /anime/add`
|
|
|
|
**Add Anime**
|
|
|
|
| Name | In | Type | Required |
|
|
|---|---|---|---|
|
|
| `X-User-Id` | header | integer | yes |
|
|
|
|
**Request body:**
|
|
|
|
```json
|
|
{
|
|
"anilist_id": 0,
|
|
"custom_name": "string"
|
|
}
|
|
```
|
|
|
|
**Example:**
|
|
|
|
```bash
|
|
curl -X POST 'https://notifier.gansejunge.com/internal/seadex/anime/add' \
|
|
-H 'X-API-Key: <api_key>' \
|
|
-H 'Content-Type: application/json' \
|
|
-d '{"anilist_id": 0, "custom_name": "string"}'
|
|
```
|
|
|
|
**Responses:**
|
|
|
|
- `200`: Successful Response
|
|
- `422`: Validation Error
|
|
```json
|
|
{
|
|
"detail": [
|
|
{
|
|
"loc": [
|
|
"string"
|
|
],
|
|
"msg": "string",
|
|
"type": "string",
|
|
"input": null,
|
|
"ctx": {}
|
|
}
|
|
]
|
|
}
|
|
```
|
|
|
|
### `POST /anime/delete`
|
|
|
|
**Remove Anime**
|
|
|
|
| Name | In | Type | Required |
|
|
|---|---|---|---|
|
|
| `X-User-Id` | header | integer | yes |
|
|
|
|
**Request body:**
|
|
|
|
```json
|
|
{
|
|
"anilist_id": 0
|
|
}
|
|
```
|
|
|
|
**Example:**
|
|
|
|
```bash
|
|
curl -X POST 'https://notifier.gansejunge.com/internal/seadex/anime/delete' \
|
|
-H 'X-API-Key: <api_key>' \
|
|
-H 'Content-Type: application/json' \
|
|
-d '{"anilist_id": 0}'
|
|
```
|
|
|
|
**Responses:**
|
|
|
|
- `200`: Successful Response
|
|
- `422`: Validation Error
|
|
```json
|
|
{
|
|
"detail": [
|
|
{
|
|
"loc": [
|
|
"string"
|
|
],
|
|
"msg": "string",
|
|
"type": "string",
|
|
"input": null,
|
|
"ctx": {}
|
|
}
|
|
]
|
|
}
|
|
```
|
|
|
|
### `GET /anime/list`
|
|
|
|
**List Active And Inactive Anime**
|
|
|
|
| Name | In | Type | Required |
|
|
|---|---|---|---|
|
|
| `X-User-Id` | header | integer | yes |
|
|
|
|
**Example:**
|
|
|
|
```bash
|
|
curl -X GET 'https://notifier.gansejunge.com/internal/seadex/anime/list' \
|
|
-H 'X-API-Key: <api_key>'
|
|
```
|
|
|
|
**Responses:**
|
|
|
|
- `200`: Successful Response
|
|
```json
|
|
{
|
|
"active": [
|
|
{
|
|
"name": "string",
|
|
"anilist_id": 0,
|
|
"last_updated": "string"
|
|
}
|
|
],
|
|
"inactive": [
|
|
{
|
|
"name": "string",
|
|
"anilist_id": 0,
|
|
"last_updated": "string"
|
|
}
|
|
],
|
|
"counts": {
|
|
"active": 0,
|
|
"inactive": 0
|
|
}
|
|
}
|
|
```
|
|
- `422`: Validation Error
|
|
```json
|
|
{
|
|
"detail": [
|
|
{
|
|
"loc": [
|
|
"string"
|
|
],
|
|
"msg": "string",
|
|
"type": "string",
|
|
"input": null,
|
|
"ctx": {}
|
|
}
|
|
]
|
|
}
|
|
```
|
|
|
|
### `POST /update`
|
|
|
|
**Check Seadex**
|
|
|
|
**Example:**
|
|
|
|
```bash
|
|
curl -X POST 'https://notifier.gansejunge.com/internal/seadex/update' \
|
|
-H 'X-API-Key: <api_key>'
|
|
```
|
|
|
|
**Responses:**
|
|
|
|
- `200`: Successful Response
|