mirror of
https://github.com/JonasunderscoreJones/docs.jonasjones.dev.git
synced 2025-10-22 18:49:18 +02:00
moved the v1-routes categories onto their own page
This commit is contained in:
parent
85dd5214b5
commit
8a46db1d67
7 changed files with 1448 additions and 1420 deletions
File diff suppressed because it is too large
Load diff
10
docs/API/v1-routes/_category_.json
Normal file
10
docs/API/v1-routes/_category_.json
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"position": 2,
|
||||
"label": "v1 Routes",
|
||||
"collapsible": true,
|
||||
"collapsed": true,
|
||||
"link": {
|
||||
"type": "generated-index",
|
||||
"description": "Documentation for the Jonas_Jones API v1 Routes"
|
||||
}
|
||||
}
|
103
docs/API/v1-routes/basic.mdx
Normal file
103
docs/API/v1-routes/basic.mdx
Normal file
|
@ -0,0 +1,103 @@
|
|||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
# Basic
|
||||
The basic routes of the API
|
||||
|
||||
## GET /v1/help
|
||||
Get a help message.
|
||||
|
||||
:::tip[**Example** Response]
|
||||
<Tabs>
|
||||
<TabItem value="200" label="200">
|
||||
```json
|
||||
Please refer to the wiki at https://wiki.jonasjones.dev/Api/
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
||||
|
||||
|
||||
## GET /v1/ping
|
||||
Get a ping back from the API
|
||||
|
||||
:::tip[**Example** Response]
|
||||
<Tabs>
|
||||
<TabItem value="200" label="200">
|
||||
```json
|
||||
pong
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
||||
|
||||
## GET /v1/version
|
||||
Get the version of the Rust api back-end
|
||||
|
||||
:::tip[**Example** Response]
|
||||
<Tabs>
|
||||
<TabItem value="200" label="200">
|
||||
```json
|
||||
["0.0.1+alpha-build01"]
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
||||
|
||||
## GET /v1/debug/headers
|
||||
Get the incoming headers of the request
|
||||
|
||||
:::tip[**Example** Response]
|
||||
<Tabs>
|
||||
<TabItem value="200" label="200">
|
||||
```json
|
||||
{
|
||||
"Origin": "...",
|
||||
"Referer": "...",
|
||||
"User-Agent": "...",
|
||||
"...": "..."
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
684
docs/API/v1-routes/k-comebacks-database.mdx
Normal file
684
docs/API/v1-routes/k-comebacks-database.mdx
Normal file
|
@ -0,0 +1,684 @@
|
|||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
# K-Comebacks Database
|
||||
A database of the most important K-Pop Comebacks since 2017. It is updated once a day.
|
||||
|
||||
:::warning
|
||||
|
||||
The Comebacks are automatically scraped from the `r/kpop` Wiki comebacks-list and the [python script](https://github.com/JonasunderscoreJones/turbo-octo-potato/blob/main/rpopfetch.py) may produce errors and fetch some entries wrong.
|
||||
|
||||
:::
|
||||
|
||||
:::note
|
||||
|
||||
The timezone used for the entries is `KST UTC+09:00`
|
||||
|
||||
:::
|
||||
|
||||
## GET /v1/kcomebacks/last_update
|
||||
|
||||
Get the date and time of the last update made to the comeback database
|
||||
|
||||
:::tip[**Example** Response]
|
||||
<Tabs>
|
||||
<TabItem value="200" label="200">
|
||||
```json
|
||||
"2024-08-16 12:05:04 UTC"
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
||||
|
||||
## GET /v1/kcomebacks/filter/id
|
||||
→ /v1/kcomebacks/filterid?id=*<span style={{ color: "green" }}>id</span>*
|
||||
|
||||
Get the comeback entry with id = <span style={{ color: "green" }}>id</span>
|
||||
|
||||
:::note
|
||||
|
||||
If the entry-count is fetched using [GET /v1/kcomebacks/filter/getinfo](#get-v1kcomebacksfiltergetinfo) the `id` of the last entry is `num_items - 1`
|
||||
|
||||
:::
|
||||
|
||||
| Parameter | Type | Description | Example | Required | Default Value (if optional) |
|
||||
| --------- | ------------------- | ------------------------- | ------- | -------- | --------------------------- |
|
||||
| id | Number (*positive*) | id of the requested entry | 5 | Yes | - |
|
||||
|
||||
:::tip[**Example** Response]
|
||||
<Tabs>
|
||||
<TabItem value="200" label="200">
|
||||
```json
|
||||
{
|
||||
"results": [
|
||||
{
|
||||
"date": "2017-03-1",
|
||||
"time": "--:--",
|
||||
"artist": "Lim Heo Nil",
|
||||
"title": "Heart For Someone",
|
||||
"types": [
|
||||
"single",
|
||||
"digital"
|
||||
],
|
||||
"links": [
|
||||
"https://play.spotify.com…m/7lIMFbUB5tV8vqJT0gH40W",
|
||||
"https://www.reddit.com/5wsn0p"
|
||||
]
|
||||
}
|
||||
],
|
||||
"count": 1
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
||||
|
||||
## GET /v1/kcomebacks/filter/getall
|
||||
→ /v1/kcomebacks/filter/getall?limit=*<span style={{ color: "green" }}>limit</span>*&offset=*<span style={{ color: "green" }}>offset</span>*
|
||||
|
||||
Get all the comeback entries limited by <span style={{ color: "green" }}>limit</span> and <span style={{ color: "green" }}>offset</span>
|
||||
|
||||
| Parameter | Type | Description | Example | Required | Default Value (if optional) |
|
||||
| --------- | ------------------- | ----------------------------------- | ------- | -------- | --------------------------- |
|
||||
| limit | Number (0 ≤ n ≤ 50) | maximum amount of entries to select | 2 | Yes | - |
|
||||
| offset | Number (*posirive*) | offset from *id* `0` | 5 | Yes | - |
|
||||
|
||||
:::tip[**Example** Response]
|
||||
<Tabs>
|
||||
<TabItem value="200" label="200">
|
||||
```json
|
||||
{
|
||||
"results": [
|
||||
{
|
||||
"date": "2017-03-1",
|
||||
"time": "--:--",
|
||||
"artist": "Lim Heo Nil",
|
||||
"title": "Heart For Someone",
|
||||
"types": [
|
||||
"single",
|
||||
"digital"
|
||||
],
|
||||
"links": [
|
||||
"https://play.spotify.com…m/7lIMFbUB5tV8vqJT0gH40W",
|
||||
"https://www.reddit.com/5wsn0p"
|
||||
]
|
||||
},
|
||||
{
|
||||
"date": "2017-03-1",
|
||||
"time": "--:--",
|
||||
"artist": "PENOMECO",
|
||||
"title": "FILM",
|
||||
"types": [
|
||||
"single"
|
||||
],
|
||||
"links": [
|
||||
"https://play.spotify.com/album/2FwUxt5jYvcQc3ZgZRaeEL",
|
||||
"https://www.reddit.com/5wsn0p"
|
||||
]
|
||||
},
|
||||
],
|
||||
"count": 2
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
||||
|
||||
## GET /v1/kcomebacks/filter/daterange
|
||||
→ /v1/kcomebacks/filter/daterange?start=*<span style={{ color: "green" }}>start</span>*&end=*<span style={{ color: "green" }}>end</span>*&limit=*<span style={{ color: "green" }}>offset</span>*&limit=*<span style={{ color: "green" }}>limit</span>*
|
||||
|
||||
Get all comeback entries within a given timeframe
|
||||
|
||||
| Parameter | Type | Description | Example | Required | Default Value (if optional) |
|
||||
| --------- | ------------------- | ----------------------------------- | ---------- | -------- | --------------------------- |
|
||||
| start | Date (YYYY-MM-DD) | start date for date range | 2024-8-2 | Yes | - |
|
||||
| end | Date (YYYY-MM-DD) | end date for date range | 2024-10-22 | Yes | - |
|
||||
| limit | Number (0 ≤ n ≤ 50) | maximum amount of entries to select | 2 | Yes | - |
|
||||
| offset | Number (*posirive*) | offset from *id* `0` | 5 | Yes | - |
|
||||
|
||||
:::tip[**Example** Response]
|
||||
<Tabs>
|
||||
<TabItem value="200" label="200">
|
||||
```json
|
||||
{
|
||||
"results": [
|
||||
{
|
||||
"date": "2017-03-1",
|
||||
"time": "--:--",
|
||||
"artist": "Lim Heo Nil",
|
||||
"title": "Heart For Someone",
|
||||
"types": [
|
||||
"single",
|
||||
"digital"
|
||||
],
|
||||
"links": [
|
||||
"https://play.spotify.com…m/7lIMFbUB5tV8vqJT0gH40W",
|
||||
"https://www.reddit.com/5wsn0p"
|
||||
]
|
||||
},
|
||||
{
|
||||
"date": "2017-03-1",
|
||||
"time": "--:--",
|
||||
"artist": "PENOMECO",
|
||||
"title": "FILM",
|
||||
"types": [
|
||||
"single"
|
||||
],
|
||||
"links": [
|
||||
"https://play.spotify.com/album/2FwUxt5jYvcQc3ZgZRaeEL",
|
||||
"https://www.reddit.com/5wsn0p"
|
||||
]
|
||||
},
|
||||
],
|
||||
"count": 2
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
||||
|
||||
## GET /v1/kcomebacks/filter/first
|
||||
|
||||
Get the first (oldest) comeback entry
|
||||
|
||||
:::tip[**Example** Response]
|
||||
<Tabs>
|
||||
<TabItem value="200" label="200">
|
||||
```json
|
||||
{
|
||||
"results": [
|
||||
{
|
||||
"date": "2017-03-1",
|
||||
"time": "--:--",
|
||||
"artist": "Lim Heo Nil",
|
||||
"title": "Heart For Someone",
|
||||
"types": [
|
||||
"single",
|
||||
"digital"
|
||||
],
|
||||
"links": [
|
||||
"https://play.spotify.com…m/7lIMFbUB5tV8vqJT0gH40W",
|
||||
"https://www.reddit.com/5wsn0p"
|
||||
]
|
||||
}
|
||||
],
|
||||
"count": 1
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
||||
|
||||
## GET /v1/kcomebacks/filter/last
|
||||
|
||||
Get the last (most recent) comeback entry
|
||||
|
||||
:::tip[**Example** Response]
|
||||
<Tabs>
|
||||
<TabItem value="200" label="200">
|
||||
```json
|
||||
{
|
||||
"results": [
|
||||
{
|
||||
"date": "2017-03-1",
|
||||
"time": "--:--",
|
||||
"artist": "Lim Heo Nil",
|
||||
"title": "Heart For Someone",
|
||||
"types": [
|
||||
"single",
|
||||
"digital"
|
||||
],
|
||||
"links": [
|
||||
"https://play.spotify.com…m/7lIMFbUB5tV8vqJT0gH40W",
|
||||
"https://www.reddit.com/5wsn0p"
|
||||
]
|
||||
}
|
||||
],
|
||||
"count": 1
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
||||
|
||||
## GET /v1/kcomebacks/filter/artist
|
||||
→ /v1/kcomebacks/filter/daterange?artist=*<span style={{ color: "green" }}>artist</span>*&limit=*<span style={{ color: "green" }}>offset</span>*&limit=*<span style={{ color: "green" }}>limit</span>*
|
||||
|
||||
Get all comeback entries where the provided <span style={{ color: "green" }}>artist</span> string exists within an entrie's artist name
|
||||
|
||||
| Parameter | Type | Description | Example | Required | Default Value (if optional) |
|
||||
| --------- | ------------------- | ---------------------------------------------------- | ---------- | -------- | --------------------------- |
|
||||
| artist | String | Partial or full artist name (letter case irrelevant) | "Ateez" | Yes | - |
|
||||
| limit | Number (0 ≤ n ≤ 50) | maximum amount of entries to select | 2 | Yes | - |
|
||||
| offset | Number (*posirive*) | offset from *id* `0` | 5 | Yes | - |
|
||||
|
||||
:::tip[**Example** Response]
|
||||
<Tabs>
|
||||
<TabItem value="200" label="200">
|
||||
```json
|
||||
{
|
||||
"results": [
|
||||
{
|
||||
"date": "2017-03-1",
|
||||
"time": "--:--",
|
||||
"artist": "Lim Heo Nil",
|
||||
"title": "Heart For Someone",
|
||||
"types": [
|
||||
"single",
|
||||
"digital"
|
||||
],
|
||||
"links": [
|
||||
"https://play.spotify.com…m/7lIMFbUB5tV8vqJT0gH40W",
|
||||
"https://www.reddit.com/5wsn0p"
|
||||
]
|
||||
},
|
||||
{
|
||||
"date": "2017-03-1",
|
||||
"time": "--:--",
|
||||
"artist": "PENOMECO",
|
||||
"title": "FILM",
|
||||
"types": [
|
||||
"single"
|
||||
],
|
||||
"links": [
|
||||
"https://play.spotify.com/album/2FwUxt5jYvcQc3ZgZRaeEL",
|
||||
"https://www.reddit.com/5wsn0p"
|
||||
]
|
||||
},
|
||||
],
|
||||
"count": 2
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
||||
|
||||
## GET /v1/kcomebacks/filter/title
|
||||
→ /v1/kcomebacks/filter/title?title=*<span style={{ color: "green" }}>title</span>*&limit=*<span style={{ color: "green" }}>offset</span>*&limit=*<span style={{ color: "green" }}>limit</span>*
|
||||
|
||||
Get all comeback entries where the provided <span style={{ color: "green" }}>title</span> string exists within an entrie's song title
|
||||
|
||||
| Parameter | Type | Description | Example | Required | Default Value (if optional) |
|
||||
| --------- | ------------------- | --------------------------------------------------- | ---------- | -------- | --------------------------- |
|
||||
| title | String | Partial or full song title (letter case irrelevant) | "Sneakers" | Yes | - |
|
||||
| limit | Number (0 ≤ n ≤ 50) | maximum amount of entries to select | 2 | Yes | - |
|
||||
| offset | Number (*posirive*) | offset from *id* `0` | 5 | Yes | - |
|
||||
|
||||
:::tip[**Example** Response]
|
||||
<Tabs>
|
||||
<TabItem value="200" label="200">
|
||||
```json
|
||||
{
|
||||
"results": [
|
||||
{
|
||||
"date": "2017-03-1",
|
||||
"time": "--:--",
|
||||
"artist": "Lim Heo Nil",
|
||||
"title": "Heart For Someone",
|
||||
"types": [
|
||||
"single",
|
||||
"digital"
|
||||
],
|
||||
"links": [
|
||||
"https://play.spotify.com…m/7lIMFbUB5tV8vqJT0gH40W",
|
||||
"https://www.reddit.com/5wsn0p"
|
||||
]
|
||||
},
|
||||
{
|
||||
"date": "2017-03-1",
|
||||
"time": "--:--",
|
||||
"artist": "PENOMECO",
|
||||
"title": "FILM",
|
||||
"types": [
|
||||
"single"
|
||||
],
|
||||
"links": [
|
||||
"https://play.spotify.com/album/2FwUxt5jYvcQc3ZgZRaeEL",
|
||||
"https://www.reddit.com/5wsn0p"
|
||||
]
|
||||
},
|
||||
],
|
||||
"count": 2
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
||||
|
||||
## GET /v1/kcomebacks/filter/type
|
||||
→ /v1/kcomebacks/filter/type?type=*<span style={{ color: "green" }}>type</span>*&limit=*<span style={{ color: "green" }}>offset</span>*&limit=*<span style={{ color: "green" }}>limit</span>*
|
||||
|
||||
Get all comeback entries where the provided <span style={{ color: "green" }}>type</span> string equals to an entrie's type. All entry types can be fetched using [GET /v1/kcomebacks/filter/gettypes](#get-v1kcomebacksfiltergettypes)
|
||||
|
||||
| Parameter | Type | Description | Example | Required | Default Value (if optional) |
|
||||
| --------- | ------------------- | --------------------------------------------------- | ---------- | -------- | --------------------------- |
|
||||
| type | String | Full comeback type (letter case **RELEVANT**) | "single" | Yes | - |
|
||||
| limit | Number (0 ≤ n ≤ 50) | maximum amount of entries to select | 2 | Yes | - |
|
||||
| offset | Number (*posirive*) | offset from *id* `0` | 5 | Yes | - |
|
||||
|
||||
:::tip[**Example** Response]
|
||||
<Tabs>
|
||||
<TabItem value="200" label="200">
|
||||
```json
|
||||
{
|
||||
"results": [
|
||||
{
|
||||
"date": "2017-03-1",
|
||||
"time": "--:--",
|
||||
"artist": "Lim Heo Nil",
|
||||
"title": "Heart For Someone",
|
||||
"types": [
|
||||
"single",
|
||||
"digital"
|
||||
],
|
||||
"links": [
|
||||
"https://play.spotify.com…m/7lIMFbUB5tV8vqJT0gH40W",
|
||||
"https://www.reddit.com/5wsn0p"
|
||||
]
|
||||
},
|
||||
{
|
||||
"date": "2017-03-1",
|
||||
"time": "--:--",
|
||||
"artist": "PENOMECO",
|
||||
"title": "FILM",
|
||||
"types": [
|
||||
"single"
|
||||
],
|
||||
"links": [
|
||||
"https://play.spotify.com/album/2FwUxt5jYvcQc3ZgZRaeEL",
|
||||
"https://www.reddit.com/5wsn0p"
|
||||
]
|
||||
},
|
||||
],
|
||||
"count": 2
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
||||
|
||||
## GET /v1/kcomebacks/filter/gettypes
|
||||
|
||||
Get a list of the different types of all comeback entries
|
||||
|
||||
:::tip[**Example** Response]
|
||||
<Tabs>
|
||||
<TabItem value="200" label="200">
|
||||
```json
|
||||
{
|
||||
"results": [
|
||||
"album",
|
||||
"signle",
|
||||
"digital",
|
||||
"japanese",
|
||||
"..."
|
||||
],
|
||||
"total_results": 127
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
||||
|
||||
## GET /v1/kcomebacks/filter/getinfo
|
||||
|
||||
Get the <span style={{ color: "green" }}>entry-count</span>, <span style={{ color: "green" }}>artist-count</span>, <span style={{ color: "green" }}>start date</span> and <span style={{ color: "green" }}>end date</span>
|
||||
|
||||
:::tip[**Example** Response]
|
||||
<Tabs>
|
||||
<TabItem value="200" label="200">
|
||||
```json
|
||||
{
|
||||
"num_items": 143,
|
||||
"num_artists": 127,
|
||||
"start_date": "2017-3-1",
|
||||
"end_date": "2024-8-30"
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
||||
|
||||
## GET /v1/kcomebacks/upcoming/today
|
||||
|
||||
Get the upcoming or to be released comebacks of the current day
|
||||
|
||||
:::note
|
||||
|
||||
The timezone used for this query is `CEST UTC+02:00` while the timezone used for the entries is `KST UTC+09:00`
|
||||
|
||||
:::
|
||||
|
||||
:::tip[**Example** Response]
|
||||
<Tabs>
|
||||
<TabItem value="200" label="200">
|
||||
```json
|
||||
{
|
||||
"results": [
|
||||
{
|
||||
"date": "2017-03-1",
|
||||
"time": "--:--",
|
||||
"artist": "Lim Heo Nil",
|
||||
"title": "Heart For Someone",
|
||||
"types": [
|
||||
"single",
|
||||
"digital"
|
||||
],
|
||||
"links": [
|
||||
"https://play.spotify.com…m/7lIMFbUB5tV8vqJT0gH40W",
|
||||
"https://www.reddit.com/5wsn0p"
|
||||
]
|
||||
}
|
||||
],
|
||||
"count": 1
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
||||
|
||||
## GET /v1/kcomebacks/upcoming/week
|
||||
|
||||
Get the upcoming or to be released comebacks of the next 7 days
|
||||
|
||||
:::note
|
||||
|
||||
The timezone used for this query is `CEST UTC+02:00` while the timezone used for the entries is `KST UTC+09:00`
|
||||
|
||||
:::
|
||||
|
||||
:::tip[**Example** Response]
|
||||
<Tabs>
|
||||
<TabItem value="200" label="200">
|
||||
```json
|
||||
{
|
||||
"results": [
|
||||
{
|
||||
"date": "2017-03-1",
|
||||
"time": "--:--",
|
||||
"artist": "Lim Heo Nil",
|
||||
"title": "Heart For Someone",
|
||||
"types": [
|
||||
"single",
|
||||
"digital"
|
||||
],
|
||||
"links": [
|
||||
"https://play.spotify.com…m/7lIMFbUB5tV8vqJT0gH40W",
|
||||
"https://www.reddit.com/5wsn0p"
|
||||
]
|
||||
}
|
||||
],
|
||||
"count": 1
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
||||
|
||||
## GET /v1/kcomebacks/upcoming/month
|
||||
|
||||
Get the upcoming or to be released comebacks of the next 31 days
|
||||
|
||||
:::note
|
||||
|
||||
The timezone used for this query is `CEST UTC+02:00` while the timezone used for the entries is `KST UTC+09:00`
|
||||
|
||||
:::
|
||||
|
||||
:::tip[**Example** Response]
|
||||
<Tabs>
|
||||
<TabItem value="200" label="200">
|
||||
```json
|
||||
{
|
||||
"results": [
|
||||
{
|
||||
"date": "2017-03-1",
|
||||
"time": "--:--",
|
||||
"artist": "Lim Heo Nil",
|
||||
"title": "Heart For Someone",
|
||||
"types": [
|
||||
"single",
|
||||
"digital"
|
||||
],
|
||||
"links": [
|
||||
"https://play.spotify.com…m/7lIMFbUB5tV8vqJT0gH40W",
|
||||
"https://www.reddit.com/5wsn0p"
|
||||
]
|
||||
}
|
||||
],
|
||||
"count": 1
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
55
docs/API/v1-routes/minecraft-mod-update-checker.mdx
Normal file
55
docs/API/v1-routes/minecraft-mod-update-checker.mdx
Normal file
|
@ -0,0 +1,55 @@
|
|||
---
|
||||
sidebar_position: 5
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
# Minecraft Mod Update Checker
|
||||
A simple way for a mod to check if it is up to date
|
||||
|
||||
## GET /v1/updates/minecraft/mods/
|
||||
→ /v1/updates/minecraft/mods/*<span style={{ color: "green" }}>package</span>*/*<span style={{ color: "green" }}>modloader</span>*/*<span style={{ color: "green" }}>minecraftversion</span>*/*<span style={{ color: "green" }}>modversion</span>*
|
||||
|
||||
| Parameter | Type | Description | Example | Required | Default Value (if optional) |
|
||||
| ---------------- | ------------------- | --------------------------------------------------- | ------------------------- | -------- | --------------------------- |
|
||||
| package name | String | Full package name (letter case **RELEVANT**) | "me.jonasjones.mcwebserver" | Yes | - |
|
||||
| modloader | String | modloader id ("fabricquilt" or "forge") | "fabricquilt | Yes | - |
|
||||
| minecraftversion | Version Number | The Minecraft Version | "1.14.4" | Yes | - |
|
||||
| modversion | Version Number | The Mod Version | "0.3.2" | Yes | - |
|
||||
|
||||
:::tip[**Example** Response]
|
||||
<Tabs>
|
||||
<TabItem value="200" label="200">
|
||||
```json
|
||||
{
|
||||
"promos": {
|
||||
"latest": "0.3.2",
|
||||
"recommended": "0.3.2"
|
||||
},
|
||||
"upToDate": true,
|
||||
"telemetry_enabled": false
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
||||
|
||||
|
||||
:::danger[//TODO]
|
||||
|
||||
- Projects Database only `last_update` is done. others have been copied from kcomebacks as tamplates but didnt replace the shit yet.
|
||||
|
||||
- Missing Tabs for other error messages in ALL routes like BAD REQUEST and INTERNAL SERVER ERROR
|
||||
- Response variables types tables missing for ALL routes inside the individual resonse code tabs
|
||||
|
||||
:::
|
506
docs/API/v1-routes/projects-database.mdx
Normal file
506
docs/API/v1-routes/projects-database.mdx
Normal file
|
@ -0,0 +1,506 @@
|
|||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
# Projects Database
|
||||
A database of all my public projects that are also visible on my [projects site](https://jonasjones.dev/projects)
|
||||
|
||||
:::note
|
||||
|
||||
The projects are updated once a day
|
||||
|
||||
:::
|
||||
|
||||
|
||||
## GET /v1/projects/last_update
|
||||
|
||||
Get the date and time of the last update made to the projects database
|
||||
|
||||
:::tip[**Example** Response]
|
||||
<Tabs>
|
||||
<TabItem value="200" label="200">
|
||||
```json
|
||||
"2024-08-30 00:22:59 UTC"
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
||||
|
||||
## GET /v1/projects/filter/getall
|
||||
→ /v1/projects/filter/getall?limit=*<span style={{ color: "green" }}>limit</span>*&offset=*<span style={{ color: "green" }}>offset</span>*
|
||||
|
||||
Get all the comeback entries limited by <span style={{ color: "green" }}>limit</span> and <span style={{ color: "green" }}>offset</span>
|
||||
|
||||
| Parameter | Type | Description | Example | Required | Default Value (if optional) |
|
||||
| --------- | ------------------- | ----------------------------------- | ------- | -------- | --------------------------- |
|
||||
| limit | Number (0 ≤ n ≤ 50) | maximum amount of entries to select | 2 | Yes | - |
|
||||
| offset | Number (*posirive*) | offset from *id* `0` | 5 | Yes | - |
|
||||
|
||||
:::tip[**Example** Response]
|
||||
<Tabs>
|
||||
<TabItem value="200" label="200">
|
||||
```json
|
||||
{
|
||||
"results": [
|
||||
{
|
||||
"title": "Website",
|
||||
"description": "My website at https://jonasjones.dev",
|
||||
"status": "release",
|
||||
"statuscolor": "green",
|
||||
"categories": [
|
||||
"webdev",
|
||||
"website"
|
||||
],
|
||||
"languages": {
|
||||
"Svelte": 39242,
|
||||
"CSS": 5297,
|
||||
"JavaScript": 2652,
|
||||
"TypeScript": 1272,
|
||||
"HTML": 406
|
||||
},
|
||||
"gh_api": "JonasunderscoreJones/jonasjones.dev",
|
||||
"version": "1.2.3",
|
||||
"backgroud": "/homepage.png",
|
||||
"links": {
|
||||
"GH": "https://github.com/JonasunderscoreJones/jonasjones.dev"
|
||||
},
|
||||
"visible": true,
|
||||
"last_update": 1723941271
|
||||
},
|
||||
{
|
||||
"title": "Jonas_Jones API",
|
||||
"description": "api used for my website",
|
||||
"status": "release",
|
||||
"statuscolor": "green",
|
||||
"categories": [
|
||||
"api",
|
||||
"tools"
|
||||
],
|
||||
"languages": {
|
||||
"Rust": 73113
|
||||
},
|
||||
"gh_api": "JonasunderscoreJones/jonas_jones-api",
|
||||
"version": "0.4.1",
|
||||
"backgroud": "/jjapi.png",
|
||||
"links": {
|
||||
"GH": "https://github.com/JonasunderscoreJones/jonas_jones-api",
|
||||
"WB": "https://api.jonasjones.dev/v1/help"
|
||||
},
|
||||
"visible": true,
|
||||
"last_update": 1719693295
|
||||
}
|
||||
],
|
||||
"count": 2
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
||||
|
||||
## GET /v1/kcomebacks/filter/daterange
|
||||
→ /v1/kcomebacks/filter/daterange?start=*<span style={{ color: "green" }}>start</span>*&end=*<span style={{ color: "green" }}>end</span>*&limit=*<span style={{ color: "green" }}>offset</span>*&limit=*<span style={{ color: "green" }}>limit</span>*
|
||||
|
||||
Get all comeback entries within a given timeframe
|
||||
|
||||
| Parameter | Type | Description | Example | Required | Default Value (if optional) |
|
||||
| --------- | ------------------- | ----------------------------------- | ---------- | -------- | --------------------------- |
|
||||
| start | Date (YYYY-MM-DD) | start date for date range | 2024-8-2 | Yes | - |
|
||||
| end | Date (YYYY-MM-DD) | end date for date range | 2024-10-22 | Yes | - |
|
||||
| limit | Number (0 ≤ n ≤ 50) | maximum amount of entries to select | 2 | Yes | - |
|
||||
| offset | Number (*posirive*) | offset from *id* `0` | 5 | Yes | - |
|
||||
|
||||
:::tip[**Example** Response]
|
||||
<Tabs>
|
||||
<TabItem value="200" label="200">
|
||||
```json
|
||||
{
|
||||
"results": [
|
||||
{
|
||||
"date": "2017-03-1",
|
||||
"time": "--:--",
|
||||
"artist": "Lim Heo Nil",
|
||||
"title": "Heart For Someone",
|
||||
"types": [
|
||||
"single",
|
||||
"digital"
|
||||
],
|
||||
"links": [
|
||||
"https://play.spotify.com…m/7lIMFbUB5tV8vqJT0gH40W",
|
||||
"https://www.reddit.com/5wsn0p"
|
||||
]
|
||||
},
|
||||
{
|
||||
"date": "2017-03-1",
|
||||
"time": "--:--",
|
||||
"artist": "PENOMECO",
|
||||
"title": "FILM",
|
||||
"types": [
|
||||
"single"
|
||||
],
|
||||
"links": [
|
||||
"https://play.spotify.com/album/2FwUxt5jYvcQc3ZgZRaeEL",
|
||||
"https://www.reddit.com/5wsn0p"
|
||||
]
|
||||
},
|
||||
],
|
||||
"count": 2
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
||||
|
||||
## GET /v1/kcomebacks/filter/first
|
||||
|
||||
Get the first (oldest) comeback entry
|
||||
|
||||
:::tip[**Example** Response]
|
||||
<Tabs>
|
||||
<TabItem value="200" label="200">
|
||||
```json
|
||||
{
|
||||
"results": [
|
||||
{
|
||||
"date": "2017-03-1",
|
||||
"time": "--:--",
|
||||
"artist": "Lim Heo Nil",
|
||||
"title": "Heart For Someone",
|
||||
"types": [
|
||||
"single",
|
||||
"digital"
|
||||
],
|
||||
"links": [
|
||||
"https://play.spotify.com…m/7lIMFbUB5tV8vqJT0gH40W",
|
||||
"https://www.reddit.com/5wsn0p"
|
||||
]
|
||||
}
|
||||
],
|
||||
"count": 1
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
||||
|
||||
## GET /v1/kcomebacks/filter/last
|
||||
|
||||
Get the last (most recent) comeback entry
|
||||
|
||||
:::tip[**Example** Response]
|
||||
<Tabs>
|
||||
<TabItem value="200" label="200">
|
||||
```json
|
||||
{
|
||||
"results": [
|
||||
{
|
||||
"date": "2017-03-1",
|
||||
"time": "--:--",
|
||||
"artist": "Lim Heo Nil",
|
||||
"title": "Heart For Someone",
|
||||
"types": [
|
||||
"single",
|
||||
"digital"
|
||||
],
|
||||
"links": [
|
||||
"https://play.spotify.com…m/7lIMFbUB5tV8vqJT0gH40W",
|
||||
"https://www.reddit.com/5wsn0p"
|
||||
]
|
||||
}
|
||||
],
|
||||
"count": 1
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
||||
|
||||
## GET /v1/kcomebacks/filter/artist
|
||||
→ /v1/kcomebacks/filter/daterange?artist=*<span style={{ color: "green" }}>artist</span>*&limit=*<span style={{ color: "green" }}>offset</span>*&limit=*<span style={{ color: "green" }}>limit</span>*
|
||||
|
||||
Get all comeback entries where the provided <span style={{ color: "green" }}>artist</span> string exists within an entrie's artist name
|
||||
|
||||
| Parameter | Type | Description | Example | Required | Default Value (if optional) |
|
||||
| --------- | ------------------- | ---------------------------------------------------- | ---------- | -------- | --------------------------- |
|
||||
| artist | String | Partial or full artist name (letter case irrelevant) | "Ateez" | Yes | - |
|
||||
| limit | Number (0 ≤ n ≤ 50) | maximum amount of entries to select | 2 | Yes | - |
|
||||
| offset | Number (*posirive*) | offset from *id* `0` | 5 | Yes | - |
|
||||
|
||||
:::tip[**Example** Response]
|
||||
<Tabs>
|
||||
<TabItem value="200" label="200">
|
||||
```json
|
||||
{
|
||||
"results": [
|
||||
{
|
||||
"date": "2017-03-1",
|
||||
"time": "--:--",
|
||||
"artist": "Lim Heo Nil",
|
||||
"title": "Heart For Someone",
|
||||
"types": [
|
||||
"single",
|
||||
"digital"
|
||||
],
|
||||
"links": [
|
||||
"https://play.spotify.com…m/7lIMFbUB5tV8vqJT0gH40W",
|
||||
"https://www.reddit.com/5wsn0p"
|
||||
]
|
||||
},
|
||||
{
|
||||
"date": "2017-03-1",
|
||||
"time": "--:--",
|
||||
"artist": "PENOMECO",
|
||||
"title": "FILM",
|
||||
"types": [
|
||||
"single"
|
||||
],
|
||||
"links": [
|
||||
"https://play.spotify.com/album/2FwUxt5jYvcQc3ZgZRaeEL",
|
||||
"https://www.reddit.com/5wsn0p"
|
||||
]
|
||||
},
|
||||
],
|
||||
"count": 2
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
||||
|
||||
## GET /v1/kcomebacks/filter/title
|
||||
→ /v1/kcomebacks/filter/title?title=*<span style={{ color: "green" }}>title</span>*&limit=*<span style={{ color: "green" }}>offset</span>*&limit=*<span style={{ color: "green" }}>limit</span>*
|
||||
|
||||
Get all comeback entries where the provided <span style={{ color: "green" }}>title</span> string exists within an entrie's song title
|
||||
|
||||
| Parameter | Type | Description | Example | Required | Default Value (if optional) |
|
||||
| --------- | ------------------- | --------------------------------------------------- | ---------- | -------- | --------------------------- |
|
||||
| title | String | Partial or full song title (letter case irrelevant) | "Sneakers" | Yes | - |
|
||||
| limit | Number (0 ≤ n ≤ 50) | maximum amount of entries to select | 2 | Yes | - |
|
||||
| offset | Number (*posirive*) | offset from *id* `0` | 5 | Yes | - |
|
||||
|
||||
:::tip[**Example** Response]
|
||||
<Tabs>
|
||||
<TabItem value="200" label="200">
|
||||
```json
|
||||
{
|
||||
"results": [
|
||||
{
|
||||
"date": "2017-03-1",
|
||||
"time": "--:--",
|
||||
"artist": "Lim Heo Nil",
|
||||
"title": "Heart For Someone",
|
||||
"types": [
|
||||
"single",
|
||||
"digital"
|
||||
],
|
||||
"links": [
|
||||
"https://play.spotify.com…m/7lIMFbUB5tV8vqJT0gH40W",
|
||||
"https://www.reddit.com/5wsn0p"
|
||||
]
|
||||
},
|
||||
{
|
||||
"date": "2017-03-1",
|
||||
"time": "--:--",
|
||||
"artist": "PENOMECO",
|
||||
"title": "FILM",
|
||||
"types": [
|
||||
"single"
|
||||
],
|
||||
"links": [
|
||||
"https://play.spotify.com/album/2FwUxt5jYvcQc3ZgZRaeEL",
|
||||
"https://www.reddit.com/5wsn0p"
|
||||
]
|
||||
},
|
||||
],
|
||||
"count": 2
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
||||
|
||||
## GET /v1/kcomebacks/filter/type
|
||||
→ /v1/kcomebacks/filter/type?type=*<span style={{ color: "green" }}>type</span>*&limit=*<span style={{ color: "green" }}>offset</span>*&limit=*<span style={{ color: "green" }}>limit</span>*
|
||||
|
||||
Get all comeback entries where the provided <span style={{ color: "green" }}>type</span> string equals to an entrie's type. All entry types can be fetched using [GET /v1/v1/kcomebacks/filter/gettypes](#get-kcomebacksfiltergettypes)
|
||||
|
||||
| Parameter | Type | Description | Example | Required | Default Value (if optional) |
|
||||
| --------- | ------------------- | --------------------------------------------------- | ---------- | -------- | --------------------------- |
|
||||
| type | String | Full comeback type (letter case **RELEVANT**) | "single" | Yes | - |
|
||||
| limit | Number (0 ≤ n ≤ 50) | maximum amount of entries to select | 2 | Yes | - |
|
||||
| offset | Number (*posirive*) | offset from *id* `0` | 5 | Yes | - |
|
||||
|
||||
:::tip[**Example** Response]
|
||||
<Tabs>
|
||||
<TabItem value="200" label="200">
|
||||
```json
|
||||
{
|
||||
"results": [
|
||||
{
|
||||
"date": "2017-03-1",
|
||||
"time": "--:--",
|
||||
"artist": "Lim Heo Nil",
|
||||
"title": "Heart For Someone",
|
||||
"types": [
|
||||
"single",
|
||||
"digital"
|
||||
],
|
||||
"links": [
|
||||
"https://play.spotify.com…m/7lIMFbUB5tV8vqJT0gH40W",
|
||||
"https://www.reddit.com/5wsn0p"
|
||||
]
|
||||
},
|
||||
{
|
||||
"date": "2017-03-1",
|
||||
"time": "--:--",
|
||||
"artist": "PENOMECO",
|
||||
"title": "FILM",
|
||||
"types": [
|
||||
"single"
|
||||
],
|
||||
"links": [
|
||||
"https://play.spotify.com/album/2FwUxt5jYvcQc3ZgZRaeEL",
|
||||
"https://www.reddit.com/5wsn0p"
|
||||
]
|
||||
},
|
||||
],
|
||||
"count": 2
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
||||
|
||||
## GET /v1/kcomebacks/filter/gettypes
|
||||
|
||||
Get a list of the different types of all comeback entries
|
||||
|
||||
:::tip[**Example** Response]
|
||||
<Tabs>
|
||||
<TabItem value="200" label="200">
|
||||
```json
|
||||
{
|
||||
"results": [
|
||||
"album",
|
||||
"signle",
|
||||
"digital",
|
||||
"japanese",
|
||||
"..."
|
||||
],
|
||||
"total_results": 127
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
||||
|
||||
## GET /v1/kcomebacks/filter/getinfo
|
||||
|
||||
Get the <span style={{ color: "green" }}>entry-count</span>, <span style={{ color: "green" }}>artist-count</span>, <span style={{ color: "green" }}>start date</span> and <span style={{ color: "green" }}>end date</span>
|
||||
|
||||
:::tip[**Example** Response]
|
||||
<Tabs>
|
||||
<TabItem value="200" label="200">
|
||||
```json
|
||||
{
|
||||
"num_items": 143,
|
||||
"num_artists": 127,
|
||||
"start_date": "2017-3-1",
|
||||
"end_date": "2024-8-30"
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
90
docs/API/v1-routes/run-scipts.mdx
Normal file
90
docs/API/v1-routes/run-scipts.mdx
Normal file
|
@ -0,0 +1,90 @@
|
|||
---
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
# Run Scripts
|
||||
The available run-scripts routes for the pre-setup python scripts for the [K-Comebacks Database](./k-comebacks-database) ([on Github](https://github.com/JonasunderscoreJones/turbo-octo-potato/blob/main/rpopfetch.py)), [Projects Database](./projects-database) ([on Github](https://github.com/JonasunderscoreJones/turbo-octo-potato/blob/main/update_projects.py)) and the [likesongsync2.py script](https://github.com/JonasunderscoreJones/turbo-octo-potato/blob/main/likedsongsync2.py]).
|
||||
|
||||
:::note
|
||||
|
||||
If the requested script is already running, the request will be ignored.
|
||||
|
||||
:::
|
||||
|
||||
## GET /v1/run/kcomebacks
|
||||
|
||||
Run the [rpopfetch.py Script](https://github.com/JonasunderscoreJones/turbo-octo-potato/blob/main/rpopfetch.py) to update the [K-Comebacks Database](./k-comebacks-database)
|
||||
|
||||
:::tip[**Example** Response]
|
||||
<Tabs>
|
||||
<TabItem value="200" label="200">
|
||||
```json
|
||||
{
|
||||
"status": "udating..."
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
||||
|
||||
## GET /v1/run/projects
|
||||
|
||||
Run the [update_projects.py Script](https://github.com/JonasunderscoreJones/turbo-octo-potato/blob/main/update_projects.py) to update the [Projects Database](./projects-database)
|
||||
|
||||
:::tip[**Example** Response]
|
||||
<Tabs>
|
||||
<TabItem value="200" label="200">
|
||||
```json
|
||||
{
|
||||
"status": "udating..."
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
||||
|
||||
## GET /v1/run/synclikedsongs
|
||||
|
||||
Run the [likedsongsync2.py Script](https://github.com/JonasunderscoreJones/turbo-octo-potato/blob/main/likedsongsync2.py) to sync my liked songs from Spotify with [Last.fm](https://fm.jonasjones.dev)
|
||||
|
||||
:::tip[**Example** Response]
|
||||
<Tabs>
|
||||
<TabItem value="200" label="200">
|
||||
```json
|
||||
{
|
||||
"status": "udating..."
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
Loading…
Add table
Add a link
Reference in a new issue