gj-boomlings-api 1.3.2 → 1.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -12
- package/functions/blockUser.js +1 -2
- package/functions/deleteAccountPost.js +2 -0
- package/functions/deleteComment.js +2 -0
- package/functions/dlLevel.js +6 -2
- package/functions/dlMessage.js +2 -0
- package/functions/getCommentHistory.js +4 -3
- package/functions/getComments.js +2 -1
- package/functions/getLevelByID.js +2 -1
- package/functions/getMapPacks.js +2 -1
- package/functions/getMessages.js +2 -0
- package/functions/getProfile.js +3 -2
- package/functions/getSongInfo.js +2 -3
- package/functions/getUserLevels.js +10 -150
- package/functions/searchLevels.js +5 -148
- package/functions/searchUsers.js +2 -1
- package/functions/uploadAccountPost.js +1 -1
- package/functions/uploadComment.js +3 -1
- package/functions/uploadMessage.js +2 -0
- package/index.js +1 -1
- package/misc/decCommentFromHistory.js +16 -11
- package/misc/decodeGJGauntlet.js +14 -11
- package/misc/decodeLevel.js +3 -0
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
<div align="center">
|
|
2
|
-
<
|
|
2
|
+
<h1>
|
|
3
|
+
<a href="https://www.npmjs.com/package/gj-boomlings-api"><img src="https://shikoshib.github.io/font1.png" width="576"></a>
|
|
4
|
+
</h1>
|
|
5
|
+
A light-weight Geometry Dash API wrapper<br><br>
|
|
3
6
|
<a href="https://www.npmjs.com/package/gj-boomlings-api"><img src="https://img.shields.io/npm/v/gj-boomlings-api.svg?maxAge=3600" alt="npm version" /></a>
|
|
4
|
-
<a href="https://www.npmjs.com/package/gj-boomlings-api"><img src="https://img.shields.io/npm/
|
|
7
|
+
<a href="https://www.npmjs.com/package/gj-boomlings-api"><img src="https://img.shields.io/npm/dt/gj-boomlings-api" /></a>
|
|
5
8
|
<a href="https://snyk.io/test/github/shikoshib/gj-boomlings-api"><img src="https://snyk.io/test/github/shikoshib/gj-boomlings-api/badge.svg" alt="Known Vulnerabilities" /></a>
|
|
6
9
|
<a href="https://packagequality.com/#?package=gj-boomlings-api"><img src="https://packagequality.com/shield/gj-boomlings-api.svg"/></a>
|
|
7
10
|
</div>
|
|
8
11
|
|
|
9
|
-
This package gets info from RobTop's servers (boomlings.com) and converts it into pure and beautiful JSON.
|
|
10
|
-
|
|
11
12
|
## Functions
|
|
12
13
|
|
|
13
14
|
### dlLevel(id)
|
|
@@ -30,11 +31,11 @@ Returns:
|
|
|
30
31
|
level_version: 3,
|
|
31
32
|
difficulty: 'Extreme Demon',
|
|
32
33
|
stars: 10,
|
|
33
|
-
downloads:
|
|
34
|
-
likes:
|
|
34
|
+
downloads: 19055472,
|
|
35
|
+
likes: 701448,
|
|
35
36
|
disliked: false,
|
|
36
37
|
length: 'XL',
|
|
37
|
-
password: '
|
|
38
|
+
password: '21296',
|
|
38
39
|
demon: true,
|
|
39
40
|
featured: true,
|
|
40
41
|
epic: true,
|
|
@@ -45,6 +46,7 @@ Returns:
|
|
|
45
46
|
game_version: '2.1',
|
|
46
47
|
ldm: false,
|
|
47
48
|
copied: 25066306,
|
|
49
|
+
large: true,
|
|
48
50
|
two_p: false,
|
|
49
51
|
coins: 0,
|
|
50
52
|
verified_coins: false,
|
|
@@ -56,8 +58,8 @@ Returns:
|
|
|
56
58
|
fileSize: '9.56 MB',
|
|
57
59
|
link: 'https://geometrydashcontent.b-cdn.net/songs/467339.mp3'
|
|
58
60
|
},
|
|
59
|
-
pointercrate: {
|
|
60
|
-
position:
|
|
61
|
+
pointercrate: {
|
|
62
|
+
position: 50,
|
|
61
63
|
publisher: 'knobbelboy',
|
|
62
64
|
verifier: 'knobbelboy'
|
|
63
65
|
}
|
|
@@ -79,9 +81,11 @@ Returns:
|
|
|
79
81
|
username: 'RobTop',
|
|
80
82
|
playerID: 16,
|
|
81
83
|
accountID: 71,
|
|
82
|
-
rank:
|
|
83
|
-
|
|
84
|
-
|
|
84
|
+
rank: 220553,
|
|
85
|
+
color1: '#7D00FF',
|
|
86
|
+
color2: '#00FFFF',
|
|
87
|
+
stars: 2389,
|
|
88
|
+
diamonds: 2169,
|
|
85
89
|
secretCoins: 3,
|
|
86
90
|
userCoins: 140,
|
|
87
91
|
demons: 5,
|
package/functions/blockUser.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
blockUser:
|
|
3
2
|
async function(target, username, password) {
|
|
4
3
|
if(!target || target == "") throw new Error("Please provide a target's player ID or username!");
|
|
5
4
|
if(!username || username == "") throw new Error("Please provide your player ID or username!");
|
|
@@ -9,7 +8,7 @@ module.exports = {
|
|
|
9
8
|
const {headers, server} = require("../config.json");
|
|
10
9
|
|
|
11
10
|
let user = await searchUsers(username);
|
|
12
|
-
let targetObj = await searchUsers(
|
|
11
|
+
let targetObj = await searchUsers(target);
|
|
13
12
|
|
|
14
13
|
const {gjp} = require("../misc/gjp.js");
|
|
15
14
|
|
package/functions/dlLevel.js
CHANGED
|
@@ -23,10 +23,11 @@ module.exports = {
|
|
|
23
23
|
let res = await axios.post(server + 'downloadGJLevel22.php', data, {
|
|
24
24
|
headers: headers
|
|
25
25
|
}).catch(e => {
|
|
26
|
-
if(e.response.data == -1) throw new Error("-1 This user is not found.");
|
|
27
26
|
throw new Error(e.response.data);
|
|
28
27
|
})
|
|
29
28
|
|
|
29
|
+
if(res.data == -1) throw new Error("-1 This level is not found.");
|
|
30
|
+
|
|
30
31
|
let spl = res.data.split(":");
|
|
31
32
|
let levelInfo = [];
|
|
32
33
|
for(let i =0;i<spl.length;i++) {
|
|
@@ -48,6 +49,7 @@ module.exports = {
|
|
|
48
49
|
let stars = levelInfo[15].split("18:")[1];
|
|
49
50
|
let ftrd = levelInfo[16].split("19:")[1];
|
|
50
51
|
let epic = levelInfo[17].split("42:")[1];
|
|
52
|
+
let objs = levelInfo[18].split("45:")[1];
|
|
51
53
|
let length = levelInfo[19].split("15:")[1];
|
|
52
54
|
let copiedID = levelInfo[20].split("30:")[1];
|
|
53
55
|
let twoPlayer = levelInfo[21].split("31:")[1];
|
|
@@ -161,13 +163,14 @@ module.exports = {
|
|
|
161
163
|
game_version: decodeGameVersion[gameVersion],
|
|
162
164
|
ldm: demonBoolDecoding[ldm],
|
|
163
165
|
copied: Number(copiedID),
|
|
166
|
+
large: Number(objs) > 40000 ? true : false,
|
|
164
167
|
two_p: demonBoolDecoding[twoPlayer],
|
|
165
168
|
coins: Number(coins),
|
|
166
169
|
verified_coins: verifiedCoins,
|
|
167
170
|
song: getLvl.song,
|
|
168
171
|
}
|
|
169
172
|
|
|
170
|
-
if(getLvl.pointercrate != undefined) {
|
|
173
|
+
if(getLvl.pointercrate != undefined && server.includes("boomlings.com/database")) {
|
|
171
174
|
result = {
|
|
172
175
|
id: Number(id),
|
|
173
176
|
name: name,
|
|
@@ -191,6 +194,7 @@ module.exports = {
|
|
|
191
194
|
game_version: decodeGameVersion[gameVersion],
|
|
192
195
|
ldm: demonBoolDecoding[ldm],
|
|
193
196
|
copied: Number(copiedID),
|
|
197
|
+
large: Number(objs) > 40000 ? true : false,
|
|
194
198
|
two_p: demonBoolDecoding[twoPlayer],
|
|
195
199
|
coins: Number(coins),
|
|
196
200
|
verified_coins: verifiedCoins,
|
package/functions/dlMessage.js
CHANGED
|
@@ -7,7 +7,7 @@ module.exports = {
|
|
|
7
7
|
const {decCommentFromHistory} = require("../misc/decCommentFromHistory.js");
|
|
8
8
|
const {getProfile} = require("./getProfile.js");
|
|
9
9
|
|
|
10
|
-
const user = await getProfile(
|
|
10
|
+
const user = await getProfile(str);
|
|
11
11
|
if(user.commentHistory != "all") throw new Error("Whoops! This user has disabled viewing his comment history!")
|
|
12
12
|
|
|
13
13
|
const CHData = {
|
|
@@ -15,7 +15,7 @@ module.exports = {
|
|
|
15
15
|
binaryVersion: 35,
|
|
16
16
|
gdw: 0,
|
|
17
17
|
secret: "Wmfd2893gb7",
|
|
18
|
-
userID:
|
|
18
|
+
userID: user.playerID,
|
|
19
19
|
page: page - 1,
|
|
20
20
|
mode: 1
|
|
21
21
|
}
|
|
@@ -23,9 +23,10 @@ module.exports = {
|
|
|
23
23
|
let res = await axios.post(server + "getGJCommentHistory.php", CHData, {
|
|
24
24
|
headers: headers
|
|
25
25
|
}).catch(e => {
|
|
26
|
-
if(e.response.data == -1) throw new Error("-1 Not found.");
|
|
27
26
|
throw new Error(e.response.data);
|
|
28
27
|
})
|
|
28
|
+
|
|
29
|
+
if(res.data == -1) throw new Error("-1 Not found.");
|
|
29
30
|
|
|
30
31
|
let comments = res.data.split("|");
|
|
31
32
|
let result = [];
|
package/functions/getComments.js
CHANGED
|
@@ -20,9 +20,10 @@ module.exports = {
|
|
|
20
20
|
let res = await axios.post(server + "getGJComments21.php", data, {
|
|
21
21
|
headers: headers
|
|
22
22
|
}).catch(e => {
|
|
23
|
-
if(e.response.data == -1) throw new Error("-1 This user is not found.");
|
|
24
23
|
throw new Error(e.response.data);
|
|
25
24
|
})
|
|
25
|
+
|
|
26
|
+
if(res.data.startsWith("#")) throw new Error("-1 No comments have been found.");
|
|
26
27
|
|
|
27
28
|
let comments = res.data.split("|");
|
|
28
29
|
let result = [];
|
|
@@ -20,10 +20,11 @@ module.exports = {
|
|
|
20
20
|
let res = await axios.post(server + "getGJLevels21.php", data, {
|
|
21
21
|
headers: headers
|
|
22
22
|
}).catch(e => {
|
|
23
|
-
if(e.response.data == -1) throw new Error("-1 Not found.");
|
|
24
23
|
throw new Error(e.response.data);
|
|
25
24
|
})
|
|
26
25
|
|
|
26
|
+
if(res.data == -1) throw new Error("-1 Not found.");
|
|
27
|
+
|
|
27
28
|
return await decodeLevel(res.data);
|
|
28
29
|
}
|
|
29
30
|
}
|
package/functions/getMapPacks.js
CHANGED
|
@@ -13,10 +13,11 @@ module.exports = {
|
|
|
13
13
|
let res = await axios.post(server + "getGJMapPacks21.php", data, {
|
|
14
14
|
headers: headers
|
|
15
15
|
}).catch(e => {
|
|
16
|
-
if(e.response.data == -1) throw new Error("-1 Not found.");
|
|
17
16
|
throw new Error(e.response.data);
|
|
18
17
|
})
|
|
19
18
|
|
|
19
|
+
if(res.data.startsWith("#")) throw new Error("-1 Not found.");
|
|
20
|
+
|
|
20
21
|
let packs = res.data.split("|");
|
|
21
22
|
let result = [];
|
|
22
23
|
packs.forEach(p => {
|
package/functions/getMessages.js
CHANGED
package/functions/getProfile.js
CHANGED
|
@@ -19,10 +19,11 @@ module.exports = {
|
|
|
19
19
|
let res = await axios.post(server + "getGJUserInfo20.php", data, {
|
|
20
20
|
headers: headers
|
|
21
21
|
}).catch(e => {
|
|
22
|
-
if(e.response.data == -1) throw new Error("-1 This user is not found.");
|
|
23
22
|
throw new Error(e.response.data);
|
|
24
23
|
})
|
|
25
24
|
|
|
25
|
+
if(res.data == -1) throw new Error("-1 This user is not found.");
|
|
26
|
+
|
|
26
27
|
let spl = res.data.split(':');
|
|
27
28
|
let userInfo = [];
|
|
28
29
|
for(let i =0;i<spl.length;i++) {
|
|
@@ -51,7 +52,7 @@ module.exports = {
|
|
|
51
52
|
let twitch = userInfo[27].split("45:")[1];
|
|
52
53
|
let modState = userInfo[28].split("49:")[1];
|
|
53
54
|
|
|
54
|
-
let ytLnk = `
|
|
55
|
+
let ytLnk = `https://youtube.com/channel/${youtube}`;
|
|
55
56
|
let twitterLnk = `https://twitter.com/${twitter}`;
|
|
56
57
|
let twitchLnk = `https://twitch.tv/${twitch}`;
|
|
57
58
|
|
package/functions/getSongInfo.js
CHANGED
|
@@ -13,11 +13,10 @@ module.exports = {
|
|
|
13
13
|
|
|
14
14
|
let res = await axios.post(server + 'getGJSongInfo.php', data, {
|
|
15
15
|
headers: headers
|
|
16
|
-
}).catch(e => {
|
|
17
|
-
if(e.response.data == -2) throw new Error(`-2. Couldn't find a song with ID ${song}.`)
|
|
18
|
-
throw new Error(e.response.data);
|
|
19
16
|
})
|
|
20
17
|
|
|
18
|
+
if(res.data == -2) throw new Error(`-2. Couldn't find a song with ID ${song}.`)
|
|
19
|
+
|
|
21
20
|
const result = {
|
|
22
21
|
"name": res.data.split("|~2~|~")[1].split("~|~3~|~")[0],
|
|
23
22
|
"id": Number(res.data.split("1~|~")[1].split("~|~2~|")[0]),
|
|
@@ -5,11 +5,14 @@ module.exports = {
|
|
|
5
5
|
|
|
6
6
|
const axios = require("axios");
|
|
7
7
|
const { headers, secret, server } = require("../config.json");
|
|
8
|
-
const { getLevelByID } = require("
|
|
8
|
+
const { getLevelByID } = require("./getLevelByID.js");
|
|
9
|
+
const { searchUsers } = require("./searchUsers.js");
|
|
10
|
+
|
|
11
|
+
let user = await searchUsers(str);
|
|
9
12
|
|
|
10
13
|
const data = {
|
|
11
14
|
type: 5,
|
|
12
|
-
str:
|
|
15
|
+
str: user.playerID,
|
|
13
16
|
secret: secret,
|
|
14
17
|
page: Number(page) - 1
|
|
15
18
|
}
|
|
@@ -20,154 +23,11 @@ module.exports = {
|
|
|
20
23
|
throw new Error(e.response.data);
|
|
21
24
|
})
|
|
22
25
|
|
|
23
|
-
let
|
|
24
|
-
let
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
let sixthLvlId;
|
|
29
|
-
let seventhLvlId;
|
|
30
|
-
let eighthLvlId;
|
|
31
|
-
let ninthLvlId;
|
|
32
|
-
let tenthLvlId;
|
|
33
|
-
|
|
34
|
-
let firstLvl = await getLevelByID(firstLvlId);
|
|
35
|
-
let secondLvl;
|
|
36
|
-
let thirdLvl;
|
|
37
|
-
let fourthLvl;
|
|
38
|
-
let fifthLvl;
|
|
39
|
-
let sixthLvl;
|
|
40
|
-
let seventhLvl;
|
|
41
|
-
let eighthLvl;
|
|
42
|
-
let ninthLvl;
|
|
43
|
-
let tenthLvl;
|
|
44
|
-
|
|
45
|
-
let result = [firstLvl]
|
|
46
|
-
|
|
47
|
-
if(res.data.split("|1:").length - 1 == 1) {
|
|
48
|
-
secondLvlId = res.data.split("|1:")[1].split(":2:")[0];
|
|
49
|
-
secondLvl = await getLevelByID(secondLvlId);
|
|
50
|
-
result = [firstLvl,secondLvl]
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
if(res.data.split("|1:").length - 1 == 2) {
|
|
54
|
-
secondLvlId = res.data.split("|1:")[1].split(":2:")[0];
|
|
55
|
-
secondLvl = await getLevelByID(secondLvlId);
|
|
56
|
-
thirdLvlId = res.data.split("|1:")[2].split(":2:")[0];
|
|
57
|
-
thirdLvl = await getLevelByID(thirdLvlId);
|
|
58
|
-
result = [firstLvl,secondLvl,thirdLvl]
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
if(res.data.split("|1:").length - 1 == 3) {
|
|
62
|
-
secondLvlId = res.data.split("|1:")[1].split(":2:")[0];
|
|
63
|
-
secondLvl = await getLevelByID(secondLvlId);
|
|
64
|
-
thirdLvlId = res.data.split("|1:")[2].split(":2:")[0];
|
|
65
|
-
thirdLvl = await getLevelByID(thirdLvlId);
|
|
66
|
-
fourthLvlId = res.data.split("|1:")[3].split(":2:")[0];
|
|
67
|
-
fourthLvl = await getLevelByID(fourthLvlId);
|
|
68
|
-
result = [firstLvl,secondLvl,thirdLvl,fourthLvl]
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
if(res.data.split("|1:").length - 1 == 4) {
|
|
72
|
-
secondLvlId = res.data.split("|1:")[1].split(":2:")[0];
|
|
73
|
-
secondLvl = await getLevelByID(secondLvlId);
|
|
74
|
-
thirdLvlId = res.data.split("|1:")[2].split(":2:")[0];
|
|
75
|
-
thirdLvl = await getLevelByID(thirdLvlId);
|
|
76
|
-
fourthLvlId = res.data.split("|1:")[3].split(":2:")[0];
|
|
77
|
-
fourthLvl = await getLevelByID(fourthLvlId);
|
|
78
|
-
fifthLvlId = res.data.split("|1:")[4].split(":2:")[0];
|
|
79
|
-
fifthLvl = await getLevelByID(fifthLvlId);
|
|
80
|
-
result = [firstLvl,secondLvl,thirdLvl,fourthLvl,fifthLvl]
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
if(res.data.split("|1:").length - 1 == 5) {
|
|
84
|
-
secondLvlId = res.data.split("|1:")[1].split(":2:")[0];
|
|
85
|
-
secondLvl = await getLevelByID(secondLvlId);
|
|
86
|
-
thirdLvlId = res.data.split("|1:")[2].split(":2:")[0];
|
|
87
|
-
thirdLvl = await getLevelByID(thirdLvlId);
|
|
88
|
-
fourthLvlId = res.data.split("|1:")[3].split(":2:")[0];
|
|
89
|
-
fourthLvl = await getLevelByID(fourthLvlId);
|
|
90
|
-
fifthLvlId = res.data.split("|1:")[4].split(":2:")[0];
|
|
91
|
-
fifthLvl = await getLevelByID(fifthLvlId);
|
|
92
|
-
sixthLvlId = res.data.split("|1:")[5].split(":2:")[0];
|
|
93
|
-
sixthLvl = await getLevelByID(sixthLvlId);
|
|
94
|
-
result = [firstLvl,secondLvl,thirdLvl,fourthLvl,fifthLvl,sixthLvl]
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
if(res.data.split("|1:").length - 1 == 6) {
|
|
98
|
-
secondLvlId = res.data.split("|1:")[1].split(":2:")[0];
|
|
99
|
-
secondLvl = await getLevelByID(secondLvlId);
|
|
100
|
-
thirdLvlId = res.data.split("|1:")[2].split(":2:")[0];
|
|
101
|
-
thirdLvl = await getLevelByID(thirdLvlId);
|
|
102
|
-
fourthLvlId = res.data.split("|1:")[3].split(":2:")[0];
|
|
103
|
-
fourthLvl = await getLevelByID(fourthLvlId);
|
|
104
|
-
fifthLvlId = res.data.split("|1:")[4].split(":2:")[0];
|
|
105
|
-
fifthLvl = await getLevelByID(fifthLvlId);
|
|
106
|
-
sixthLvlId = res.data.split("|1:")[5].split(":2:")[0];
|
|
107
|
-
sixthLvl = await getLevelByID(sixthLvlId);
|
|
108
|
-
seventhLvlId = res.data.split("|1:")[6].split(":2:")[0];
|
|
109
|
-
seventhLvl = await getLevelByID(seventhLvlId);
|
|
110
|
-
result = [firstLvl,secondLvl,thirdLvl,fourthLvl,fifthLvl,sixthLvl,seventhLvl]
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
if(res.data.split("|1:").length - 1 == 7) {
|
|
114
|
-
secondLvlId = res.data.split("|1:")[1].split(":2:")[0];
|
|
115
|
-
secondLvl = await getLevelByID(secondLvlId);
|
|
116
|
-
thirdLvlId = res.data.split("|1:")[2].split(":2:")[0];
|
|
117
|
-
thirdLvl = await getLevelByID(thirdLvlId);
|
|
118
|
-
fourthLvlId = res.data.split("|1:")[3].split(":2:")[0];
|
|
119
|
-
fourthLvl = await getLevelByID(fourthLvlId);
|
|
120
|
-
fifthLvlId = res.data.split("|1:")[4].split(":2:")[0];
|
|
121
|
-
fifthLvl = await getLevelByID(fifthLvlId);
|
|
122
|
-
sixthLvlId = res.data.split("|1:")[5].split(":2:")[0];
|
|
123
|
-
sixthLvl = await getLevelByID(sixthLvlId);
|
|
124
|
-
seventhLvlId = res.data.split("|1:")[6].split(":2:")[0];
|
|
125
|
-
seventhLvl = await getLevelByID(seventhLvlId);
|
|
126
|
-
eighthLvlId = res.data.split("|1:")[7].split(":2:")[0];
|
|
127
|
-
eighthLvl = await getLevelByID(eighthLvlId);
|
|
128
|
-
result = [firstLvl,secondLvl,thirdLvl,fourthLvl,fifthLvl,sixthLvl,seventhLvl,eighthLvl]
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
if(res.data.split("|1:").length - 1 == 8) {
|
|
132
|
-
secondLvlId = res.data.split("|1:")[1].split(":2:")[0];
|
|
133
|
-
secondLvl = await getLevelByID(secondLvlId);
|
|
134
|
-
thirdLvlId = res.data.split("|1:")[2].split(":2:")[0];
|
|
135
|
-
thirdLvl = await getLevelByID(thirdLvlId);
|
|
136
|
-
fourthLvlId = res.data.split("|1:")[3].split(":2:")[0];
|
|
137
|
-
fourthLvl = await getLevelByID(fourthLvlId);
|
|
138
|
-
fifthLvlId = res.data.split("|1:")[4].split(":2:")[0];
|
|
139
|
-
fifthLvl = await getLevelByID(fifthLvlId);
|
|
140
|
-
sixthLvlId = res.data.split("|1:")[5].split(":2:")[0];
|
|
141
|
-
sixthLvl = await getLevelByID(sixthLvlId);
|
|
142
|
-
seventhLvlId = res.data.split("|1:")[6].split(":2:")[0];
|
|
143
|
-
seventhLvl = await getLevelByID(seventhLvlId);
|
|
144
|
-
eighthLvlId = res.data.split("|1:")[7].split(":2:")[0];
|
|
145
|
-
eighthLvl = await getLevelByID(eighthLvlId);
|
|
146
|
-
ninthLvlId = res.data.split("|1:")[8].split(":2:")[0];
|
|
147
|
-
ninthLvl = await getLevelByID(ninthLvlId);
|
|
148
|
-
result = [firstLvl,secondLvl,thirdLvl,fourthLvl,fifthLvl,sixthLvl,seventhLvl,eighthLvl,ninthLvl]
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
if(res.data.split("|1:").length - 1 == 9) {
|
|
152
|
-
secondLvlId = res.data.split("|1:")[1].split(":2:")[0];
|
|
153
|
-
secondLvl = await getLevelByID(secondLvlId);
|
|
154
|
-
thirdLvlId = res.data.split("|1:")[2].split(":2:")[0];
|
|
155
|
-
thirdLvl = await getLevelByID(thirdLvlId);
|
|
156
|
-
fourthLvlId = res.data.split("|1:")[3].split(":2:")[0];
|
|
157
|
-
fourthLvl = await getLevelByID(fourthLvlId);
|
|
158
|
-
fifthLvlId = res.data.split("|1:")[4].split(":2:")[0];
|
|
159
|
-
fifthLvl = await getLevelByID(fifthLvlId);
|
|
160
|
-
sixthLvlId = res.data.split("|1:")[5].split(":2:")[0];
|
|
161
|
-
sixthLvl = await getLevelByID(sixthLvlId);
|
|
162
|
-
seventhLvlId = res.data.split("|1:")[6].split(":2:")[0];
|
|
163
|
-
seventhLvl = await getLevelByID(seventhLvlId);
|
|
164
|
-
eighthLvlId = res.data.split("|1:")[7].split(":2:")[0];
|
|
165
|
-
eighthLvl = await getLevelByID(eighthLvlId);
|
|
166
|
-
ninthLvlId = res.data.split("|1:")[8].split(":2:")[0];
|
|
167
|
-
ninthLvl = await getLevelByID(ninthLvlId);
|
|
168
|
-
tenthLvlId = res.data.split("|1:")[9].split(":2:")[0];
|
|
169
|
-
tenthLvl = await getLevelByID(tenthLvlId);
|
|
170
|
-
result = [firstLvl,secondLvl,thirdLvl,fourthLvl,fifthLvl,sixthLvl,seventhLvl,eighthLvl,ninthLvl,tenthLvl]
|
|
26
|
+
let levels = res.data.split("#")[0].split("|");
|
|
27
|
+
let result = [];
|
|
28
|
+
for(const lvl of levels) {
|
|
29
|
+
let id = lvl.split(":")[1];
|
|
30
|
+
result.push(await getLevelByID(id))
|
|
171
31
|
}
|
|
172
32
|
|
|
173
33
|
return result;
|
|
@@ -18,155 +18,12 @@ module.exports = {
|
|
|
18
18
|
}).catch(e => {
|
|
19
19
|
throw new Error(e.response.data);
|
|
20
20
|
})
|
|
21
|
-
|
|
22
|
-
let firstLvlId = res.data.split(":")[1].split(":2:")[0];
|
|
23
|
-
let secondLvlId;
|
|
24
|
-
let thirdLvlId;
|
|
25
|
-
let fourthLvlId;
|
|
26
|
-
let fifthLvlId;
|
|
27
|
-
let sixthLvlId;
|
|
28
|
-
let seventhLvlId;
|
|
29
|
-
let eighthLvlId;
|
|
30
|
-
let ninthLvlId;
|
|
31
|
-
let tenthLvlId;
|
|
32
|
-
|
|
33
|
-
let firstLvl = await getLevelByID(firstLvlId);
|
|
34
|
-
let secondLvl;
|
|
35
|
-
let thirdLvl;
|
|
36
|
-
let fourthLvl;
|
|
37
|
-
let fifthLvl;
|
|
38
|
-
let sixthLvl;
|
|
39
|
-
let seventhLvl;
|
|
40
|
-
let eighthLvl;
|
|
41
|
-
let ninthLvl;
|
|
42
|
-
let tenthLvl;
|
|
43
|
-
|
|
44
|
-
let result = [firstLvl]
|
|
45
|
-
|
|
46
|
-
if(res.data.split("|1:").length - 1 == 1) {
|
|
47
|
-
secondLvlId = res.data.split("|1:")[1].split(":2:")[0];
|
|
48
|
-
secondLvl = await getLevelByID(secondLvlId);
|
|
49
|
-
result = [firstLvl,secondLvl]
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if(res.data.split("|1:").length - 1 == 2) {
|
|
53
|
-
secondLvlId = res.data.split("|1:")[1].split(":2:")[0];
|
|
54
|
-
secondLvl = await getLevelByID(secondLvlId);
|
|
55
|
-
thirdLvlId = res.data.split("|1:")[2].split(":2:")[0];
|
|
56
|
-
thirdLvl = await getLevelByID(thirdLvlId);
|
|
57
|
-
result = [firstLvl,secondLvl,thirdLvl]
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
if(res.data.split("|1:").length - 1 == 3) {
|
|
61
|
-
secondLvlId = res.data.split("|1:")[1].split(":2:")[0];
|
|
62
|
-
secondLvl = await getLevelByID(secondLvlId);
|
|
63
|
-
thirdLvlId = res.data.split("|1:")[2].split(":2:")[0];
|
|
64
|
-
thirdLvl = await getLevelByID(thirdLvlId);
|
|
65
|
-
fourthLvlId = res.data.split("|1:")[3].split(":2:")[0];
|
|
66
|
-
fourthLvl = await getLevelByID(fourthLvlId);
|
|
67
|
-
result = [firstLvl,secondLvl,thirdLvl,fourthLvl]
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
if(res.data.split("|1:").length - 1 == 4) {
|
|
71
|
-
secondLvlId = res.data.split("|1:")[1].split(":2:")[0];
|
|
72
|
-
secondLvl = await getLevelByID(secondLvlId);
|
|
73
|
-
thirdLvlId = res.data.split("|1:")[2].split(":2:")[0];
|
|
74
|
-
thirdLvl = await getLevelByID(thirdLvlId);
|
|
75
|
-
fourthLvlId = res.data.split("|1:")[3].split(":2:")[0];
|
|
76
|
-
fourthLvl = await getLevelByID(fourthLvlId);
|
|
77
|
-
fifthLvlId = res.data.split("|1:")[4].split(":2:")[0];
|
|
78
|
-
fifthLvl = await getLevelByID(fifthLvlId);
|
|
79
|
-
result = [firstLvl,secondLvl,thirdLvl,fourthLvl,fifthLvl]
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
if(res.data.split("|1:").length - 1 == 5) {
|
|
83
|
-
secondLvlId = res.data.split("|1:")[1].split(":2:")[0];
|
|
84
|
-
secondLvl = await getLevelByID(secondLvlId);
|
|
85
|
-
thirdLvlId = res.data.split("|1:")[2].split(":2:")[0];
|
|
86
|
-
thirdLvl = await getLevelByID(thirdLvlId);
|
|
87
|
-
fourthLvlId = res.data.split("|1:")[3].split(":2:")[0];
|
|
88
|
-
fourthLvl = await getLevelByID(fourthLvlId);
|
|
89
|
-
fifthLvlId = res.data.split("|1:")[4].split(":2:")[0];
|
|
90
|
-
fifthLvl = await getLevelByID(fifthLvlId);
|
|
91
|
-
sixthLvlId = res.data.split("|1:")[5].split(":2:")[0];
|
|
92
|
-
sixthLvl = await getLevelByID(sixthLvlId);
|
|
93
|
-
result = [firstLvl,secondLvl,thirdLvl,fourthLvl,fifthLvl,sixthLvl]
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
if(res.data.split("|1:").length - 1 == 6) {
|
|
97
|
-
secondLvlId = res.data.split("|1:")[1].split(":2:")[0];
|
|
98
|
-
secondLvl = await getLevelByID(secondLvlId);
|
|
99
|
-
thirdLvlId = res.data.split("|1:")[2].split(":2:")[0];
|
|
100
|
-
thirdLvl = await getLevelByID(thirdLvlId);
|
|
101
|
-
fourthLvlId = res.data.split("|1:")[3].split(":2:")[0];
|
|
102
|
-
fourthLvl = await getLevelByID(fourthLvlId);
|
|
103
|
-
fifthLvlId = res.data.split("|1:")[4].split(":2:")[0];
|
|
104
|
-
fifthLvl = await getLevelByID(fifthLvlId);
|
|
105
|
-
sixthLvlId = res.data.split("|1:")[5].split(":2:")[0];
|
|
106
|
-
sixthLvl = await getLevelByID(sixthLvlId);
|
|
107
|
-
seventhLvlId = res.data.split("|1:")[6].split(":2:")[0];
|
|
108
|
-
seventhLvl = await getLevelByID(seventhLvlId);
|
|
109
|
-
result = [firstLvl,secondLvl,thirdLvl,fourthLvl,fifthLvl,sixthLvl,seventhLvl]
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
if(res.data.split("|1:").length - 1 == 7) {
|
|
113
|
-
secondLvlId = res.data.split("|1:")[1].split(":2:")[0];
|
|
114
|
-
secondLvl = await getLevelByID(secondLvlId);
|
|
115
|
-
thirdLvlId = res.data.split("|1:")[2].split(":2:")[0];
|
|
116
|
-
thirdLvl = await getLevelByID(thirdLvlId);
|
|
117
|
-
fourthLvlId = res.data.split("|1:")[3].split(":2:")[0];
|
|
118
|
-
fourthLvl = await getLevelByID(fourthLvlId);
|
|
119
|
-
fifthLvlId = res.data.split("|1:")[4].split(":2:")[0];
|
|
120
|
-
fifthLvl = await getLevelByID(fifthLvlId);
|
|
121
|
-
sixthLvlId = res.data.split("|1:")[5].split(":2:")[0];
|
|
122
|
-
sixthLvl = await getLevelByID(sixthLvlId);
|
|
123
|
-
seventhLvlId = res.data.split("|1:")[6].split(":2:")[0];
|
|
124
|
-
seventhLvl = await getLevelByID(seventhLvlId);
|
|
125
|
-
eighthLvlId = res.data.split("|1:")[7].split(":2:")[0];
|
|
126
|
-
eighthLvl = await getLevelByID(eighthLvlId);
|
|
127
|
-
result = [firstLvl,secondLvl,thirdLvl,fourthLvl,fifthLvl,sixthLvl,seventhLvl,eighthLvl]
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
if(res.data.split("|1:").length - 1 == 8) {
|
|
131
|
-
secondLvlId = res.data.split("|1:")[1].split(":2:")[0];
|
|
132
|
-
secondLvl = await getLevelByID(secondLvlId);
|
|
133
|
-
thirdLvlId = res.data.split("|1:")[2].split(":2:")[0];
|
|
134
|
-
thirdLvl = await getLevelByID(thirdLvlId);
|
|
135
|
-
fourthLvlId = res.data.split("|1:")[3].split(":2:")[0];
|
|
136
|
-
fourthLvl = await getLevelByID(fourthLvlId);
|
|
137
|
-
fifthLvlId = res.data.split("|1:")[4].split(":2:")[0];
|
|
138
|
-
fifthLvl = await getLevelByID(fifthLvlId);
|
|
139
|
-
sixthLvlId = res.data.split("|1:")[5].split(":2:")[0];
|
|
140
|
-
sixthLvl = await getLevelByID(sixthLvlId);
|
|
141
|
-
seventhLvlId = res.data.split("|1:")[6].split(":2:")[0];
|
|
142
|
-
seventhLvl = await getLevelByID(seventhLvlId);
|
|
143
|
-
eighthLvlId = res.data.split("|1:")[7].split(":2:")[0];
|
|
144
|
-
eighthLvl = await getLevelByID(eighthLvlId);
|
|
145
|
-
ninthLvlId = res.data.split("|1:")[8].split(":2:")[0];
|
|
146
|
-
ninthLvl = await getLevelByID(ninthLvlId);
|
|
147
|
-
result = [firstLvl,secondLvl,thirdLvl,fourthLvl,fifthLvl,sixthLvl,seventhLvl,eighthLvl,ninthLvl]
|
|
148
|
-
}
|
|
149
21
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
fourthLvlId = res.data.split("|1:")[3].split(":2:")[0];
|
|
156
|
-
fourthLvl = await getLevelByID(fourthLvlId);
|
|
157
|
-
fifthLvlId = res.data.split("|1:")[4].split(":2:")[0];
|
|
158
|
-
fifthLvl = await getLevelByID(fifthLvlId);
|
|
159
|
-
sixthLvlId = res.data.split("|1:")[5].split(":2:")[0];
|
|
160
|
-
sixthLvl = await getLevelByID(sixthLvlId);
|
|
161
|
-
seventhLvlId = res.data.split("|1:")[6].split(":2:")[0];
|
|
162
|
-
seventhLvl = await getLevelByID(seventhLvlId);
|
|
163
|
-
eighthLvlId = res.data.split("|1:")[7].split(":2:")[0];
|
|
164
|
-
eighthLvl = await getLevelByID(eighthLvlId);
|
|
165
|
-
ninthLvlId = res.data.split("|1:")[8].split(":2:")[0];
|
|
166
|
-
ninthLvl = await getLevelByID(ninthLvlId);
|
|
167
|
-
tenthLvlId = res.data.split("|1:")[9].split(":2:")[0];
|
|
168
|
-
tenthLvl = await getLevelByID(tenthLvlId);
|
|
169
|
-
result = [firstLvl,secondLvl,thirdLvl,fourthLvl,fifthLvl,sixthLvl,seventhLvl,eighthLvl,ninthLvl,tenthLvl]
|
|
22
|
+
let levels = res.data.split("#")[0].split("|");
|
|
23
|
+
let result = [];
|
|
24
|
+
for(const lvl of levels) {
|
|
25
|
+
let id = lvl.split(":")[1];
|
|
26
|
+
result.push(await getLevelByID(id))
|
|
170
27
|
}
|
|
171
28
|
|
|
172
29
|
return result;
|
package/functions/searchUsers.js
CHANGED
|
@@ -13,10 +13,11 @@ module.exports = {
|
|
|
13
13
|
}, {
|
|
14
14
|
headers: headers
|
|
15
15
|
}).catch(e => {
|
|
16
|
-
if(e.response.data == -1) throw new Error(`Couldn't find a "${username}" user.`)
|
|
17
16
|
throw new Error(e.response.data)
|
|
18
17
|
});
|
|
19
18
|
|
|
19
|
+
if(res.data == -1) throw new Error(`Couldn't find a "${str}" user.`)
|
|
20
|
+
|
|
20
21
|
return decodeUserResult(res.data);
|
|
21
22
|
}
|
|
22
23
|
}
|
package/index.js
CHANGED
|
@@ -30,7 +30,7 @@ const { dlMessage } = require("./functions/dlMessage.js");
|
|
|
30
30
|
const { uploadMessage } = require("./functions/uploadMessage.js");
|
|
31
31
|
const { searchUsers } = require("./functions/searchUsers.js");
|
|
32
32
|
|
|
33
|
-
module.exports.dlLevel = dlLevel
|
|
33
|
+
module.exports.dlLevel = dlLevel
|
|
34
34
|
module.exports.getSongInfo = getSongInfo;
|
|
35
35
|
module.exports.getOfficialSongInfo = getOfficialSongInfo;
|
|
36
36
|
module.exports.getDailyLevel = getDailyLevel;
|
|
@@ -2,18 +2,23 @@ module.exports = {
|
|
|
2
2
|
decCommentFromHistory:
|
|
3
3
|
function(comment) {
|
|
4
4
|
const {decB64} = require("./decB64.js");
|
|
5
|
-
|
|
6
|
-
let levelID = comment.split("~1~")[1].split("~3~")[0];
|
|
7
|
-
let commentContent = comment.split("2~")[1].split("~1~")[0];
|
|
8
|
-
let playerID = comment.split("~3~")[1].split("~4~")[0];
|
|
9
|
-
let likes = comment.split("~4~")[1].split("~10~")[0];
|
|
10
|
-
let percent = comment.split("~10~")[1].split("~9~")[0];
|
|
11
|
-
let age = comment.split("~9~")[1].split("~6~")[0];
|
|
12
|
-
let messageID = comment.split("~6~")[1].split(":1~")[0];
|
|
13
|
-
let username = comment.split(":1~")[1].split("~9~")[0];
|
|
14
5
|
|
|
15
|
-
|
|
16
|
-
|
|
6
|
+
let spl = comment.split('~');
|
|
7
|
+
let cmnt = [];
|
|
8
|
+
for(let i =0;i<spl.length;i++) {
|
|
9
|
+
if(i%2!=0) {
|
|
10
|
+
cmnt.push(spl[i-1]+`~`+spl[i]);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
let levelID = cmnt[1].split("~")[1];
|
|
15
|
+
let commentContent = cmnt[0].split("~")[1];
|
|
16
|
+
let playerID = cmnt[2].split("~")[1];
|
|
17
|
+
let likes = cmnt[3].split("~")[1];
|
|
18
|
+
let percent = cmnt[4].split("~")[1];
|
|
19
|
+
let age = cmnt[5].split("~")[1];
|
|
20
|
+
let messageID = cmnt[6].split("~")[1].split(":")[0];
|
|
21
|
+
let username = cmnt[7].split("~")[0];
|
|
17
22
|
|
|
18
23
|
const res = {
|
|
19
24
|
username: username,
|
package/misc/decodeGJGauntlet.js
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
decodeGJGauntlet:
|
|
3
3
|
function(gauntlet) {
|
|
4
|
-
let
|
|
5
|
-
|
|
6
|
-
let
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
let spl = gauntlet.split(':');
|
|
5
|
+
let glInfo = [];
|
|
6
|
+
for(let i =0;i<spl.length;i++) {
|
|
7
|
+
if(i%2!=0) {
|
|
8
|
+
glInfo.push(spl[i-1]+`:`+spl[i]);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
let id = glInfo[0].split(":")[1];
|
|
13
|
+
let levelList = glInfo[1].split(":")[1];
|
|
10
14
|
|
|
11
15
|
let firstLvl = levelList.split(",")[0];
|
|
12
16
|
let secondLvl = levelList.split(",")[1].split(",")[0];
|
|
13
17
|
let thirdLvl = levelList.split(",")[2].split(",")[0];
|
|
14
18
|
let fourthLvl = levelList.split(",")[3].split(",")[0];
|
|
15
|
-
let fifthLvl = levelList.split(",")[4].split("
|
|
19
|
+
let fifthLvl = levelList.split(",")[4].split("#")[0];
|
|
16
20
|
|
|
17
|
-
const
|
|
21
|
+
const glIDs = {
|
|
18
22
|
"1": "Fire Gauntlet",
|
|
19
23
|
"2": "Ice Gauntlet",
|
|
20
24
|
"3": "Poison Gauntlet",
|
|
@@ -29,14 +33,13 @@ module.exports = {
|
|
|
29
33
|
"12": "spike Gauntlet",
|
|
30
34
|
"13": "Monster Gauntlet",
|
|
31
35
|
"14": "Doom Gauntlet",
|
|
32
|
-
"15": "Death Gauntlet"
|
|
33
|
-
undefined: "Poison Gauntlet"
|
|
36
|
+
"15": "Death Gauntlet"
|
|
34
37
|
}
|
|
35
38
|
|
|
36
39
|
const list = [firstLvl,secondLvl,thirdLvl,fourthLvl,fifthLvl]
|
|
37
40
|
|
|
38
41
|
const result = {
|
|
39
|
-
"name":
|
|
42
|
+
"name": glIDs[id],
|
|
40
43
|
"levels": list
|
|
41
44
|
}
|
|
42
45
|
|
package/misc/decodeLevel.js
CHANGED
|
@@ -41,6 +41,7 @@ module.exports = {
|
|
|
41
41
|
let disliked = false;
|
|
42
42
|
if(likes.includes("-")) disliked = true;
|
|
43
43
|
|
|
44
|
+
if(desc.includes("/")) desc = desc.split("/")[0];
|
|
44
45
|
if(decB64(desc) == '') desc = "KE5vIGRlc2NyaXB0aW9uIHByb3ZpZGVkKQ=="
|
|
45
46
|
|
|
46
47
|
if(verifiedCoins == "0") verifiedCoins = false;
|
|
@@ -160,6 +161,7 @@ module.exports = {
|
|
|
160
161
|
stars_requested: Number(starsRequested),
|
|
161
162
|
game_version: decodeGameVersion[gameVersion],
|
|
162
163
|
copied: Number(copiedID),
|
|
164
|
+
large: Number(objs) > 40000 ? true : false,
|
|
163
165
|
two_p: demonBoolDecoding[twoPlayer],
|
|
164
166
|
coins: Number(coins),
|
|
165
167
|
verified_coins: verifiedCoins,
|
|
@@ -186,6 +188,7 @@ module.exports = {
|
|
|
186
188
|
stars_requested: Number(starsRequested),
|
|
187
189
|
game_version: decodeGameVersion[gameVersion],
|
|
188
190
|
copied: Number(copiedID),
|
|
191
|
+
large: Number(objs) > 40000 ? true : false,
|
|
189
192
|
two_p: demonBoolDecoding[twoPlayer],
|
|
190
193
|
coins: Number(coins),
|
|
191
194
|
verified_coins: verifiedCoins,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gj-boomlings-api",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.4",
|
|
4
4
|
"description": "A light-weight Geometry Dash API wrapper",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"bugs": {
|
|
17
17
|
"url": "https://github.com/shikoshib/gj-boomlings-api/issues"
|
|
18
18
|
},
|
|
19
|
-
"homepage": "https://github.
|
|
19
|
+
"homepage": "https://shikoshib.github.io/gj-boomlings-api/",
|
|
20
20
|
"keywords": [
|
|
21
21
|
"geometrydash",
|
|
22
22
|
"gd",
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
"boomlings",
|
|
25
25
|
"api",
|
|
26
26
|
"gaming",
|
|
27
|
-
"robtop"
|
|
27
|
+
"robtop",
|
|
28
|
+
"geometry dash"
|
|
28
29
|
],
|
|
29
30
|
"dependencies": {
|
|
30
31
|
"axios": "^1.2.1"
|