168 lines
2.7 KiB
Markdown
168 lines
2.7 KiB
Markdown
# royalroad
|
|
|
|
Base URL: `https://notifier.gansejunge.com/internal/royalroad`
|
|
|
|
### `POST /feed/add`
|
|
|
|
**Add Feed**
|
|
|
|
| Name | In | Type | Required |
|
|
|---|---|---|---|
|
|
| `X-User-Id` | header | integer | yes |
|
|
|
|
**Request body:**
|
|
|
|
```json
|
|
{
|
|
"type": "royalroad",
|
|
"rss_feed_url": "string",
|
|
"custom_name": "string"
|
|
}
|
|
```
|
|
|
|
**Example:**
|
|
|
|
```bash
|
|
curl -X POST 'https://notifier.gansejunge.com/internal/royalroad/feed/add' \
|
|
-H 'X-API-Key: <api_key>' \
|
|
-H 'Content-Type: application/json' \
|
|
-d '{"type": "royalroad", "rss_feed_url": "string", "custom_name": "string"}'
|
|
```
|
|
|
|
**Responses:**
|
|
|
|
- `200`: Successful Response
|
|
- `422`: Validation Error
|
|
```json
|
|
{
|
|
"detail": [
|
|
{
|
|
"loc": [
|
|
"string"
|
|
],
|
|
"msg": "string",
|
|
"type": "string",
|
|
"input": null,
|
|
"ctx": {}
|
|
}
|
|
]
|
|
}
|
|
```
|
|
|
|
### `POST /feed/delete`
|
|
|
|
**Delete Feed**
|
|
|
|
| Name | In | Type | Required |
|
|
|---|---|---|---|
|
|
| `X-User-Id` | header | integer | yes |
|
|
|
|
**Request body:**
|
|
|
|
```json
|
|
{
|
|
"type": "royalroad",
|
|
"rss_feed_url": "string",
|
|
"custom_name": "string"
|
|
}
|
|
```
|
|
|
|
**Example:**
|
|
|
|
```bash
|
|
curl -X POST 'https://notifier.gansejunge.com/internal/royalroad/feed/delete' \
|
|
-H 'X-API-Key: <api_key>' \
|
|
-H 'Content-Type: application/json' \
|
|
-d '{"type": "royalroad", "rss_feed_url": "string", "custom_name": "string"}'
|
|
```
|
|
|
|
**Responses:**
|
|
|
|
- `200`: Successful Response
|
|
- `422`: Validation Error
|
|
```json
|
|
{
|
|
"detail": [
|
|
{
|
|
"loc": [
|
|
"string"
|
|
],
|
|
"msg": "string",
|
|
"type": "string",
|
|
"input": null,
|
|
"ctx": {}
|
|
}
|
|
]
|
|
}
|
|
```
|
|
|
|
### `GET /feed/list`
|
|
|
|
**List Subscribed Feeds**
|
|
|
|
| Name | In | Type | Required |
|
|
|---|---|---|---|
|
|
| `X-User-Id` | header | integer | yes |
|
|
|
|
**Example:**
|
|
|
|
```bash
|
|
curl -X GET 'https://notifier.gansejunge.com/internal/royalroad/feed/list' \
|
|
-H 'X-API-Key: <api_key>'
|
|
```
|
|
|
|
**Responses:**
|
|
|
|
- `200`: Successful Response
|
|
- `422`: Validation Error
|
|
```json
|
|
{
|
|
"detail": [
|
|
{
|
|
"loc": [
|
|
"string"
|
|
],
|
|
"msg": "string",
|
|
"type": "string",
|
|
"input": null,
|
|
"ctx": {}
|
|
}
|
|
]
|
|
}
|
|
```
|
|
|
|
### `POST /update/{rss_feed_type}`
|
|
|
|
**Update Rss Feeds**
|
|
|
|
| Name | In | Type | Required |
|
|
|---|---|---|---|
|
|
| `rss_feed_type` | path | string | yes |
|
|
|
|
**Example:**
|
|
|
|
```bash
|
|
curl -X POST 'https://notifier.gansejunge.com/internal/royalroad/update/<rss_feed_type>' \
|
|
-H 'X-API-Key: <api_key>'
|
|
```
|
|
|
|
**Responses:**
|
|
|
|
- `200`: Successful Response
|
|
- `422`: Validation Error
|
|
```json
|
|
{
|
|
"detail": [
|
|
{
|
|
"loc": [
|
|
"string"
|
|
],
|
|
"msg": "string",
|
|
"type": "string",
|
|
"input": null,
|
|
"ctx": {}
|
|
}
|
|
]
|
|
}
|
|
```
|