MinPluto/docs/api.mdx

95 lines
1.7 KiB
Text
Raw Permalink Normal View History

2024-10-24 16:16:19 -05:00
---
Title: API
Type: Document
---
---
import { Prism } from '@astrojs/prism';
2024-10-24 16:16:19 -05:00
## Generic
**Language**
`/api/language/` [`en` | `jp`]
**Telemtry**
`/api/telemtry/` [`enable` | `disable`]
## Player
**Milieu**
`/api/player/milieu/` [`enable` | `disable`]
Enable or disable the Milieu mode.
## Account System
**Register**
`/api/auth/register`
*Required*
- `name`
- `email`
- `password`
When a user registered an account, it is processed with the following data:
<Prism lang="json" code={
`
2024-10-24 16:16:19 -05:00
{
"name": "PROVIDED_NAME",
"ui_theme": "Default",
"ui_color": "Default",
"ui_zen": "false",
"ui_sidebar_size": "Normal",
"invidous_data": "https://yt.sudovanilla.org",
"invidous_media": "https://yt.sudovanilla.org",
"safetwitch_data": "https://twitch.sudovanilla.org",
"safetwitch_media": "https://twitch.sudovanilla.org",
"image_proxy": "https://ipx.sudovanilla.org",
"player_type": "Zorn"
}
`
} />
2024-10-24 16:16:19 -05:00
The end-user is then redirected to `/?=welcome` with an onboarding screen(Planned, this actually does nothing for now).
Before logging in, end-users are required to verify their email first before logging in.
**Confirm**
`/api/auth/confirm`
*Required*
- `email`
- `code`
As mention just before, end-users are required to verify their email first before logging in. After registration, end-users are brought to a "Confirm Email" page.
It is required that the email in question is provided, along with the code sent to that email from the SMTP server.
**Login**
`/api/auth/login`
*Required*
- `email`
- `password`
**Logout**
`/api/auth/logout`
**Update Name**
`/api/update/name`
*Required*
- `name`
**Update Email**
`/api/update/email`
*Required*
- `email`