gj-boomlings-api 2.0.0 → 2.0.2
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/LICENSE +1 -1
- package/README.md +2 -9
- package/functions/blockUser.js +8 -2
- package/functions/deleteAccountPost.js +11 -5
- package/functions/deleteComment.js +14 -7
- package/functions/deleteLevel.js +13 -7
- package/functions/dlLevel.js +219 -1
- package/functions/dlMessage.js +23 -5
- package/functions/getAccountPosts.js +23 -4
- package/functions/getBlockedList.js +20 -6
- package/functions/getCommentHistory.js +35 -6
- package/functions/getComments.js +31 -3
- package/functions/getCreatorScores.js +18 -0
- package/functions/getDailyLevel.js +5 -1
- package/functions/getFriendsList.js +21 -6
- package/functions/getGauntlets.js +11 -0
- package/functions/getLevelByID.js +43 -0
- package/functions/getLevelScores.js +32 -9
- package/functions/getMapPacks.js +16 -0
- package/functions/getMessages.js +22 -5
- package/functions/getOfficialSongInfo.js +15 -4
- package/functions/getProfile.js +198 -1
- package/functions/getSongInfo.js +21 -6
- package/functions/getSongsLibrary.js +107 -1
- package/functions/getTab.js +8 -0
- package/functions/getTop100.js +4 -0
- package/functions/getTopLists.js +5 -0
- package/functions/getUserLevels.js +11 -5
- package/functions/getWeeklyDemon.js +4 -0
- package/functions/reportLevel.js +5 -0
- package/functions/searchLevels.js +6 -0
- package/functions/searchLists.js +24 -0
- package/functions/unblockUser.js +7 -1
- package/functions/updateLevelDesc.js +11 -4
- package/functions/uploadAccountPost.js +10 -3
- package/functions/uploadComment.js +15 -6
- package/functions/uploadMessage.js +18 -9
- package/gjReq.js +18 -1
- package/index.js +36 -2
- package/misc/GJDecode.js +221 -1
- package/misc/colors.json +109 -1
- package/misc/gauntlets.json +36 -1
- package/misc/officialsongs.json +248 -1
- package/misc/rgbToHEX.js +17 -1
- package/package.json +1 -1
- package/xor.js +11 -1
|
@@ -1 +1,107 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {Object} Artist
|
|
3
|
+
* @property {number} id - The artist's ID.
|
|
4
|
+
* @property {string} name - The artist's name.
|
|
5
|
+
* @property {string} website - The artist's website.
|
|
6
|
+
* @property {string} youtube - The artist's YouTube channel ID.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @typedef {Object} Song
|
|
11
|
+
* @property {number} id - The song ID.
|
|
12
|
+
* @property {string} name - The song name.
|
|
13
|
+
* @property {Artist} artist - The song artist.
|
|
14
|
+
* @property {number} size - The song file size in megabytes.
|
|
15
|
+
* @property {number} duration - The song duration in seconds.
|
|
16
|
+
* @property {Array<String>} genres - The song genres.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @typedef {Object} Library
|
|
21
|
+
* @property {number} version - The songs library's version.
|
|
22
|
+
* @property {Array<Song>} songs - The songs included in the internal Geometry Dash song library.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
module.exports = {
|
|
26
|
+
/**
|
|
27
|
+
* Gets the list of songs from the internal Geometry Dash song library.
|
|
28
|
+
* @returns {Library}
|
|
29
|
+
*/
|
|
30
|
+
getSongsLibrary: async function () {
|
|
31
|
+
const zlib = require("zlib");
|
|
32
|
+
const fetch = require("node-fetch");
|
|
33
|
+
|
|
34
|
+
let req = await fetch("https://geometrydashfiles.b-cdn.net/music/musiclibrary.dat");
|
|
35
|
+
let res = await req.text();
|
|
36
|
+
|
|
37
|
+
let libArray;
|
|
38
|
+
const buffer = await new Promise((resolve, reject) => {
|
|
39
|
+
zlib.unzip(Buffer.from(res, "base64"), (err, buffer) => {
|
|
40
|
+
if (err) {
|
|
41
|
+
reject(err);
|
|
42
|
+
} else {
|
|
43
|
+
resolve(buffer);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
})
|
|
47
|
+
const rawData = buffer.toString();
|
|
48
|
+
libArray = rawData.split("|");
|
|
49
|
+
|
|
50
|
+
let library = {};
|
|
51
|
+
library.version = Number(libArray[0]);
|
|
52
|
+
|
|
53
|
+
let genres = [];
|
|
54
|
+
let rawGenres = libArray[3].split(";");
|
|
55
|
+
rawGenres.pop();
|
|
56
|
+
rawGenres.forEach(genre => {
|
|
57
|
+
genres.push({ id: genre.split(",")[0], name: genre.split(",")[1] })
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
let artists = [];
|
|
61
|
+
let rawArtists = libArray[1].split(";");
|
|
62
|
+
rawArtists.pop();
|
|
63
|
+
rawArtists.forEach(artist => {
|
|
64
|
+
let obj = {};
|
|
65
|
+
obj.id = Number(artist.split(",")[0]);
|
|
66
|
+
obj.name = artist.split(",")[1];
|
|
67
|
+
if (artist.split(",")[2].trim() != "") obj.website = decodeURIComponent(artist.split(",")[2]);
|
|
68
|
+
if (artist.split(",")[3].trim() != "") obj.youtube = artist.split(",")[3];
|
|
69
|
+
artists.push(obj);
|
|
70
|
+
})
|
|
71
|
+
|
|
72
|
+
let songs = [];
|
|
73
|
+
let rawSongs = libArray[2].split(";");
|
|
74
|
+
rawSongs.pop();
|
|
75
|
+
rawSongs.forEach(song => {
|
|
76
|
+
let obj = {};
|
|
77
|
+
|
|
78
|
+
obj.id = Number(song.split(",")[0]);
|
|
79
|
+
obj.name = song.split(",")[1];
|
|
80
|
+
|
|
81
|
+
let songArtist = artists.filter(a => a.id == song.split(",")[2])[0];
|
|
82
|
+
obj.artist = songArtist;
|
|
83
|
+
|
|
84
|
+
let size = song.split(",")[3];
|
|
85
|
+
size = size / 1048576;
|
|
86
|
+
obj.size = size.toFixed(1);
|
|
87
|
+
|
|
88
|
+
obj.duration = Number(song.split(",")[4]);
|
|
89
|
+
|
|
90
|
+
let songGenres = [];
|
|
91
|
+
let rawSongGenres = song.split(",")[5].split(".");
|
|
92
|
+
rawSongGenres.shift();
|
|
93
|
+
rawSongGenres.pop();
|
|
94
|
+
rawSongGenres.forEach(genre => {
|
|
95
|
+
let songGenre = genres.filter(g => g.id == genre)[0];
|
|
96
|
+
songGenres.push(songGenre.name);
|
|
97
|
+
})
|
|
98
|
+
obj.genres = songGenres;
|
|
99
|
+
|
|
100
|
+
songs.push(obj);
|
|
101
|
+
})
|
|
102
|
+
|
|
103
|
+
library.songs = songs;
|
|
104
|
+
|
|
105
|
+
return library;
|
|
106
|
+
}
|
|
107
|
+
}
|
package/functions/getTab.js
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
+
/**
|
|
3
|
+
* Fetches levels from a specified tab.
|
|
4
|
+
* @param {("trending"|"recent"|"featured"|"magic"|"awarded"|"sent")} tab - The tab to fetch.
|
|
5
|
+
* @param {number} page - The page to search through. Defaults to 1.
|
|
6
|
+
* @returns {import("./getLevelByID").Level[]}
|
|
7
|
+
*/
|
|
2
8
|
getTab: async function (tab, page = 1) {
|
|
3
9
|
let tabs = { trending: 3, recent: 4, featured: 6, magic: 7, awarded: 11, sent: 27 }
|
|
4
10
|
if (!tabs[tab.toLowerCase()]) throw new Error('Please provide a valid tab! Possible tabs: "trending", "recent", "featured", "magic", "awarded", "sent".');
|
|
11
|
+
|
|
5
12
|
const { gjReq } = require("../gjReq");
|
|
6
13
|
let GJDecode = require("../misc/GJDecode");
|
|
7
14
|
const { decodeSearchResults } = new GJDecode;
|
|
@@ -11,6 +18,7 @@ module.exports = {
|
|
|
11
18
|
secret: "Wmfd2893gb7"
|
|
12
19
|
});
|
|
13
20
|
if (res.data == -1) return [];
|
|
21
|
+
|
|
14
22
|
return decodeSearchResults(res.data);
|
|
15
23
|
}
|
|
16
24
|
}
|
package/functions/getTop100.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
+
/**
|
|
3
|
+
* Fetches the player leaderboard based on the amount of stars.
|
|
4
|
+
* @returns {import("./getCreatorScores").ScoresUser[]}
|
|
5
|
+
*/
|
|
2
6
|
getTop100: async function () {
|
|
3
7
|
let GJDecode = require("../misc/GJDecode");
|
|
4
8
|
const { decodeScoresUser } = new GJDecode;
|
package/functions/getTopLists.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
+
/**
|
|
3
|
+
* Fetches the list of top lists.
|
|
4
|
+
* @param {number} page - The page to search through. Defaults to 1.
|
|
5
|
+
* @returns {import("./searchLists").List[]}
|
|
6
|
+
*/
|
|
2
7
|
getTopLists: async function (page = 1) {
|
|
3
8
|
const { gjReq } = require("../gjReq");
|
|
4
9
|
const GJDecode = require("../misc/GJDecode");
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Fetches levels by a user.
|
|
4
|
+
* @param {string} username - The search query (username or player ID).
|
|
5
|
+
* @param {number} page - The page to search through. Defaults to 1.
|
|
6
|
+
* @returns {import("./getLevelByID").Level[]}
|
|
7
|
+
*/
|
|
8
|
+
getUserLevels: async function (username, page = 1) {
|
|
9
|
+
if (!username) throw new Error("Please provide a username or player ID!");
|
|
4
10
|
|
|
5
11
|
const { gjReq } = require("../gjReq.js");
|
|
6
12
|
let GJDecode = require("../misc/GJDecode.js");
|
|
7
13
|
const { decodeSearchResults } = new GJDecode;
|
|
8
|
-
let playerID=
|
|
9
|
-
if (isNaN(
|
|
14
|
+
let playerID=username;
|
|
15
|
+
if (isNaN(username)) {
|
|
10
16
|
let search = await gjReq("getGJUsers20", {
|
|
11
|
-
str:
|
|
17
|
+
str: username,
|
|
12
18
|
secret: "Wmfd2893gb7"
|
|
13
19
|
});
|
|
14
20
|
if (search.data == -1) return [];
|
package/functions/reportLevel.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
+
/**
|
|
3
|
+
* Reports a level.
|
|
4
|
+
* @param {number} level - The level ID.
|
|
5
|
+
* @returns {1} - Always returns 1, regardless of whether the level was reported or not.
|
|
6
|
+
*/
|
|
2
7
|
reportLevel: async function (level) {
|
|
3
8
|
if (isNaN(level)) throw new Error("Please provide a valid level ID.");
|
|
4
9
|
const { gjReq } = require("../gjReq");
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
+
/**
|
|
3
|
+
* Searches for levels.
|
|
4
|
+
* @param {string} query - The search query.
|
|
5
|
+
* @param {number} page - The page to search through. Defaults to 1.
|
|
6
|
+
* @returns {import("./getLevelByID").Level[]}
|
|
7
|
+
*/
|
|
2
8
|
searchLevels: async function (query, page = 1) {
|
|
3
9
|
const { gjReq } = require("../gjReq");
|
|
4
10
|
let GJDecode = require("../misc/GJDecode");
|
package/functions/searchLists.js
CHANGED
|
@@ -1,4 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {Object} List
|
|
3
|
+
* @property {number} id - The list ID.
|
|
4
|
+
* @property {string} name - The list name.
|
|
5
|
+
* @property {string} description - The list's description.
|
|
6
|
+
* @property {string} difficulty - The list's difficulty.
|
|
7
|
+
* @property {string} username - The list uploader's username.
|
|
8
|
+
* @property {number} playerID - The list uploader's player ID.
|
|
9
|
+
* @property {number} accountID - The list uploader's account ID.
|
|
10
|
+
* @property {string} downloads - The amount of times the list has been downloaded.
|
|
11
|
+
* @property {number} likes - The amount of likes the list has.
|
|
12
|
+
* @property {number} diamonds - The amount of diamonds given when completing the list.
|
|
13
|
+
* @property {boolean} disliked - Whether the list is disliked (i.e. if the likes count is less than 0).
|
|
14
|
+
* @property {Array<Number>} levels - The array of level IDs in the list.
|
|
15
|
+
* @property {number} required - The amount of completed levels required to get the reward.
|
|
16
|
+
* @property {number} uploadedUnix - The UNIX timestamp of the list's upload date.
|
|
17
|
+
*/
|
|
18
|
+
|
|
1
19
|
module.exports = {
|
|
20
|
+
/**
|
|
21
|
+
* Searches for lists.
|
|
22
|
+
* @param {string} query - The search query.
|
|
23
|
+
* @param {number} page - The page to search through. Defaults to 1.
|
|
24
|
+
* @returns {List[]}
|
|
25
|
+
*/
|
|
2
26
|
searchLists: async function (query, page = 1) {
|
|
3
27
|
const { gjReq } = require("../gjReq");
|
|
4
28
|
const GJDecode = require("../misc/GJDecode");
|
package/functions/unblockUser.js
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
+
/**
|
|
3
|
+
* Unblocks a specified user.
|
|
4
|
+
* @param {string} target - The player that needs to be unblocked.
|
|
5
|
+
* @param {string} username - The unblocking person's username or player ID.
|
|
6
|
+
* @param {string} password - The unblocking person's password.
|
|
7
|
+
* @returns {number} Returns 1 if everything's OK, and -1 if something went wrong.
|
|
8
|
+
*/
|
|
2
9
|
unblockUser: async function (target, username, password) {
|
|
3
10
|
if (!target) throw new Error("Please provide a target's player ID or username!");
|
|
4
11
|
if (!username) throw new Error("Please provide a player ID or username!");
|
|
@@ -30,7 +37,6 @@ module.exports = {
|
|
|
30
37
|
}
|
|
31
38
|
|
|
32
39
|
let res = await gjReq("unblockGJUser20", data);
|
|
33
|
-
if (res.data == -1) throw new Error(-1);
|
|
34
40
|
|
|
35
41
|
return res.data;
|
|
36
42
|
}
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Updates the description on a level.
|
|
4
|
+
* @param {number} level - The level ID.
|
|
5
|
+
* @param {string} desc - The new description.
|
|
6
|
+
* @param {string} username - The level uploader's username or player ID.
|
|
7
|
+
* @param {string} password - The level uploader's password.
|
|
8
|
+
* @returns {number} Returns 1 if everything's OK, and -1 if something went wrong.
|
|
9
|
+
*/
|
|
10
|
+
updateLevelDesc: async function (level, desc, username, password) {
|
|
3
11
|
if (isNaN(level)) throw new Error("Please provide a valid level ID!");
|
|
4
|
-
if (!
|
|
12
|
+
if (!username) throw new Error("Please provide a player ID or username!");
|
|
5
13
|
if (!password) throw new Error("Please provide a password!");
|
|
6
14
|
|
|
7
15
|
const { gjReq } = require("../gjReq");
|
|
@@ -9,7 +17,7 @@ module.exports = {
|
|
|
9
17
|
const xor = new XOR;
|
|
10
18
|
|
|
11
19
|
let search = await gjReq("getGJUsers20", {
|
|
12
|
-
str:
|
|
20
|
+
str: username,
|
|
13
21
|
secret: "Wmfd2893gb7"
|
|
14
22
|
});
|
|
15
23
|
if (search.data == -1) throw new Error(-1);
|
|
@@ -22,7 +30,6 @@ module.exports = {
|
|
|
22
30
|
levelDesc: Buffer.from(desc).toString("base64"),
|
|
23
31
|
secret: "Wmfd2893gb7"
|
|
24
32
|
});
|
|
25
|
-
if (res.data == -1) throw new Error("-1: Failed to update the description.");
|
|
26
33
|
|
|
27
34
|
return res.data;
|
|
28
35
|
}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Uploads a post to an account.
|
|
4
|
+
* @param {string} content - The account post content.
|
|
5
|
+
* @param {string} username - The poster's username or player ID.
|
|
6
|
+
* @param {string} password - The poster's password.
|
|
7
|
+
* @returns {number} Returns 1 if everything's OK, and -1 if something went wrong.
|
|
8
|
+
*/
|
|
9
|
+
uploadAccountPost: async function (content, username, password) {
|
|
3
10
|
if (!content) throw new Error("Please provide an account post content!");
|
|
4
|
-
if (!
|
|
11
|
+
if (!username) throw new Error("Please provide a user ID or name!");
|
|
5
12
|
if (!password) throw new Error("Please provide a password!");
|
|
6
13
|
|
|
7
14
|
const { gjReq } = require("../gjReq");
|
|
@@ -9,7 +16,7 @@ module.exports = {
|
|
|
9
16
|
const xor = new XOR;
|
|
10
17
|
|
|
11
18
|
let search = await gjReq("getGJUsers20", {
|
|
12
|
-
str:
|
|
19
|
+
str: username,
|
|
13
20
|
secret: "Wmfd2893gb7"
|
|
14
21
|
});
|
|
15
22
|
if (search.data == -1) throw new Error(-1);
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Posts a comment on a level.
|
|
4
|
+
* @param {string} comment - The comment content.
|
|
5
|
+
* @param {number} level - The level ID.
|
|
6
|
+
* @param {string} username - The commenter's username or player ID.
|
|
7
|
+
* @param {string} password - The commenter's password.
|
|
8
|
+
* @param {number} percent - The achieved level percentage to be displayed on the comment.
|
|
9
|
+
* @returns {number} Returns 1 if everything's OK, and -1 if something went wrong.
|
|
10
|
+
*/
|
|
11
|
+
uploadComment: async function (comment, level, username, password, percent = 0) {
|
|
3
12
|
if (!comment) throw new Error("Please provide a comment!");
|
|
4
|
-
if (!
|
|
5
|
-
if (!
|
|
13
|
+
if (!level) throw new Error("Please provide a level ID!");
|
|
14
|
+
if (!username) throw new Error("Please provide a username or a player ID!");
|
|
6
15
|
if (!password) throw new Error("Please provide a password!");
|
|
7
16
|
if (Number(percent) > 100) throw new Error("The percentage cannot be more than 100!");
|
|
8
17
|
|
|
@@ -12,7 +21,7 @@ module.exports = {
|
|
|
12
21
|
function sha1(data) { return crypto.createHash("sha1").update(data, "binary").digest("hex"); }
|
|
13
22
|
|
|
14
23
|
let search = await gjReq("getGJUsers20", {
|
|
15
|
-
str:
|
|
24
|
+
str: username,
|
|
16
25
|
secret: "Wmfd2893gb7"
|
|
17
26
|
});
|
|
18
27
|
if (search.data == -1) throw new Error(-1);
|
|
@@ -22,7 +31,7 @@ module.exports = {
|
|
|
22
31
|
const XOR = require("../xor.js");
|
|
23
32
|
const xor = new XOR;
|
|
24
33
|
|
|
25
|
-
let chkStr = username.toLowerCase() + Buffer.from(comment).toString("base64") +
|
|
34
|
+
let chkStr = username.toLowerCase() + Buffer.from(comment).toString("base64") + level + percent + "0xPT6iUrtws0J";
|
|
26
35
|
let chk = xor.encrypt(sha1(chkStr), 29481);
|
|
27
36
|
|
|
28
37
|
let res = await gjReq("uploadGJComment21", {
|
|
@@ -30,7 +39,7 @@ module.exports = {
|
|
|
30
39
|
gjp: xor.encrypt(password, 37526),
|
|
31
40
|
userName: username.toLowerCase(),
|
|
32
41
|
comment: Buffer.from(comment).toString("base64"),
|
|
33
|
-
levelID:
|
|
42
|
+
levelID: level,
|
|
34
43
|
percent: percent,
|
|
35
44
|
chk: chk,
|
|
36
45
|
secret: "Wmfd2893gb7"
|
|
@@ -1,24 +1,33 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Sends a message.
|
|
4
|
+
* @param {string} recipient - The message recipient.
|
|
5
|
+
* @param {string} subject - The message subject.
|
|
6
|
+
* @param {string} content - The message content.
|
|
7
|
+
* @param {string} username - The sender's username or player ID.
|
|
8
|
+
* @param {string} password - The sender's password.
|
|
9
|
+
* @returns {number} Returns 1 if everything's OK, and -1 if something went wrong.
|
|
10
|
+
*/
|
|
11
|
+
uploadMessage: async function (recipient, subject, content, username, password) {
|
|
12
|
+
if (!recipient) throw new Error("Please specify a message recipient!");
|
|
13
|
+
if (!subject) throw new Error("Please specify a message subject!");
|
|
5
14
|
if (!content) throw new Error("Please specify a message content!");
|
|
6
|
-
if (!
|
|
7
|
-
if (!
|
|
15
|
+
if (!username) throw new Error("Please provide a username or a player ID!");
|
|
16
|
+
if (!password) throw new Error("Please provide a password!");
|
|
8
17
|
|
|
9
18
|
const { gjReq } = require("../gjReq");
|
|
10
19
|
const XOR = require("../xor");
|
|
11
20
|
const xor = new XOR;
|
|
12
21
|
|
|
13
22
|
let userSearch = await gjReq("getGJUsers20", {
|
|
14
|
-
str:
|
|
23
|
+
str: username,
|
|
15
24
|
secret: "Wmfd2893gb7"
|
|
16
25
|
});
|
|
17
26
|
if (userSearch.data == -1) throw new Error(-1);
|
|
18
27
|
let userAccID = userSearch.data.split(":")[21];
|
|
19
28
|
|
|
20
29
|
let recSearch = await gjReq("getGJUsers20", {
|
|
21
|
-
str:
|
|
30
|
+
str: recipient,
|
|
22
31
|
secret: "Wmfd2893gb7"
|
|
23
32
|
});
|
|
24
33
|
if (recSearch.data == -1) throw new Error(-1);
|
|
@@ -27,8 +36,8 @@ module.exports = {
|
|
|
27
36
|
let res = await gjReq("uploadGJMessage20", {
|
|
28
37
|
accountID: userAccID,
|
|
29
38
|
toAccountID: recAccID,
|
|
30
|
-
gjp: xor.encrypt(
|
|
31
|
-
subject: Buffer.from(
|
|
39
|
+
gjp: xor.encrypt(password, 37526),
|
|
40
|
+
subject: Buffer.from(subject).toString("base64"),
|
|
32
41
|
body: xor.encrypt(content, 14251),
|
|
33
42
|
secret: "Wmfd2893gb7"
|
|
34
43
|
});
|
package/gjReq.js
CHANGED
|
@@ -1 +1,18 @@
|
|
|
1
|
-
const fetch=require("node-fetch");
|
|
1
|
+
const fetch = require("node-fetch");
|
|
2
|
+
module.exports = {
|
|
3
|
+
gjReq: async function (endpoint, data) {
|
|
4
|
+
let r = await fetch(`https://www.boomlings.com/database/${endpoint.endsWith(".php") ? endpoint.split(".php")[0] : endpoint}.php`, {
|
|
5
|
+
method: "POST",
|
|
6
|
+
headers: {
|
|
7
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
|
8
|
+
"User-Agent": " "
|
|
9
|
+
},
|
|
10
|
+
body: new URLSearchParams(data)
|
|
11
|
+
});
|
|
12
|
+
let res = await r.text();
|
|
13
|
+
return {
|
|
14
|
+
data: res,
|
|
15
|
+
status: r.status
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
};
|
package/index.js
CHANGED
|
@@ -1,2 +1,36 @@
|
|
|
1
|
-
const{dlLevel}=require("./functions/dlLevel");
|
|
2
|
-
|
|
1
|
+
const { dlLevel } = require("./functions/dlLevel");
|
|
2
|
+
const { getProfile } = require("./functions/getProfile");
|
|
3
|
+
const { getSongsLibrary } = require("./functions/getSongsLibrary");
|
|
4
|
+
const { getSongInfo } = require("./functions/getSongInfo");
|
|
5
|
+
const { getAccountPosts } = require("./functions/getAccountPosts");
|
|
6
|
+
const { getGauntlets } = require("./functions/getGauntlets");
|
|
7
|
+
const { getMapPacks } = require("./functions/getMapPacks");
|
|
8
|
+
const { getOfficialSongInfo } = require("./functions/getOfficialSongInfo");
|
|
9
|
+
const { getDailyLevel } = require("./functions/getDailyLevel");
|
|
10
|
+
const { getWeeklyDemon } = require("./functions/getWeeklyDemon");
|
|
11
|
+
const { getCreatorScores } = require("./functions/getCreatorScores");
|
|
12
|
+
const { getTop100 } = require("./functions/getTop100");
|
|
13
|
+
const { reportLevel } = require("./functions/reportLevel");
|
|
14
|
+
const { uploadMessage } = require("./functions/uploadMessage");
|
|
15
|
+
const { getMessages } = require("./functions/getMessages");
|
|
16
|
+
const { dlMessage } = require("./functions/dlMessage");
|
|
17
|
+
const { getBlockedList } = require("./functions/getBlockedList");
|
|
18
|
+
const { getFriendsList } = require("./functions/getFriendsList");
|
|
19
|
+
const { deleteLevel } = require("./functions/deleteLevel");
|
|
20
|
+
const { blockUser } = require("./functions/blockUser");
|
|
21
|
+
const { unblockUser } = require("./functions/unblockUser");
|
|
22
|
+
const { uploadAccountPost } = require("./functions/uploadAccountPost");
|
|
23
|
+
const { deleteAccountPost } = require("./functions/deleteAccountPost");
|
|
24
|
+
const { updateLevelDesc } = require("./functions/updateLevelDesc");
|
|
25
|
+
const { getLevelByID } = require("./functions/getLevelByID");
|
|
26
|
+
const { searchLevels } = require("./functions/searchLevels");
|
|
27
|
+
const { getComments } = require("./functions/getComments");
|
|
28
|
+
const { getTopLists } = require("./functions/getTopLists");
|
|
29
|
+
const { searchLists } = require("./functions/searchLists");
|
|
30
|
+
const { getTab } = require("./functions/getTab");
|
|
31
|
+
const { getUserLevels } = require("./functions/getUserLevels");
|
|
32
|
+
const { deleteComment } = require("./functions/deleteComment");
|
|
33
|
+
const { getCommentHistory } = require("./functions/getCommentHistory");
|
|
34
|
+
const { getLevelScores } = require("./functions/getLevelScores");
|
|
35
|
+
const { uploadComment } = require("./functions/uploadComment");
|
|
36
|
+
module.exports = { dlLevel, getProfile, getSongsLibrary, getSongInfo, getAccountPosts, getGauntlets, getMapPacks, getOfficialSongInfo, getDailyLevel, getWeeklyDemon, getCreatorScores, getTop100, reportLevel, uploadMessage, getMessages, dlMessage, getBlockedList, getFriendsList, deleteLevel, blockUser, unblockUser, uploadAccountPost, deleteAccountPost, updateLevelDesc, getLevelByID, searchLevels, getComments, getTopLists, searchLists, getTab, getUserLevels, deleteComment, getCommentHistory, getLevelScores, uploadComment };
|