Add get gauntlets endpoint

This commit is contained in:
Lncvrt committed 2026-02-19 19:54:11 -07:00
1 parent f10922d0b0
commit 1390199fed
6 files changed
+103 -1

No files matched your search

+14
View File
@@ -1,9 +1,23 @@
import { Elysia } from 'elysia'
import { jsonResponse } from './lib/util'
import { handler as gauntletsGetHandler } from './routes/gauntlets/get'
const app = new Elysia()
app.listen(3692)
app.get('/gauntlets', gauntletsGetHandler)
app.all('*', () =>
jsonResponse(
{
success: false,
message: 'Endpoint not found (are you using the correct request method?)'
},
404
)
)
console.log(
`Geometry Dash API Server started on http://${app.server?.hostname}:${app.server?.port}/`
)
+6
View File
@@ -0,0 +1,6 @@
export const jsonResponse = (data: any, status = 200) => {
return new Response(JSON.stringify(data, null, 2), {
status,
headers: { 'Content-Type': 'application/json' }
})
}
+34
View File
@@ -0,0 +1,34 @@
import axios from 'axios'
import { jsonResponse } from '../../lib/util'
export const handler = async () => {
const request = await axios.post(
'https://www.boomlings.com/database/getGJGauntlets21.php',
new URLSearchParams({
gameVersion: '22',
binaryVersion: '45',
secret: 'Wmfd2893gb7',
special: '1'
}),
{
headers: {
'User-Agent': ' ',
Cookie: 'gd=1'
}
}
)
const responseText = request.data as string
const responseSplit = responseText.split('#')[0].split('|')
return jsonResponse(
responseSplit.map(item => {
const split = item.split(':')
return {
id: split[1],
name: 'n/a',
levels: split[3].split(',')
}
})
)
}