Improve this
This commit is contained in:
4 files changed
+65
-16
No files matched your search
+27
-2
@@ -136,6 +136,12 @@ app.get('/comments/account', handler => commentsAccountGetHandler(handler), {
|
||||
description:
|
||||
'The page you want to get, starts from `0`. Default is `0`.'
|
||||
})
|
||||
),
|
||||
amount: t.Optional(
|
||||
t.String({
|
||||
description:
|
||||
'The amount of comments you want to get. Default is `10`. Range is `1`-`100`.'
|
||||
})
|
||||
)
|
||||
})
|
||||
})
|
||||
@@ -154,6 +160,17 @@ app.get(
|
||||
description:
|
||||
'The page you want to get, starts from `0`. Default is `0`.'
|
||||
})
|
||||
),
|
||||
amount: t.Optional(
|
||||
t.String({
|
||||
description:
|
||||
'The amount of comments you want to get. Default is `10`. Range is `1`-`100`.'
|
||||
})
|
||||
),
|
||||
mode: t.Optional(
|
||||
t.Union([t.Literal('recent'), t.Literal('top')], {
|
||||
description: 'Default is `recent`.'
|
||||
})
|
||||
)
|
||||
})
|
||||
}
|
||||
@@ -171,9 +188,17 @@ app.get('/comments/level', handler => commentsLevelGetHandler(handler), {
|
||||
'The page you want to get, starts from `0`. Default is `0`.'
|
||||
})
|
||||
),
|
||||
mode: t.Union([t.Literal('0'), t.Literal('1')], {
|
||||
description: '0 for top, 1 for recent'
|
||||
amount: t.Optional(
|
||||
t.String({
|
||||
description:
|
||||
'The amount of comments you want to get. Default is `10`. Range is `1`-`100`.'
|
||||
})
|
||||
),
|
||||
mode: t.Optional(
|
||||
t.Union([t.Literal('recent'), t.Literal('top')], {
|
||||
description: 'Default is `recent`.'
|
||||
})
|
||||
)
|
||||
})
|
||||
})
|
||||
app.get(
|
||||
|
||||
@@ -5,6 +5,7 @@ import { Context } from 'elysia'
|
||||
export const handler = async (handler: Context) => {
|
||||
const id = handler.query.id
|
||||
const page = handler.query.page
|
||||
const amount = handler.query.amount
|
||||
|
||||
const request = await axios.post(
|
||||
'https://www.boomlings.com/database/getGJAccountComments20.php',
|
||||
@@ -13,6 +14,7 @@ export const handler = async (handler: Context) => {
|
||||
binaryVersion: '45',
|
||||
accountID: id,
|
||||
page: page ?? '0',
|
||||
count: amount ?? '10',
|
||||
secret: 'Wmfd2893gb7'
|
||||
}),
|
||||
{
|
||||
@@ -33,12 +35,19 @@ export const handler = async (handler: Context) => {
|
||||
responseSplit.map(item => {
|
||||
const commentInfo = item[0]
|
||||
|
||||
return {
|
||||
const data = {
|
||||
id: +commentInfo['6'],
|
||||
content: atob(commentInfo['2']),
|
||||
content: commentInfo['2'],
|
||||
decodeFailed: false,
|
||||
likes: +commentInfo['4'],
|
||||
date: commentInfo['9'] + ' ago'
|
||||
}
|
||||
try {
|
||||
data.content = atob(data.content)
|
||||
} catch {
|
||||
data.decodeFailed = true
|
||||
}
|
||||
return data
|
||||
})
|
||||
)
|
||||
}
|
||||
@@ -5,6 +5,8 @@ import { Context } from 'elysia'
|
||||
export const handler = async (handler: Context) => {
|
||||
const id = handler.query.id
|
||||
const page = handler.query.page
|
||||
const mode = handler.query.mode
|
||||
const amount = handler.query.amount
|
||||
|
||||
const request = await axios.post(
|
||||
'https://www.boomlings.com/database/getGJCommentHistory.php',
|
||||
@@ -13,8 +15,9 @@ export const handler = async (handler: Context) => {
|
||||
binaryVersion: '45',
|
||||
page: page ?? '0',
|
||||
secret: 'Wmfd2893gb7',
|
||||
mode: '1',
|
||||
userID: id
|
||||
mode: mode ? (mode == 'recent' ? '0' : '1') : '0', //Don't worry about it
|
||||
userID: id,
|
||||
count: amount ?? '10'
|
||||
}),
|
||||
{
|
||||
headers: {
|
||||
@@ -35,10 +38,11 @@ export const handler = async (handler: Context) => {
|
||||
const commentInfo = item[0]
|
||||
const accountInfo = item[1]
|
||||
|
||||
return {
|
||||
const data = {
|
||||
id: +commentInfo['6'],
|
||||
levelId: +commentInfo['1'],
|
||||
content: atob(commentInfo['2']),
|
||||
content: commentInfo['2'],
|
||||
decodeFailed: false,
|
||||
likes: +commentInfo['4'],
|
||||
date: commentInfo['9'] + ' ago',
|
||||
commentColor: commentInfo['12']
|
||||
@@ -61,6 +65,12 @@ export const handler = async (handler: Context) => {
|
||||
}
|
||||
}
|
||||
}
|
||||
try {
|
||||
data.content = atob(data.content)
|
||||
} catch {
|
||||
data.decodeFailed = true
|
||||
}
|
||||
return data
|
||||
})
|
||||
)
|
||||
}
|
||||
@@ -6,21 +6,19 @@ export const handler = async (handler: Context) => {
|
||||
const id = handler.query.id
|
||||
const page = handler.query.page
|
||||
const mode = handler.query.mode
|
||||
const amount = handler.query.amount
|
||||
|
||||
const request = await axios.post(
|
||||
'https://www.boomlings.com/database/getGJComments21.php',
|
||||
new URLSearchParams({
|
||||
gameVersion: '22',
|
||||
binaryVersion: '45',
|
||||
udid: 'BEA53432-326F-4D39-91D7-2B51B849825E',
|
||||
uuid: '241138636',
|
||||
accountID: '28945106',
|
||||
gjp2: '836845372d7a726b35f627bcc491d4e122782c17',
|
||||
page: page ?? '0',
|
||||
total: '0',
|
||||
secret: 'Wmfd2893gb7',
|
||||
mode,
|
||||
levelID: id
|
||||
mode: mode ? (mode == 'recent' ? '0' : '1') : '0', //Don't worry about it
|
||||
levelID: id,
|
||||
count: amount ?? '10'
|
||||
}),
|
||||
{
|
||||
headers: {
|
||||
@@ -41,9 +39,10 @@ export const handler = async (handler: Context) => {
|
||||
const commentInfo = item[0]
|
||||
const accountInfo = item[1]
|
||||
|
||||
return {
|
||||
const data = {
|
||||
id: +commentInfo['6'],
|
||||
content: atob(commentInfo['2']),
|
||||
content: commentInfo['2'],
|
||||
decodeFailed: false,
|
||||
likes: +commentInfo['4'],
|
||||
date: commentInfo['9'] + ' ago',
|
||||
commentColor: commentInfo['12']
|
||||
@@ -66,6 +65,12 @@ export const handler = async (handler: Context) => {
|
||||
}
|
||||
}
|
||||
}
|
||||
try {
|
||||
data.content = atob(data.content)
|
||||
} catch {
|
||||
data.decodeFailed = true
|
||||
}
|
||||
return data
|
||||
})
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user