mirror of
https://github.com/JonasunderscoreJones/docs.jonasjones.dev.git
synced 2025-10-23 11:09:18 +02:00
moved stuff around to fix slug system
This commit is contained in:
parent
31a1419cb4
commit
1f96b8fde1
11 changed files with 6 additions and 4 deletions
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"
|
||||
}
|
||||
}
|
167
docs/api/v1-routes/basic.mdx
Normal file
167
docs/api/v1-routes/basic.mdx
Normal file
|
@ -0,0 +1,167 @@
|
|||
---
|
||||
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="500" label="500">
|
||||
```json
|
||||
{
|
||||
"status": 500,
|
||||
"statusText": "Internal Server Error"
|
||||
}
|
||||
```
|
||||
| Parameter | Type | Description |
|
||||
| ---------- | ------ | ---------------------------- |
|
||||
| status | Number | The status code of the error |
|
||||
| statusText | String | The status text of the error |
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
| Parameter | Type | Description |
|
||||
| ---------- | ------ | ---------------------------- |
|
||||
| status | Number | The status code of the error |
|
||||
| statusText | String | The status text of the error |
|
||||
</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="500" label="500">
|
||||
```json
|
||||
{
|
||||
"status": 500,
|
||||
"statusText": "Internal Server Error"
|
||||
}
|
||||
```
|
||||
| Parameter | Type | Description |
|
||||
| ---------- | ------ | ---------------------------- |
|
||||
| status | Number | The status code of the error |
|
||||
| statusText | String | The status text of the error |
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
| Parameter | Type | Description |
|
||||
| ---------- | ------ | ---------------------------- |
|
||||
| status | Number | The status code of the error |
|
||||
| statusText | String | The status text of the error |
|
||||
</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="500" label="500">
|
||||
```json
|
||||
{
|
||||
"status": 500,
|
||||
"statusText": "Internal Server Error"
|
||||
}
|
||||
```
|
||||
| Parameter | Type | Description |
|
||||
| ---------- | ------ | ---------------------------- |
|
||||
| status | Number | The status code of the error |
|
||||
| statusText | String | The status text of the error |
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
| Parameter | Type | Description |
|
||||
| ---------- | ------ | ---------------------------- |
|
||||
| status | Number | The status code of the error |
|
||||
| statusText | String | The status text of the error |
|
||||
</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="500" label="500">
|
||||
```json
|
||||
{
|
||||
"status": 500,
|
||||
"statusText": "Internal Server Error"
|
||||
}
|
||||
```
|
||||
| Parameter | Type | Description |
|
||||
| ---------- | ------ | ---------------------------- |
|
||||
| status | Number | The status code of the error |
|
||||
| statusText | String | The status text of the error |
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
| Parameter | Type | Description |
|
||||
| ---------- | ------ | ---------------------------- |
|
||||
| status | Number | The status code of the error |
|
||||
| statusText | String | The status text of the error |
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
1089
docs/api/v1-routes/k-comebacks-database.mdx
Normal file
1089
docs/api/v1-routes/k-comebacks-database.mdx
Normal file
File diff suppressed because it is too large
Load diff
79
docs/api/v1-routes/minecraft-mod-update-checker.mdx
Normal file
79
docs/api/v1-routes/minecraft-mod-update-checker.mdx
Normal file
|
@ -0,0 +1,79 @@
|
|||
---
|
||||
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
|
||||
}
|
||||
```
|
||||
| Parameter | Type | Description |
|
||||
| ----------------- | -------------- | ----------------------------------------------------------------------------- |
|
||||
| latest | Version Number | The version number of the latest version for the given Minecraft Version |
|
||||
| recommended | Version Number | The version number of the recommended version for the given Minecraft Version |
|
||||
| upToDate | Boolean | Wether the mod is up to date or not |
|
||||
| telemetry_enabled | Boolean | Wether telemetry is enabled or not |
|
||||
</TabItem>
|
||||
<TabItem value="400" label="400">
|
||||
```json
|
||||
{
|
||||
"status": 400,
|
||||
"statusText": "Bad Request"
|
||||
}
|
||||
```
|
||||
| Parameter | Type | Description |
|
||||
| ---------- | ------ | ---------------------------- |
|
||||
| status | Number | The status code of the error |
|
||||
| statusText | String | The status text of the error |
|
||||
</TabItem>
|
||||
<TabItem value="500" label="500">
|
||||
```json
|
||||
{
|
||||
"status": 500,
|
||||
"statusText": "Internal Server Error"
|
||||
}
|
||||
```
|
||||
| Parameter | Type | Description |
|
||||
| ---------- | ------ | ---------------------------- |
|
||||
| status | Number | The status code of the error |
|
||||
| statusText | String | The status text of the error |
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
| Parameter | Type | Description |
|
||||
| ---------- | ------ | ---------------------------- |
|
||||
| status | Number | The status code of the error |
|
||||
| statusText | String | The status text of the error |
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
1375
docs/api/v1-routes/projects-database.mdx
Normal file
1375
docs/api/v1-routes/projects-database.mdx
Normal file
File diff suppressed because it is too large
Load diff
147
docs/api/v1-routes/run-scipts.mdx
Normal file
147
docs/api/v1-routes/run-scipts.mdx
Normal file
|
@ -0,0 +1,147 @@
|
|||
---
|
||||
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..."
|
||||
}
|
||||
```
|
||||
| Parameter | Type | Description |
|
||||
| ---------- | ------ | -------------------------------- |
|
||||
| status | String | The status message of the script |
|
||||
</TabItem>
|
||||
<TabItem value="500" label="500">
|
||||
```json
|
||||
{
|
||||
"status": 500,
|
||||
"statusText": "Internal Server Error"
|
||||
}
|
||||
```
|
||||
| Parameter | Type | Description |
|
||||
| ---------- | ------ | ---------------------------- |
|
||||
| status | Number | The status code of the error |
|
||||
| statusText | String | The status text of the error |
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
| Parameter | Type | Description |
|
||||
| ---------- | ------ | ---------------------------- |
|
||||
| status | Number | The status code of the error |
|
||||
| statusText | String | The status text of the error |
|
||||
</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..."
|
||||
}
|
||||
```
|
||||
| Parameter | Type | Description |
|
||||
| ---------- | ------ | -------------------------------- |
|
||||
| status | String | The status message of the script |
|
||||
</TabItem>
|
||||
<TabItem value="500" label="500">
|
||||
```json
|
||||
{
|
||||
"status": 500,
|
||||
"statusText": "Internal Server Error"
|
||||
}
|
||||
```
|
||||
| Parameter | Type | Description |
|
||||
| ---------- | ------ | ---------------------------- |
|
||||
| status | Number | The status code of the error |
|
||||
| statusText | String | The status text of the error |
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
| Parameter | Type | Description |
|
||||
| ---------- | ------ | ---------------------------- |
|
||||
| status | Number | The status code of the error |
|
||||
| statusText | String | The status text of the error |
|
||||
</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..."
|
||||
}
|
||||
```
|
||||
| Parameter | Type | Description |
|
||||
| ---------- | ------ | -------------------------------- |
|
||||
| status | String | The status message of the script |
|
||||
</TabItem>
|
||||
<TabItem value="500" label="500">
|
||||
```json
|
||||
{
|
||||
"status": 500,
|
||||
"statusText": "Internal Server Error"
|
||||
}
|
||||
```
|
||||
| Parameter | Type | Description |
|
||||
| ---------- | ------ | ---------------------------- |
|
||||
| status | Number | The status code of the error |
|
||||
| statusText | String | The status text of the error |
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
| Parameter | Type | Description |
|
||||
| ---------- | ------ | ---------------------------- |
|
||||
| status | Number | The status code of the error |
|
||||
| statusText | String | The status text of the error |
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
Loading…
Add table
Add a link
Reference in a new issue