Updated docs for notifier/service-seadex
Linked build commit: 2622944efe
This commit is contained in:
1 parent
23e3acc2be
commit
b7ebe91a6a
2 files changed
+559
No files matched your search
+181
@@ -0,0 +1,181 @@
|
||||
# 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
|
||||
@@ -0,0 +1,378 @@
|
||||
{
|
||||
"openapi": "3.1.0",
|
||||
"info": {
|
||||
"title": "seadex",
|
||||
"version": "0.1.0"
|
||||
},
|
||||
"paths": {
|
||||
"/admin/update/names": {
|
||||
"post": {
|
||||
"summary": "Update All Names To Most Recently Available",
|
||||
"operationId": "update_all_names_to_most_recently_available_admin_update_names_post",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Successful Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"HTTPBearer": []
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/update": {
|
||||
"post": {
|
||||
"summary": "Check Seadex",
|
||||
"operationId": "check_seadex_update_post",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Successful Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"HTTPBearer": []
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/anime/add": {
|
||||
"post": {
|
||||
"summary": "Add Anime",
|
||||
"operationId": "add_anime_anime_add_post",
|
||||
"security": [
|
||||
{
|
||||
"HTTPBearer": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "X-User-Id",
|
||||
"in": "header",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"exclusiveMinimum": 0,
|
||||
"title": "X-User-Id"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/AnimeCreate"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Successful Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"422": {
|
||||
"description": "Validation Error",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/anime/delete": {
|
||||
"post": {
|
||||
"summary": "Remove Anime",
|
||||
"operationId": "remove_anime_anime_delete_post",
|
||||
"security": [
|
||||
{
|
||||
"HTTPBearer": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "X-User-Id",
|
||||
"in": "header",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"exclusiveMinimum": 0,
|
||||
"title": "X-User-Id"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/AnimeRemove"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Successful Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"422": {
|
||||
"description": "Validation Error",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/anime/list": {
|
||||
"get": {
|
||||
"summary": "List Active And Inactive Anime",
|
||||
"operationId": "list_active_and_inactive_anime_anime_list_get",
|
||||
"security": [
|
||||
{
|
||||
"HTTPBearer": []
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "X-User-Id",
|
||||
"in": "header",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"exclusiveMinimum": 0,
|
||||
"title": "X-User-Id"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Successful Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/AnimeList"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"422": {
|
||||
"description": "Validation Error",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"AnimeCreate": {
|
||||
"properties": {
|
||||
"anilist_id": {
|
||||
"type": "integer",
|
||||
"exclusiveMinimum": 0.0,
|
||||
"title": "Anilist Id"
|
||||
},
|
||||
"custom_name": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"maxLength": 255
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "Custom Name"
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"required": [
|
||||
"anilist_id"
|
||||
],
|
||||
"title": "AnimeCreate"
|
||||
},
|
||||
"AnimeEntry": {
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"title": "Name"
|
||||
},
|
||||
"anilist_id": {
|
||||
"type": "integer",
|
||||
"title": "Anilist Id"
|
||||
},
|
||||
"last_updated": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "Last Updated"
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"anilist_id"
|
||||
],
|
||||
"title": "AnimeEntry"
|
||||
},
|
||||
"AnimeList": {
|
||||
"properties": {
|
||||
"active": {
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/AnimeEntry"
|
||||
},
|
||||
"type": "array",
|
||||
"title": "Active"
|
||||
},
|
||||
"inactive": {
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/AnimeEntry"
|
||||
},
|
||||
"type": "array",
|
||||
"title": "Inactive"
|
||||
},
|
||||
"counts": {
|
||||
"$ref": "#/components/schemas/Counts",
|
||||
"readOnly": true
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"required": [
|
||||
"counts"
|
||||
],
|
||||
"title": "AnimeList"
|
||||
},
|
||||
"AnimeRemove": {
|
||||
"properties": {
|
||||
"anilist_id": {
|
||||
"type": "integer",
|
||||
"title": "Anilist Id"
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"required": [
|
||||
"anilist_id"
|
||||
],
|
||||
"title": "AnimeRemove"
|
||||
},
|
||||
"Counts": {
|
||||
"properties": {
|
||||
"active": {
|
||||
"type": "integer",
|
||||
"title": "Active"
|
||||
},
|
||||
"inactive": {
|
||||
"type": "integer",
|
||||
"title": "Inactive"
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"required": [
|
||||
"active",
|
||||
"inactive"
|
||||
],
|
||||
"title": "Counts"
|
||||
},
|
||||
"HTTPValidationError": {
|
||||
"properties": {
|
||||
"detail": {
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/ValidationError"
|
||||
},
|
||||
"type": "array",
|
||||
"title": "Detail"
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"title": "HTTPValidationError"
|
||||
},
|
||||
"ValidationError": {
|
||||
"properties": {
|
||||
"loc": {
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "integer"
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "array",
|
||||
"title": "Location"
|
||||
},
|
||||
"msg": {
|
||||
"type": "string",
|
||||
"title": "Message"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"title": "Error Type"
|
||||
},
|
||||
"input": {
|
||||
"title": "Input"
|
||||
},
|
||||
"ctx": {
|
||||
"type": "object",
|
||||
"title": "Context"
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"required": [
|
||||
"loc",
|
||||
"msg",
|
||||
"type"
|
||||
],
|
||||
"title": "ValidationError"
|
||||
}
|
||||
},
|
||||
"securitySchemes": {
|
||||
"HTTPBearer": {
|
||||
"type": "http",
|
||||
"scheme": "bearer"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user