gj-boomlings-api 1.5.6 → 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.
Files changed (56) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +31 -7
  3. package/functions/blockUser.js +29 -30
  4. package/functions/deleteAccountPost.js +22 -32
  5. package/functions/deleteComment.js +20 -20
  6. package/functions/deleteLevel.js +23 -29
  7. package/functions/dlLevel.js +1 -8
  8. package/functions/dlMessage.js +30 -36
  9. package/functions/getAccountPosts.js +23 -36
  10. package/functions/getBlockedList.js +47 -63
  11. package/functions/getCommentHistory.js +59 -39
  12. package/functions/getComments.js +46 -27
  13. package/functions/getCreatorScores.js +18 -30
  14. package/functions/getDailyLevel.js +5 -9
  15. package/functions/getFriendsList.js +48 -56
  16. package/functions/getGauntlets.js +18 -24
  17. package/functions/getLevelByID.js +13 -10
  18. package/functions/getLevelScores.js +63 -46
  19. package/functions/getMapPacks.js +40 -28
  20. package/functions/getMessages.js +36 -41
  21. package/functions/getOfficialSongInfo.js +9 -87
  22. package/functions/getProfile.js +1 -7
  23. package/functions/getSongInfo.js +22 -31
  24. package/functions/getSongsLibrary.js +1 -0
  25. package/functions/getTab.js +16 -7
  26. package/functions/getTop100.js +18 -27
  27. package/functions/getTopLists.js +14 -0
  28. package/functions/getUserLevels.js +24 -88
  29. package/functions/getWeeklyDemon.js +5 -9
  30. package/functions/reportLevel.js +9 -22
  31. package/functions/searchLevels.js +15 -84
  32. package/functions/searchLists.js +15 -0
  33. package/functions/unblockUser.js +29 -30
  34. package/functions/updateLevelDesc.js +27 -43
  35. package/functions/uploadAccountPost.js +23 -36
  36. package/functions/uploadComment.js +43 -57
  37. package/functions/uploadMessage.js +32 -41
  38. package/gjReq.js +1 -0
  39. package/index.js +2 -1
  40. package/misc/GJDecode.js +1 -1
  41. package/misc/colors.json +1 -1
  42. package/misc/gauntlets.json +1 -0
  43. package/misc/officialsongs.json +1 -1
  44. package/misc/rgbToHEX.js +1 -1
  45. package/package.json +2 -6
  46. package/xor.js +1 -0
  47. package/.nvmrc +0 -1
  48. package/config.json +0 -1
  49. package/functions/searchUsers.js +0 -27
  50. package/misc/decB64.js +0 -4
  51. package/misc/demonlist.js +0 -1
  52. package/misc/encB64.js +0 -1
  53. package/misc/gjReq.js +0 -1
  54. package/misc/gjWReq.js +0 -1
  55. package/misc/gjp.js +0 -1
  56. package/misc/xor.js +0 -5
@@ -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"},"unknown":{"name":"Unknown","id":"This song is not defined by RobTop. In game it returns \"Back on Track\".","artist":"DJVI","link":null}}
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(color){if(!color)color="255,255,255";let r=color.split(",")[0];let g=color.split(",")[1];let b=color.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()}};
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": "1.5.6",
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": "^3.3.0"
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"}
@@ -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
@@ -1,4 +0,0 @@
1
- module.exports = {
2
- decB64:
3
- function (string) { return decodeURIComponent(escape(atob(string.replaceAll("_", '/').replaceAll("-", '+')))); }
4
- }
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
- }