Map packs
This commit is contained in:
3 files changed
+46
-1
No files matched your search
@@ -7,9 +7,9 @@ A wrapper for the official Geometry Dash API
|
||||
### Get
|
||||
|
||||
- [x] Get gauntlets (not names yet)
|
||||
- [x] Get map packs
|
||||
- [ ] Get Levels List
|
||||
- [ ] Get save data
|
||||
- [ ] Get map packs
|
||||
- [ ] Get level lists (same as map packs?)
|
||||
- [ ] Get top artists (not sure what this is)
|
||||
- [ ] Get user (profile?)
|
||||
|
||||
@@ -3,11 +3,14 @@ import { jsonResponse } from './lib/util'
|
||||
|
||||
import { handler as gauntletsGetHandler } from './routes/gauntlets/get'
|
||||
|
||||
import { handler as mapPacksGetHandler } from './routes/map-packs/get'
|
||||
|
||||
const app = new Elysia()
|
||||
|
||||
app.listen(3692)
|
||||
|
||||
app.get('/gauntlets', gauntletsGetHandler)
|
||||
app.get('/map-packs', mapPacksGetHandler)
|
||||
app.all('*', () =>
|
||||
jsonResponse(
|
||||
{
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
import axios from 'axios'
|
||||
import { jsonResponse } from '../../lib/util'
|
||||
|
||||
export const handler = async () => {
|
||||
const request = await axios.post(
|
||||
'https://www.boomlings.com/database/getGJMapPacks21.php',
|
||||
new URLSearchParams({
|
||||
gameVersion: '22',
|
||||
binaryVersion: '45',
|
||||
udid: 'BEA53432-326F-4D39-91D7-2B51B849825E',
|
||||
uuid: '329348841',
|
||||
count: '250',
|
||||
page: '0',
|
||||
secret: 'Wmfd2893gb7'
|
||||
}),
|
||||
{
|
||||
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: split[3],
|
||||
levels: split[5].split(','),
|
||||
stars: split[7],
|
||||
coins: split[9],
|
||||
difficulty: split[11],
|
||||
barColor: JSON.parse('[' + split[13] + ']'),
|
||||
textColor: JSON.parse('[' + split[15] + ']')
|
||||
}
|
||||
})
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user