Updated docs for notifier/service-seadex
Linked build commit: 2622944efe
This commit is contained in:
1 parent
c1b313b226
commit
fac3434b35
2 files changed
+200
-124
No files matched your search
+53
-43
@@ -2,9 +2,24 @@
|
|||||||
|
|
||||||
Base URL: `https://notifier.gansejunge.com/internal/seadex`
|
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: <api_key>'
|
||||||
|
```
|
||||||
|
|
||||||
|
**Responses:**
|
||||||
|
|
||||||
|
- `200`: Successful Response
|
||||||
|
|
||||||
|
### `POST /anime/add`
|
||||||
|
|
||||||
|
**Add Anime**
|
||||||
|
|
||||||
| Name | In | Type | Required |
|
| Name | In | Type | Required |
|
||||||
|---|---|---|---|
|
|---|---|---|---|
|
||||||
@@ -14,10 +29,7 @@ Base URL: `https://notifier.gansejunge.com/internal/seadex`
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"type": "github",
|
"anilist_id": 0,
|
||||||
"org": "string",
|
|
||||||
"repo": "string",
|
|
||||||
"tag": "string",
|
|
||||||
"custom_name": "string"
|
"custom_name": "string"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -25,10 +37,10 @@ Base URL: `https://notifier.gansejunge.com/internal/seadex`
|
|||||||
**Example:**
|
**Example:**
|
||||||
|
|
||||||
```bash
|
```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: <api_key>' \
|
-H 'X-API-Key: <api_key>' \
|
||||||
-H 'Content-Type: application/json' \
|
-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:**
|
**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 |
|
| Name | In | Type | Required |
|
||||||
|---|---|---|---|
|
|---|---|---|---|
|
||||||
@@ -63,21 +75,17 @@ curl -X POST 'https://notifier.gansejunge.com/internal/seadex/repository/add' \
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"type": "github",
|
"anilist_id": 0
|
||||||
"org": "string",
|
|
||||||
"repo": "string",
|
|
||||||
"tag": "string",
|
|
||||||
"custom_name": "string"
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
**Example:**
|
**Example:**
|
||||||
|
|
||||||
```bash
|
```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: <api_key>' \
|
-H 'X-API-Key: <api_key>' \
|
||||||
-H 'Content-Type: application/json' \
|
-H 'Content-Type: application/json' \
|
||||||
-d '{"type": "github", "org": "string", "repo": "string", "tag": "string", "custom_name": "string"}'
|
-d '{"anilist_id": 0}'
|
||||||
```
|
```
|
||||||
|
|
||||||
**Responses:**
|
**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 |
|
| Name | In | Type | Required |
|
||||||
|---|---|---|---|
|
|---|---|---|---|
|
||||||
@@ -111,13 +119,35 @@ curl -X POST 'https://notifier.gansejunge.com/internal/seadex/repository/delete'
|
|||||||
**Example:**
|
**Example:**
|
||||||
|
|
||||||
```bash
|
```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: <api_key>'
|
-H 'X-API-Key: <api_key>'
|
||||||
```
|
```
|
||||||
|
|
||||||
**Responses:**
|
**Responses:**
|
||||||
|
|
||||||
- `200`: Successful Response
|
- `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
|
- `422`: Validation Error
|
||||||
```json
|
```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**
|
**Check Seadex**
|
||||||
|
|
||||||
| Name | In | Type | Required |
|
|
||||||
|---|---|---|---|
|
|
||||||
| `repository_type` | path | string | yes |
|
|
||||||
|
|
||||||
**Example:**
|
**Example:**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl -X POST 'https://notifier.gansejunge.com/internal/seadex/update/<repository_type>' \
|
curl -X POST 'https://notifier.gansejunge.com/internal/seadex/update' \
|
||||||
-H 'X-API-Key: <api_key>'
|
-H 'X-API-Key: <api_key>'
|
||||||
```
|
```
|
||||||
|
|
||||||
**Responses:**
|
**Responses:**
|
||||||
|
|
||||||
- `200`: Successful Response
|
- `200`: Successful Response
|
||||||
- `422`: Validation Error
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"detail": [
|
|
||||||
{
|
|
||||||
"loc": [
|
|
||||||
"string"
|
|
||||||
],
|
|
||||||
"msg": "string",
|
|
||||||
"type": "string",
|
|
||||||
"input": null,
|
|
||||||
"ctx": {}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
```
|
|
||||||
@@ -5,25 +5,10 @@
|
|||||||
"version": "0.1.0"
|
"version": "0.1.0"
|
||||||
},
|
},
|
||||||
"paths": {
|
"paths": {
|
||||||
"/update/{repository_type}": {
|
"/admin/update/names": {
|
||||||
"post": {
|
"post": {
|
||||||
"summary": "Update Watched Repositories",
|
"summary": "Update All Names To Most Recently Available",
|
||||||
"operationId": "update_watched_repositories_update__repository_type__post",
|
"operationId": "update_all_names_to_most_recently_available_admin_update_names_post",
|
||||||
"security": [
|
|
||||||
{
|
|
||||||
"HTTPBearer": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"name": "repository_type",
|
|
||||||
"in": "path",
|
|
||||||
"required": true,
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/components/schemas/RepositoryType"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "Successful Response",
|
"description": "Successful Response",
|
||||||
@@ -32,24 +17,40 @@
|
|||||||
"schema": {}
|
"schema": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"422": {
|
"security": [
|
||||||
"description": "Validation Error",
|
{
|
||||||
|
"HTTPBearer": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/update": {
|
||||||
|
"post": {
|
||||||
|
"summary": "Check Seadex",
|
||||||
|
"operationId": "check_seadex_update_post",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Successful Response",
|
||||||
"content": {
|
"content": {
|
||||||
"application/json": {
|
"application/json": {
|
||||||
"schema": {
|
"schema": {}
|
||||||
"$ref": "#/components/schemas/HTTPValidationError"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/repository/add": {
|
"security": [
|
||||||
|
{
|
||||||
|
"HTTPBearer": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/anime/add": {
|
||||||
"post": {
|
"post": {
|
||||||
"summary": "Add Repository Subscription",
|
"summary": "Add Anime",
|
||||||
"operationId": "add_repository_subscription_repository_add_post",
|
"operationId": "add_anime_anime_add_post",
|
||||||
"security": [
|
"security": [
|
||||||
{
|
{
|
||||||
"HTTPBearer": []
|
"HTTPBearer": []
|
||||||
@@ -72,7 +73,7 @@
|
|||||||
"content": {
|
"content": {
|
||||||
"application/json": {
|
"application/json": {
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/components/schemas/RepositoryUpdate"
|
"$ref": "#/components/schemas/AnimeCreate"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -99,10 +100,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/repository/delete": {
|
"/anime/delete": {
|
||||||
"post": {
|
"post": {
|
||||||
"summary": "Delete Repository Subscription",
|
"summary": "Remove Anime",
|
||||||
"operationId": "delete_repository_subscription_repository_delete_post",
|
"operationId": "remove_anime_anime_delete_post",
|
||||||
"security": [
|
"security": [
|
||||||
{
|
{
|
||||||
"HTTPBearer": []
|
"HTTPBearer": []
|
||||||
@@ -125,7 +126,7 @@
|
|||||||
"content": {
|
"content": {
|
||||||
"application/json": {
|
"application/json": {
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/components/schemas/RepositoryUpdate"
|
"$ref": "#/components/schemas/AnimeRemove"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -152,10 +153,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/repository/list": {
|
"/anime/list": {
|
||||||
"get": {
|
"get": {
|
||||||
"summary": "List Subscribed Repositories",
|
"summary": "List Active And Inactive Anime",
|
||||||
"operationId": "list_subscribed_repositories_repository_list_get",
|
"operationId": "list_active_and_inactive_anime_anime_list_get",
|
||||||
"security": [
|
"security": [
|
||||||
{
|
{
|
||||||
"HTTPBearer": []
|
"HTTPBearer": []
|
||||||
@@ -178,7 +179,9 @@
|
|||||||
"description": "Successful Response",
|
"description": "Successful Response",
|
||||||
"content": {
|
"content": {
|
||||||
"application/json": {
|
"application/json": {
|
||||||
"schema": {}
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/AnimeList"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -198,46 +201,12 @@
|
|||||||
},
|
},
|
||||||
"components": {
|
"components": {
|
||||||
"schemas": {
|
"schemas": {
|
||||||
"HTTPValidationError": {
|
"AnimeCreate": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"detail": {
|
"anilist_id": {
|
||||||
"items": {
|
"type": "integer",
|
||||||
"$ref": "#/components/schemas/ValidationError"
|
"exclusiveMinimum": 0.0,
|
||||||
},
|
"title": "Anilist Id"
|
||||||
"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"
|
|
||||||
},
|
},
|
||||||
"custom_name": {
|
"custom_name": {
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
@@ -254,12 +223,109 @@
|
|||||||
},
|
},
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": [
|
"required": [
|
||||||
"type",
|
"anilist_id"
|
||||||
"org",
|
|
||||||
"repo",
|
|
||||||
"tag"
|
|
||||||
],
|
],
|
||||||
"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": {
|
"ValidationError": {
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|||||||
Reference in new issue
Block a user