From fac3434b35fcfb0baa410822fb34325ef9c3ac0e Mon Sep 17 00:00:00 2001 From: automation-bot Date: Fri, 6 Nov 2026 15:50:57 +0000 Subject: [PATCH] Updated docs for notifier/service-seadex Linked build commit: https://git.gansejunge.com/notifier/service-seadex/commit/2622944efe053270bd6c3933a22307782deb7cd0 --- API-seadex.md | 96 ++++++------ sources/service-seadex-openapi.json | 228 ++++++++++++++++++---------- 2 files changed, 200 insertions(+), 124 deletions(-) diff --git a/API-seadex.md b/API-seadex.md index c6519d3..1f620a4 100644 --- a/API-seadex.md +++ b/API-seadex.md @@ -2,9 +2,24 @@ Base URL: `https://notifier.gansejunge.com/internal/seadex` -### `POST /repository/add` +### `POST /admin/update/names` -**Add Repository Subscription** +**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: ' +``` + +**Responses:** + +- `200`: Successful Response + +### `POST /anime/add` + +**Add Anime** | Name | In | Type | Required | |---|---|---|---| @@ -14,10 +29,7 @@ Base URL: `https://notifier.gansejunge.com/internal/seadex` ```json { - "type": "github", - "org": "string", - "repo": "string", - "tag": "string", + "anilist_id": 0, "custom_name": "string" } ``` @@ -25,10 +37,10 @@ Base URL: `https://notifier.gansejunge.com/internal/seadex` **Example:** ```bash -curl -X POST 'https://notifier.gansejunge.com/internal/seadex/repository/add' \ +curl -X POST 'https://notifier.gansejunge.com/internal/seadex/anime/add' \ -H 'X-API-Key: ' \ -H 'Content-Type: application/json' \ - -d '{"type": "github", "org": "string", "repo": "string", "tag": "string", "custom_name": "string"}' + -d '{"anilist_id": 0, "custom_name": "string"}' ``` **Responses:** @@ -51,9 +63,9 @@ curl -X POST 'https://notifier.gansejunge.com/internal/seadex/repository/add' \ } ``` -### `POST /repository/delete` +### `POST /anime/delete` -**Delete Repository Subscription** +**Remove Anime** | Name | In | Type | Required | |---|---|---|---| @@ -63,21 +75,17 @@ curl -X POST 'https://notifier.gansejunge.com/internal/seadex/repository/add' \ ```json { - "type": "github", - "org": "string", - "repo": "string", - "tag": "string", - "custom_name": "string" + "anilist_id": 0 } ``` **Example:** ```bash -curl -X POST 'https://notifier.gansejunge.com/internal/seadex/repository/delete' \ +curl -X POST 'https://notifier.gansejunge.com/internal/seadex/anime/delete' \ -H 'X-API-Key: ' \ -H 'Content-Type: application/json' \ - -d '{"type": "github", "org": "string", "repo": "string", "tag": "string", "custom_name": "string"}' + -d '{"anilist_id": 0}' ``` **Responses:** @@ -100,9 +108,9 @@ curl -X POST 'https://notifier.gansejunge.com/internal/seadex/repository/delete' } ``` -### `GET /repository/list` +### `GET /anime/list` -**List Subscribed Repositories** +**List Active And Inactive Anime** | Name | In | Type | Required | |---|---|---|---| @@ -111,13 +119,35 @@ curl -X POST 'https://notifier.gansejunge.com/internal/seadex/repository/delete' **Example:** ```bash -curl -X GET 'https://notifier.gansejunge.com/internal/seadex/repository/list' \ +curl -X GET 'https://notifier.gansejunge.com/internal/seadex/anime/list' \ -H 'X-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 { @@ -135,37 +165,17 @@ curl -X GET 'https://notifier.gansejunge.com/internal/seadex/repository/list' \ } ``` -### `POST /update/{repository_type}` +### `POST /update` -**Update Watched Repositories** - -| Name | In | Type | Required | -|---|---|---|---| -| `repository_type` | path | string | yes | +**Check Seadex** **Example:** ```bash -curl -X POST 'https://notifier.gansejunge.com/internal/seadex/update/' \ +curl -X POST 'https://notifier.gansejunge.com/internal/seadex/update' \ -H 'X-API-Key: ' ``` **Responses:** - `200`: Successful Response -- `422`: Validation Error - ```json - { - "detail": [ - { - "loc": [ - "string" - ], - "msg": "string", - "type": "string", - "input": null, - "ctx": {} - } - ] - } - ``` diff --git a/sources/service-seadex-openapi.json b/sources/service-seadex-openapi.json index e609f87..37c9664 100644 --- a/sources/service-seadex-openapi.json +++ b/sources/service-seadex-openapi.json @@ -5,25 +5,10 @@ "version": "0.1.0" }, "paths": { - "/update/{repository_type}": { + "/admin/update/names": { "post": { - "summary": "Update Watched Repositories", - "operationId": "update_watched_repositories_update__repository_type__post", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "repository_type", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/RepositoryType" - } - } - ], + "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", @@ -32,24 +17,40 @@ "schema": {} } } - }, - "422": { - "description": "Validation Error", + } + }, + "security": [ + { + "HTTPBearer": [] + } + ] + } + }, + "/update": { + "post": { + "summary": "Check Seadex", + "operationId": "check_seadex_update_post", + "responses": { + "200": { + "description": "Successful Response", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } + "schema": {} } } } - } + }, + "security": [ + { + "HTTPBearer": [] + } + ] } }, - "/repository/add": { + "/anime/add": { "post": { - "summary": "Add Repository Subscription", - "operationId": "add_repository_subscription_repository_add_post", + "summary": "Add Anime", + "operationId": "add_anime_anime_add_post", "security": [ { "HTTPBearer": [] @@ -72,7 +73,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RepositoryUpdate" + "$ref": "#/components/schemas/AnimeCreate" } } } @@ -99,10 +100,10 @@ } } }, - "/repository/delete": { + "/anime/delete": { "post": { - "summary": "Delete Repository Subscription", - "operationId": "delete_repository_subscription_repository_delete_post", + "summary": "Remove Anime", + "operationId": "remove_anime_anime_delete_post", "security": [ { "HTTPBearer": [] @@ -125,7 +126,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RepositoryUpdate" + "$ref": "#/components/schemas/AnimeRemove" } } } @@ -152,10 +153,10 @@ } } }, - "/repository/list": { + "/anime/list": { "get": { - "summary": "List Subscribed Repositories", - "operationId": "list_subscribed_repositories_repository_list_get", + "summary": "List Active And Inactive Anime", + "operationId": "list_active_and_inactive_anime_anime_list_get", "security": [ { "HTTPBearer": [] @@ -178,7 +179,9 @@ "description": "Successful Response", "content": { "application/json": { - "schema": {} + "schema": { + "$ref": "#/components/schemas/AnimeList" + } } } }, @@ -198,46 +201,12 @@ }, "components": { "schemas": { - "HTTPValidationError": { + "AnimeCreate": { "properties": { - "detail": { - "items": { - "$ref": "#/components/schemas/ValidationError" - }, - "type": "array", - "title": "Detail" - } - }, - "type": "object", - "title": "HTTPValidationError" - }, - "RepositoryType": { - "type": "string", - "enum": [ - "github", - "dockerhub" - ], - "title": "RepositoryType" - }, - "RepositoryUpdate": { - "properties": { - "type": { - "$ref": "#/components/schemas/RepositoryType" - }, - "org": { - "type": "string", - "maxLength": 39, - "title": "Org" - }, - "repo": { - "type": "string", - "maxLength": 255, - "title": "Repo" - }, - "tag": { - "type": "string", - "maxLength": 128, - "title": "Tag" + "anilist_id": { + "type": "integer", + "exclusiveMinimum": 0.0, + "title": "Anilist Id" }, "custom_name": { "anyOf": [ @@ -254,12 +223,109 @@ }, "type": "object", "required": [ - "type", - "org", - "repo", - "tag" + "anilist_id" ], - "title": "RepositoryUpdate" + "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": {