gj-boomlings-api 1.5.7 → 2.0.0
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 +31 -7
- package/functions/blockUser.js +29 -30
- package/functions/deleteAccountPost.js +22 -32
- package/functions/deleteComment.js +20 -20
- package/functions/deleteLevel.js +23 -29
- package/functions/dlLevel.js +1 -8
- package/functions/dlMessage.js +30 -36
- package/functions/getAccountPosts.js +23 -36
- package/functions/getBlockedList.js +47 -63
- package/functions/getCommentHistory.js +59 -39
- package/functions/getComments.js +46 -27
- package/functions/getCreatorScores.js +18 -30
- package/functions/getDailyLevel.js +5 -9
- package/functions/getFriendsList.js +48 -56
- package/functions/getGauntlets.js +18 -24
- package/functions/getLevelByID.js +9 -156
- package/functions/getLevelScores.js +63 -46
- package/functions/getMapPacks.js +40 -28
- package/functions/getMessages.js +36 -41
- package/functions/getOfficialSongInfo.js +9 -87
- package/functions/getProfile.js +1 -7
- package/functions/getSongInfo.js +22 -31
- package/functions/getSongsLibrary.js +1 -0
- package/functions/getTab.js +16 -7
- package/functions/getTop100.js +18 -27
- package/functions/getTopLists.js +14 -0
- package/functions/getUserLevels.js +24 -88
- package/functions/getWeeklyDemon.js +5 -9
- package/functions/reportLevel.js +9 -22
- package/functions/searchLevels.js +15 -84
- package/functions/searchLists.js +15 -0
- package/functions/unblockUser.js +29 -30
- package/functions/updateLevelDesc.js +27 -43
- package/functions/uploadAccountPost.js +23 -36
- package/functions/uploadComment.js +43 -57
- package/functions/uploadMessage.js +32 -41
- package/gjReq.js +1 -0
- package/index.js +2 -1
- package/misc/GJDecode.js +1 -1
- package/misc/colors.json +1 -1
- package/misc/gauntlets.json +1 -0
- package/misc/officialsongs.json +1 -1
- package/misc/rgbToHEX.js +1 -1
- package/package.json +2 -6
- package/xor.js +1 -0
- package/.nvmrc +0 -1
- package/config.json +0 -1
- package/functions/searchUsers.js +0 -27
- package/misc/decB64.js +0 -4
- package/misc/demonlist.js +0 -1
- package/misc/encB64.js +0 -1
- package/misc/gjReq.js +0 -1
- package/misc/gjWReq.js +0 -1
- package/misc/gjp.js +0 -1
- package/misc/xor.js +0 -5
|
@@ -1,48 +1,39 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
* @param {*} pass - The sending person's password.
|
|
9
|
-
*/
|
|
10
|
-
uploadMessage:
|
|
11
|
-
async function(receiver, subj, content, user, pass) {
|
|
12
|
-
if(!receiver) throw new Error("Please specify a message receiver!");
|
|
13
|
-
if(!subj) throw new Error("Please specify a message subject!");
|
|
14
|
-
if(!content) throw new Error("Please specify a message content!");
|
|
15
|
-
if(!user) throw new Error("Please provide a username or a player ID!");
|
|
16
|
-
if(!pass) throw new Error("Please provide a password!");
|
|
2
|
+
uploadMessage: async function (receiver, subj, content, user, pass) {
|
|
3
|
+
if (!receiver) throw new Error("Please specify a message receiver!");
|
|
4
|
+
if (!subj) throw new Error("Please specify a message subject!");
|
|
5
|
+
if (!content) throw new Error("Please specify a message content!");
|
|
6
|
+
if (!user) throw new Error("Please provide a username or a player ID!");
|
|
7
|
+
if (!pass) throw new Error("Please provide a password!");
|
|
17
8
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const {gjWReq} = require("../misc/gjWReq.js");
|
|
22
|
-
const { secret } = require("../config.json");
|
|
23
|
-
const { searchUsers } = require("./searchUsers.js");
|
|
24
|
-
|
|
25
|
-
let receiverObj = await searchUsers(receiver);
|
|
26
|
-
let userObj = await searchUsers(user);
|
|
9
|
+
const { gjReq } = require("../gjReq");
|
|
10
|
+
const XOR = require("../xor");
|
|
11
|
+
const xor = new XOR;
|
|
27
12
|
|
|
28
|
-
|
|
29
|
-
|
|
13
|
+
let userSearch = await gjReq("getGJUsers20", {
|
|
14
|
+
str: user,
|
|
15
|
+
secret: "Wmfd2893gb7"
|
|
16
|
+
});
|
|
17
|
+
if (userSearch.data == -1) throw new Error(-1);
|
|
18
|
+
let userAccID = userSearch.data.split(":")[21];
|
|
30
19
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
secret: secret
|
|
38
|
-
}
|
|
20
|
+
let recSearch = await gjReq("getGJUsers20", {
|
|
21
|
+
str: receiver,
|
|
22
|
+
secret: "Wmfd2893gb7"
|
|
23
|
+
});
|
|
24
|
+
if (recSearch.data == -1) throw new Error(-1);
|
|
25
|
+
let recAccID = recSearch.data.split(":")[21];
|
|
39
26
|
|
|
40
|
-
|
|
41
|
-
|
|
27
|
+
let res = await gjReq("uploadGJMessage20", {
|
|
28
|
+
accountID: userAccID,
|
|
29
|
+
toAccountID: recAccID,
|
|
30
|
+
gjp: xor.encrypt(pass, 37526),
|
|
31
|
+
subject: Buffer.from(subj).toString("base64"),
|
|
32
|
+
body: xor.encrypt(content, 14251),
|
|
33
|
+
secret: "Wmfd2893gb7"
|
|
34
|
+
});
|
|
35
|
+
if (res.data == -1) throw new Error(-1);
|
|
42
36
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
return res.data;
|
|
47
|
-
}
|
|
37
|
+
return res.data;
|
|
38
|
+
}
|
|
48
39
|
}
|
package/gjReq.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const fetch=require("node-fetch");module.exports={gjReq:async function(endpoint,data){let r=await fetch(`https://www.boomlings.com/database/${endpoint.endsWith(".php")?endpoint.split(".php")[0]:endpoint}.php`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded","User-Agent":" "},body:new URLSearchParams(data)});let res=await r.text();return{data:res,status:r.status}}};
|
package/index.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
const{dlLevel}=require("./functions/dlLevel
|
|
1
|
+
const{dlLevel}=require("./functions/dlLevel");const{getProfile}=require("./functions/getProfile");const{getSongsLibrary}=require("./functions/getSongsLibrary");const{getSongInfo}=require("./functions/getSongInfo");const{getAccountPosts}=require("./functions/getAccountPosts");const{getGauntlets}=require("./functions/getGauntlets");const{getMapPacks}=require("./functions/getMapPacks");const{getOfficialSongInfo}=require("./functions/getOfficialSongInfo");const{getDailyLevel}=require("./functions/getDailyLevel");const{getWeeklyDemon}=require("./functions/getWeeklyDemon");const{getCreatorScores}=require("./functions/getCreatorScores");const{getTop100}=require("./functions/getTop100");const{reportLevel}=require("./functions/reportLevel");const{uploadMessage}=require("./functions/uploadMessage");const{getMessages}=require("./functions/getMessages");const{dlMessage}=require("./functions/dlMessage");const{getBlockedList}=require("./functions/getBlockedList");const{getFriendsList}=require("./functions/getFriendsList");const{deleteLevel}=require("./functions/deleteLevel");const{blockUser}=require("./functions/blockUser");const{unblockUser}=require("./functions/unblockUser");const{uploadAccountPost}=require("./functions/uploadAccountPost");const{deleteAccountPost}=require("./functions/deleteAccountPost");const{updateLevelDesc}=require("./functions/updateLevelDesc");const{getLevelByID}=require("./functions/getLevelByID");const{searchLevels}=require("./functions/searchLevels");const{getComments}=require("./functions/getComments");const{getTopLists}=require("./functions/getTopLists");const{searchLists}=require("./functions/searchLists");const{getTab}=require("./functions/getTab");const{getUserLevels}=require("./functions/getUserLevels");const{deleteComment}=require("./functions/deleteComment");const{getCommentHistory}=require("./functions/getCommentHistory");const{getLevelScores}=require("./functions/getLevelScores");const{uploadComment}=require("./functions/uploadComment");
|
|
2
|
+
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};
|
package/misc/GJDecode.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const{getOfficialSongInfo}=require("../functions/getOfficialSongInfo");const{rgbToHEX}=require("./rgbToHEX");const colors=require("./colors.json");module.exports=class GJDecode{decodeScoresUser(u){let iconObj={0:"cube",1:"ship",2:"ball",3:"ufo",4:"wave",5:"robot",6:"spider",7:"swing",8:"jetpack"};let s=u.split(":");return{name:s[1],playerID:Number(s[3]),accountID:Number(s[21]),rank:Number(s[9]),stars:Number(s[23]),diamonds:Number(s[29]),secretCoins:Number(s[5]),userCoins:Number(s[7]),demons:Number(s[31]),moons:Number(s[25]),creatorPoints:Number(s[27]),c1:rgbToHEX(colors[s[13]]),c2:rgbToHEX(colors[s[15]]),iconType:iconObj[s[17]]}}decodeSearchResults(res){let levels=res.split("#")[0].split("|");let creators=res.split("#")[1].split("|");let songs=res.split("#")[2].split("~:~");let result=[];let encCreators={};let encSongs={};creators.forEach(c=>{let playerID=c.split(":")[0];let username=c.split(":")[1];encCreators[playerID]=username});songs.forEach(s=>{let sp=s.split("~|~");let songId=sp[1];let songName=sp[3];let songArtistID=sp[5];let songArtist=sp[7];let size=sp[9];let link=sp[13];encSongs[songId]={name:songName,id:Number(songId),artist:songArtist,artistId:Number(songArtistID),fileSize:`${size} MB`,link:decodeURIComponent(link)}});for(const l of levels){let s=l.split(":");let diffObj={"-10":"Auto",0:"Unrated",10:"Easy",20:"Normal",30:"Hard",40:"Harder",50:"Insane"};if(Boolean(Number(s[21]))){diffObj={10:"Easy Demon",20:"Medium Demon",30:"Hard Demon",40:"Insane Demon",50:"Extreme Demon"}}const lengthObj={0:"Tiny",1:"Short",2:"Medium",3:"Long",4:"XL",5:"Platformer"};const versionObj={10:"1.7",18:"1.8",19:"1.9",20:"2.0",21:"2.1",22:"2.2"};let lvl={id:Number(s[1]),name:s[3],levelVersion:Number(s[5]),playerID:Number(s[7]),difficulty:diffObj[s[11]],stars:Number(s[27]),downloads:Number(s[13]),likes:Number(s[19]),disliked:s[19]<0?true:false,length:lengthObj[s[37]],demon:Boolean(Number(s[21])),featured:Boolean(Number(s[29])),epic:Boolean(Number(s[31])),objects:Number(s[33]),starsRequested:Number(s[47]),gameVersion:versionObj[s[17]]?versionObj[s[17]]:"Pre-1.7",copiedFrom:Number(s[39]),large:s[33]>4e4?true:false,twoPlayer:Boolean(Number(s[41])),coins:Number(s[43]),verifiedCoins:Boolean(Number(s[45]))};let officialSongID=Number(s[15]);let songID=Number(s[53]);let playerId=s[7];let song;if(officialSongID==0&&songID!=0||officialSongID!=0&&songID!=0)song=encSongs[songID.toString()];if(officialSongID!=0&&songID==0)song=getOfficialSongInfo(officialSongID+1);if(officialSongID==0&&songID==0)song=getOfficialSongInfo(1);lvl["creator"]=encCreators[playerId]?encCreators[playerId]:"-";lvl["song"]=song;result.push(lvl)}return result}decodeLists(res){let rawLists=res.split("#")[0].split("|");let rawAccounts=res.split("#")[1].split("|");let accounts=[];rawAccounts.forEach(a=>{let s=a.split(":");accounts.push({username:s[1],playerID:Number(s[0]),accountID:s[2]})});let lists=[];let diffObj={"-1":"N/A",0:"Auto",1:"Easy",2:"Normal",3:"Hard",4:"Harder",5:"Insane",6:"Easy Demon",7:"Medium Demon",8:"Hard Demon",9:"Insane Demon",10:"Extreme Demon"};rawLists.forEach(l=>{let s=l.split(":");let rawLvls=s[21].split(",");let lvls=[];for(let lvl of rawLvls){lvls.push(Number(lvl))}let playerID=accounts.filter(a=>a.accountID==s[9])[0].playerID;lists.push({id:Number(s[1]),name:s[3],description:Buffer.from(s[5],"base64").toString(),difficulty:diffObj[s[15]],username:s[11],playerID:playerID,accountID:Number(s[9]),downloads:Number(s[13]),likes:Number(s[17]),diamonds:Number(s[23]),disliked:s[17]<0?true:false,levels:lvls,required:Number(s[25]),uploadedUnix:Number(s[27])})});return lists}};
|
package/misc/colors.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"0":"125,255,0","1":"0,255,0","2":"0,255,125","3":"0,255,255","4":"0,125,255","5":"0,0,255","6":"125,0,255","7":"255,0,255","8":"255,0,125","9":"255,0,0","10":"255,125,0","11":"255,255,0","12":"255,255,255","13":"185,0,255","14":"255,185,0","15":"0,0,0","16":"0,200,255","17":"175,175,175","18":"90,90,90","19":"255,125,125","20":"0,175,75","21":"0,125,125","22":"0,75,175","23":"75,0,175","24":"125,0,125","25":"175,0,75","26":"175,75,0","27":"125,125,0","28":"75,175,0","29":"255,75,0","30":"150,50,0","31":"150,100,0","32":"100,150,0","33":"0,150,100","34":"0,100,150","35":"100,0,150","36":"150,0,100","37":"150,0,0","38":"0,150,0","39":"0,0,150","40":"125,255,175","41":"125,125,255"}
|
|
1
|
+
{"0":"125,255,0","1":"0,255,0","2":"0,255,125","3":"0,255,255","4":"0,125,255","5":"0,0,255","6":"125,0,255","7":"255,0,255","8":"255,0,125","9":"255,0,0","10":"255,125,0","11":"255,255,0","12":"255,255,255","13":"185,0,255","14":"255,185,0","15":"0,0,0","16":"0,200,255","17":"175,175,175","18":"90,90,90","19":"255,125,125","20":"0,175,75","21":"0,125,125","22":"0,75,175","23":"75,0,175","24":"125,0,125","25":"175,0,75","26":"175,75,0","27":"125,125,0","28":"75,175,0","29":"255,75,0","30":"150,50,0","31":"150,100,0","32":"100,150,0","33":"0,150,100","34":"0,100,150","35":"100,0,150","36":"150,0,100","37":"150,0,0","38":"0,150,0","39":"0,0,150","40":"125,255,175","41":"125,125,255","42":"255,250,127","43":"250,127,255","44":"0,255,192","45":"80,50,14","46":"205,165,118","47":"182,128,255","48":"255,58,58","49":"77,77,143","50":"0,10,76","51":"253,212,206","52":"190,181,255","53":"112,0,0","54":"82,2,0","55":"56,1,6","56":"128,79,79","57":"122,53,53","58":"81,36,36","59":"163,98,70","60":"117,73,54","61":"86,53,40","62":"255,185,114","63":"255,160,64","64":"102,49,30","65":"91,39,0","66":"71,32,0","67":"167,123,77","68":"109,83,57","69":"81,62,42","70":"255,255,192","71":"253,224,160","72":"192,255,160","73":"177,255,109","74":"192,255,224","75":"148,255,228","76":"67,161,138","77":"49,109,95","78":"38,84,73","79":"0,96,0","80":"0,64,0","81":"0,96,96","82":"0,64,64","83":"160,255,255","84":"1,7,112","85":"0,73,109","86":"0,50,76","87":"0,38,56","88":"80,128,173","89":"51,83,117","90":"35,60,86","91":"224,224,224","92":"61,6,140","93":"55,8,96","94":"64,64,64","95":"111,73,164","96":"84,54,127","97":"66,42,99","98":"252,181,255","99":"175,87,175","100":"130,67,130","101":"94,49,94","102":"128,128,128","103":"102,3,62","104":"71,1,52","105":"210,255,50","106":"118,189,255"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"1":"Fire","2":"Ice","3":"Poison","4":"Shadow","5":"Lava","6":"Bonus","7":"Chaos","8":"Demon","9":"Time","10":"Crystal","11":"Magic","12":"Spike","13":"Monster","14":"Doom","15":"Death","46":"World","47":"Galaxy","48":"Universe","49":"Discord","50":"Split"}
|
package/misc/officialsongs.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"sm":{"name":"Stereo Madness","id":"Level 1","artist":"ForeverBound","link":"https://www.youtube.com/watch?v=JhKyKEDxo8Q"},"bot":{"name":"Back on Track","id":"Level 2","artist":"DJVI","link":"https://www.youtube.com/watch?v=N9vDTYZpqXM"},"pg":{"name":"Polargeist","id":"Level 3","artist":"Step","link":"https://www.youtube.com/watch?v=4W28wWWxKuQ"},"dout":{"name":"Dry Out","id":"Level 4","artist":"DJVI","link":"https://www.youtube.com/watch?v=FnXabH2q2A0"},"bab":{"name":"Base After Base","id":"Level 5","artist":"DJVI","link":"https://www.youtube.com/watch?v=TZULkgQPHt0"},"clg":{"name":"Cant Let Go","id":"Level 6","artist":"DJVI","link":"https://www.youtube.com/watch?v=fLnF-QnR1Zw"},"j":{"name":"Jumper","id":"Level 7","artist":"Waterflame","link":"https://www.youtube.com/watch?v=ZXHO4AN_49Q"},"tm":{"name":"Time Machine","id":"Level 8","artist":"Waterflame","link":"https://www.youtube.com/watch?v=zZ1L9JD6l0g"},"c":{"name":"Cycles","id":"Level 9","artist":"DJVI","link":"https://www.youtube.com/watch?v=KDdvGZn6Gfs"},"xs":{"name":"xStep","id":"Level 10","artist":"DJVI","link":"https://www.youtube.com/watch?v=PSvYfVGyQfw"},"cf":{"name":"Clutterfunk","id":"Level 11","artist":"Waterflame","link":"https://www.youtube.com/watch?v=D5uJOpItgNg"},"toe":{"name":"Theory of Everything","id":"Level 12","artist":"DJ-Nate","link":"https://www.newgrounds.com/audio/listen/354826"},"ea":{"name":"Electroman Adventures","id":"Level 13","artist":"Waterflame","link":"https://www.youtube.com/watch?v=Pb6KyewC_Vg"},"cs":{"name":"Clubstep","id":"Level 14","artist":"DJ-Nate","link":"https://www.newgrounds.com/audio/listen/396093"},"ed":{"name":"Electrodynamix","id":"Level 15","artist":"DJ-Nate","link":"https://www.newgrounds.com/audio/listen/368392"},"hf":{"name":"Hexagon Force","id":"Level 16","artist":"Waterflame","link":"https://www.youtube.com/watch?v=afwK743PL2Y"},"bp":{"name":"Blast Processing","id":"Level 17","artist":"Waterflame","link":"https://www.youtube.com/watch?v=Z5RufkDHsdM"},"toeii":{"name":"Theory of Everything 2","id":"Level 18","artist":"DJ-Nate","link":"https://www.newgrounds.com/audio/listen/790340"},"gd":{"name":"Geometrical Dominator","id":"Level 19","artist":"Waterflame","link":"https://www.newgrounds.com/audio/listen/641172"},"d":{"name":"Deadlocked","id":"Level 20","artist":"F-777","link":"https://www.youtube.com/watch?v=QRGkFkf2r0U"},"fd":{"name":"Fingerdash","id":"Level 21","artist":"MDK","link":"https://www.youtube.com/watch?v=BuPmq7yjDnI"},"tss":{"name":"The Seven Seas","id":"Level 1 (Geometry Dash: Meltdown)","artist":"F-777","link":"https://www.youtube.com/watch?v=38fPQ5JKQ_Q"},"va":{"name":"Viking Arena","id":"Level 2 (Geometry Dash: Meltdown)","artist":"F-777","link":"https://www.youtube.com/watch?v=RaJ6Vf2w9hY"},"ar":{"name":"Airborne Robots","id":"Level 3 (Geometry Dash: Meltdown)","artist":"F-777","link":"https://www.youtube.com/watch?v=guBpnPY32s0"},"tc":{"name":"Random Song 06","id":"Level 22 (The Challenge)","artist":"RobTop","link":"https://www.newgrounds.com/audio/listen/633385"},"p":{"name":"Payload","id":"Level 1 (Geometry Dash: World)","artist":"Dex Arson","link":"https://www.youtube.com/watch?v=2SFOjJxEL7g"},"bm":{"name":"Beast Mode","id":"Level 2 (Geometry Dash: World)","artist":"Dex Arson","link":"https://www.newgrounds.com/audio/listen/589874"},"m":{"name":"Machina","id":"Level 3 (Geometry Dash: World)","artist":"Dex Arson","link":"https://www.youtube.com/watch?v=EWjZOxs87yg"},"y":{"name":"Years","id":"Level 4 (Geometry Dash: World)","artist":"Dex Arson","link":"https://www.youtube.com/watch?v=0MZvDD_sy-w"},"f":{"name":"Frontlines","id":"Level 5 (Geometry Dash: World)","artist":"Dex Arson","link":"https://www.youtube.com/watch?v=f3wAripOdag"},"sp":{"name":"Space Pirates","id":"Level 6 (Geometry Dash: World)","artist":"Waterflame","link":"https://www.youtube.com/watch?v=Cu7HaeRHMhM"},"s":{"name":"Striker","id":"Level 7 (Geometry Dash: World)","artist":"Waterflame","link":"https://www.youtube.com/watch?v=MU9wRCGt9h8"},"e":{"name":"Embers","id":"Level 8 (Geometry Dash: World)","artist":"Dex Arson","link":"https://www.youtube.com/watch?v=nMDMlIvdqlA"},"round":{"name":"Round 1","id":"Level 9 (Geometry Dash: World)","artist":"Dex Arson","link":"https://www.youtube.com/watch?v=NvQoY4gTIGU"},"mdo":{"name":"Monster Dance Off","id":"Level 10 (Geometry Dash: World)","artist":"F-777","link":"https://www.youtube.com/watch?v=B8YkwDbGBr8"},"
|
|
1
|
+
{"sm":{"name":"Stereo Madness","id":"Level 1","artist":"ForeverBound","link":"https://www.youtube.com/watch?v=JhKyKEDxo8Q"},"bot":{"name":"Back on Track","id":"Level 2","artist":"DJVI","link":"https://www.youtube.com/watch?v=N9vDTYZpqXM"},"pg":{"name":"Polargeist","id":"Level 3","artist":"Step","link":"https://www.youtube.com/watch?v=4W28wWWxKuQ"},"dout":{"name":"Dry Out","id":"Level 4","artist":"DJVI","link":"https://www.youtube.com/watch?v=FnXabH2q2A0"},"bab":{"name":"Base After Base","id":"Level 5","artist":"DJVI","link":"https://www.youtube.com/watch?v=TZULkgQPHt0"},"clg":{"name":"Cant Let Go","id":"Level 6","artist":"DJVI","link":"https://www.youtube.com/watch?v=fLnF-QnR1Zw"},"j":{"name":"Jumper","id":"Level 7","artist":"Waterflame","link":"https://www.youtube.com/watch?v=ZXHO4AN_49Q"},"tm":{"name":"Time Machine","id":"Level 8","artist":"Waterflame","link":"https://www.youtube.com/watch?v=zZ1L9JD6l0g"},"c":{"name":"Cycles","id":"Level 9","artist":"DJVI","link":"https://www.youtube.com/watch?v=KDdvGZn6Gfs"},"xs":{"name":"xStep","id":"Level 10","artist":"DJVI","link":"https://www.youtube.com/watch?v=PSvYfVGyQfw"},"cf":{"name":"Clutterfunk","id":"Level 11","artist":"Waterflame","link":"https://www.youtube.com/watch?v=D5uJOpItgNg"},"toe":{"name":"Theory of Everything","id":"Level 12","artist":"DJ-Nate","link":"https://www.newgrounds.com/audio/listen/354826"},"ea":{"name":"Electroman Adventures","id":"Level 13","artist":"Waterflame","link":"https://www.youtube.com/watch?v=Pb6KyewC_Vg"},"cs":{"name":"Clubstep","id":"Level 14","artist":"DJ-Nate","link":"https://www.newgrounds.com/audio/listen/396093"},"ed":{"name":"Electrodynamix","id":"Level 15","artist":"DJ-Nate","link":"https://www.newgrounds.com/audio/listen/368392"},"hf":{"name":"Hexagon Force","id":"Level 16","artist":"Waterflame","link":"https://www.youtube.com/watch?v=afwK743PL2Y"},"bp":{"name":"Blast Processing","id":"Level 17","artist":"Waterflame","link":"https://www.youtube.com/watch?v=Z5RufkDHsdM"},"toeii":{"name":"Theory of Everything 2","id":"Level 18","artist":"DJ-Nate","link":"https://www.newgrounds.com/audio/listen/790340"},"gd":{"name":"Geometrical Dominator","id":"Level 19","artist":"Waterflame","link":"https://www.newgrounds.com/audio/listen/641172"},"d":{"name":"Deadlocked","id":"Level 20","artist":"F-777","link":"https://www.youtube.com/watch?v=QRGkFkf2r0U"},"fd":{"name":"Fingerdash","id":"Level 21","artist":"MDK","link":"https://www.youtube.com/watch?v=BuPmq7yjDnI"},"dash":{"name":"Dash","id":"Level 22","artist":"MDK","link":"https://www.robtopgames.com/dash"},"exp":{"name":"Explorers","id":"Level 23","artist":"Hinkik","link":"https://www.youtube.com/watch?v=fc1tg9qkGyI"},"tss":{"name":"The Seven Seas","id":"Level 1 (Geometry Dash: Meltdown)","artist":"F-777","link":"https://www.youtube.com/watch?v=38fPQ5JKQ_Q"},"va":{"name":"Viking Arena","id":"Level 2 (Geometry Dash: Meltdown)","artist":"F-777","link":"https://www.youtube.com/watch?v=RaJ6Vf2w9hY"},"ar":{"name":"Airborne Robots","id":"Level 3 (Geometry Dash: Meltdown)","artist":"F-777","link":"https://www.youtube.com/watch?v=guBpnPY32s0"},"tc":{"name":"Random Song 06","id":"Level 22 (The Challenge)","artist":"RobTop","link":"https://www.newgrounds.com/audio/listen/633385"},"p":{"name":"Payload","id":"Level 1 (Geometry Dash: World)","artist":"Dex Arson","link":"https://www.youtube.com/watch?v=2SFOjJxEL7g"},"bm":{"name":"Beast Mode","id":"Level 2 (Geometry Dash: World)","artist":"Dex Arson","link":"https://www.newgrounds.com/audio/listen/589874"},"m":{"name":"Machina","id":"Level 3 (Geometry Dash: World)","artist":"Dex Arson","link":"https://www.youtube.com/watch?v=EWjZOxs87yg"},"y":{"name":"Years","id":"Level 4 (Geometry Dash: World)","artist":"Dex Arson","link":"https://www.youtube.com/watch?v=0MZvDD_sy-w"},"f":{"name":"Frontlines","id":"Level 5 (Geometry Dash: World)","artist":"Dex Arson","link":"https://www.youtube.com/watch?v=f3wAripOdag"},"sp":{"name":"Space Pirates","id":"Level 6 (Geometry Dash: World)","artist":"Waterflame","link":"https://www.youtube.com/watch?v=Cu7HaeRHMhM"},"s":{"name":"Striker","id":"Level 7 (Geometry Dash: World)","artist":"Waterflame","link":"https://www.youtube.com/watch?v=MU9wRCGt9h8"},"e":{"name":"Embers","id":"Level 8 (Geometry Dash: World)","artist":"Dex Arson","link":"https://www.youtube.com/watch?v=nMDMlIvdqlA"},"round":{"name":"Round 1","id":"Level 9 (Geometry Dash: World)","artist":"Dex Arson","link":"https://www.youtube.com/watch?v=NvQoY4gTIGU"},"mdo":{"name":"Monster Dance Off","id":"Level 10 (Geometry Dash: World)","artist":"F-777","link":"https://www.youtube.com/watch?v=B8YkwDbGBr8"},"ps":{"name":"Press Start","id":"Level 1 (Geometry Dash: SubZero)","artist":"MDK","link":"https://www.youtube.com/watch?v=XoLouT7TqZY"},"ne":{"name":"Nock Em","id":"Level 2 (Geometry Dash: SubZero)","artist":"Bossfight","link":"https://www.youtube.com/watch?v=ePv2X_CCaGg"},"pt":{"name":"Power Trip","id":"Level 3 (Geometry Dash: SubZero)","artist":"Boom Kitty","link":"https://www.youtube.com/watch?v=l6OsF7RlQb4"},"unknown":{"name":"Unknown","id":null,"artist":"DJVI","link":null}}
|
package/misc/rgbToHEX.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports={rgbToHEX:function(
|
|
1
|
+
module.exports={rgbToHEX:function(col){if(!col)col="255,255,255";let r=col.split(",")[0];let g=col.split(",")[1];let b=col.split(",")[2];if(b.includes("#"))b=b.split("#")[0];let rHex=Number(r).toString(16);let gHex=Number(g).toString(16);let bHex=Number(b).toString(16);return`#${rHex.length==1?"0"+rHex:rHex}${gHex.length==1?"0"+gHex:gHex}${bHex.length==1?"0"+bHex:bHex}`.toUpperCase()}};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gj-boomlings-api",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "A light-weight Geometry Dash API wrapper",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -27,11 +27,7 @@
|
|
|
27
27
|
"robtop",
|
|
28
28
|
"geometry dash"
|
|
29
29
|
],
|
|
30
|
-
"engines": {
|
|
31
|
-
"npm": ">=8.19.2 <10.0.0",
|
|
32
|
-
"node": ">=18.0.0 <20.0.0"
|
|
33
|
-
},
|
|
34
30
|
"dependencies": {
|
|
35
|
-
"node-fetch": "^
|
|
31
|
+
"node-fetch": "^2.7.0"
|
|
36
32
|
}
|
|
37
33
|
}
|
package/xor.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports=class XOR{xor(r,t){return String.fromCodePoint(...r.split("").map((r,e)=>r.charCodeAt(0)^t.toString().charCodeAt(e%t.toString().length)))}encrypt(r,e=37526){return Buffer.from(this.xor(r,e)).toString("base64").replace(/\//g,"_").replace(/\+/g,"-")}decrypt(r,e=37526){return this.xor(Buffer.from(r.replace(/\//g,"_").replace(/\+/g,"-"),"base64").toString(),e)}};
|
package/.nvmrc
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
engine-strict=true
|
package/config.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"headers":{"Content-Type":"application/x-www-form-urlencoded","user-agent":"","Accept-Encoding":"*","Accept":"*/*"},"server":"http://www.boomlings.com/database/","secret":"Wmfd2893gb7"}
|
package/functions/searchUsers.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
/**
|
|
3
|
-
* Searches for users.
|
|
4
|
-
* @param {*} str - The search query.
|
|
5
|
-
*/
|
|
6
|
-
searchUsers:
|
|
7
|
-
async function(str) {
|
|
8
|
-
if(!str) throw new Error("Please provide a query!");
|
|
9
|
-
const {gjReq} = require("../misc/gjReq.js");
|
|
10
|
-
const {gjWReq} = require("../misc/gjWReq.js");
|
|
11
|
-
let GJDecode = require("../misc/GJDecode.js");
|
|
12
|
-
const { decodeUserResult } = new GJDecode();
|
|
13
|
-
|
|
14
|
-
let res = await gjReq("getGJUsers20", {
|
|
15
|
-
str: str,
|
|
16
|
-
secret: "Wmfd2893gb7"
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
if(res.data == -1) throw new Error(`Couldn't find a "${str}" user.`);
|
|
20
|
-
if(res.data == "error code: 1005") {
|
|
21
|
-
res = await gjWReq("searchUsers", str);
|
|
22
|
-
if(res.status == 403) throw new Error(res.data.error);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
return decodeUserResult(res.data);
|
|
26
|
-
}
|
|
27
|
-
}
|
package/misc/decB64.js
DELETED
package/misc/demonlist.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports={demonlist:async function(name){let r=await fetch(`https://pointercrate.com/api/v2/demons/?name=${name}`);let lvlObj=await r.json();if(!lvlObj.length)return null;return{position:lvlObj[0].position,publisher:lvlObj[0].publisher.name,verifier:lvlObj[0].verifier.name}}};
|
package/misc/encB64.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports={encB64:function(string){return btoa(unescape(encodeURIComponent(string))).replace(/\//g,"_").replace(/\+/g,"-")}};
|
package/misc/gjReq.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports={gjReq:async function(endpoint,data){const{server}=require("../config.json");let headers={"Content-Type":"application/x-www-form-urlencoded","User-Agent":" ","Accept-Encoding":"*",Accept:"*/*"};let r=await fetch(`${server}${endpoint.endsWith(".php")?endpoint.split(".php")[0]:endpoint}.php`,{method:"POST",headers:headers,body:new URLSearchParams(data)});let res=await r.text();return{data:res,status:r.status}}};
|
package/misc/gjWReq.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports={gjWReq:async function(endpoint,data=""){let r=await fetch(`https://gbaweb.vercel.app/${endpoint}/${data}`);let res=await r.text();if(res.includes("{")||res.includes("["))res=JSON.parse(res);return{data:res,status:r.status}}};
|
package/misc/gjp.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports={gjp:function(password){const XOR=require("./xor.js");const xor=new XOR;return xor.encrypt(password,37526).toString()}};
|
package/misc/xor.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
module.exports = class XOR {
|
|
2
|
-
xor(str, key) { return String.fromCodePoint(...str.split('').map((char, i) => char.charCodeAt(0) ^ key.toString().charCodeAt(i % key.toString().length))) }
|
|
3
|
-
encrypt(str, key = 37526) { return Buffer.from(this.xor(str, key)).toString('base64').replace(/\//g, '_').replace(/\+/g, '-'); }
|
|
4
|
-
decrypt(str, key = 37526) { return this.xor(Buffer.from(str.replace(/\//g, '_').replace(/\+/g, '-'), 'base64').toString(), key) }
|
|
5
|
-
}
|