-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.js
95 lines (89 loc) · 22.3 KB
/
api.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
// THE SNAIL IDE API EXTENSION
// MADE BY DUMO178 (gh: thepython555)
(function (Scratch) {
"use strict";
if (!Scratch.extensions.unsandboxed) {
throw new Error("This Extension must run unsandboxed");
}
const icon =
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARwAAAEXCAYAAAB/M/sjAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAOi5JREFUeJztXQd0FUUXngRCCL2XBAid0DvSi3SQ3ntHQHqT3jtI771DCFW6tNCboKKAqCg2fkXFAqJiuf/efYkm4ZWZ3Z2Zfe/Nd853zv8fye7snbnfm3LvHUL8Czk1ttU4RuMMjT9qhDh8qHGKxpEaW2rMRvHMUI19NG7UeE7jzQTPfKpxq8aVMc+tatG3KCgo2BQoMmdJfCGg5SniEJ+EyEccImPkmZ8Rh/goKCj4EHJqPEyMiUJCHiD/zXhwRvO3Bc98n6gZj4KCT6Ccxq+INWITywcaS1n8TKSzGZSCgoKXoAuxXhTiig6P527jYQgFBQW+KK3xc8JPcHgykoM9FBQUOCE78V6xieU+y62ioKDABW8S+YJhBbdYbRgFBQVr0YrIFworOcVa8ygoKFiJ00S+SFjN/pZaSEFBwRIMJIzOHBAQCJnT5ILyBRpDjaLtoVSeOpAuZVYIIAGmRCJlSFooEl4VahTrABULNoew9PkhcaIkZp5ZkJfRFBQUjOEuYXDiRIFB0KjcazC76xlY3Pvtfzmt4zFoUKYPBAclMyQOKDQjm2+L98x53c9D55enQmi6fEYFZytPwykoKLABA/yoHRjFpG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RXlszy+//CKkLUpwlOAgjArOLoY/gq+//lrIx+zfv1+6oHhiy5YthdgCgQLsqRrgn3/+KaQtSnCU4CCMCE5ehj+AOnXqCPsYrCDI0LbfNUZbSKr3YlCeqFkFYujQoW7bIwpKcJTgIIwIzlCGPxCWq4PlGRiv7phi4SCrz2ITUQmTiHv37rlsBy4/RUEJjhIchBHBoV5OpUqVStgmKV4VzPAhyAYWD7RHtO+uW7euEJvEAlMrnLUDl1uioARHCQ7CiOBQX+E7cOBAYR9Sv359lg/5jsNAm0z7frwe9ocffhBmm7Vr1zpth8hgRCU4SnAQRgTnQ9o/wBqnIvD48WPWO55HcBhoFRneD6tXrxZiGwSWx3BWDTBv3rzC2qAERwkOgusMx8asYmJAucPHNvg2b+cTZqvbC9h+2Tb0Fa5BgzIdiduQnxJ+YNpQV3TK95itbi9g+2Xb0Fc4Gg3q7U7FYzkVizI2+D5vp8e7iGwObL9sG/oKa6BBmeJwbEjeuC35+7ydDdlNbitg+2Xb0Bf4RVyjeuuyKprwR39J3+YL9PblVCzUsso8R8c1aHEbNMgIaxMxuCrwm3yJrY0Y24bA75BtS2/mHWdG9ba9nFnOPoITcC/nd07f4av09r2bhFB7OcZZw5VRZ9mgcTRc7+oDOAIjmZXo0HGfQRvbHfhdsm3rbWzjyah2n+mInNkkBM501PLKPX1tZpMQaqZDR1xGuZzZJATu6dhtIzmaiNuz8QTcSFanV/GJG6u+smfjCfidaiPZOfE0Kt4GMQvwyBxnPCg+GJFMnQZhko9jGh5NHDOaikY/gDNwxoPigzV0VxNxnfpU4zcaL8W8G3910QFERsU+iXknvtvbj76NAr9bhu3tRExXwAhiFBmPM5r/A0YTkYEf4NMeAAAAAElFTkSuQmCC";
class snailapi {
getInfo() {
return {
id: "snailapi",
name: "Snail IDE",
menuIconURI: icon,
color1: "#855cd6",
color2: "#7450ba",
blocks: [
{
opcode: "usergrab",
blockType: Scratch.BlockType.REPORTER,
text: "grab follower count of user [WHO]",
arguments: {
WHO: {
type: Scratch.ArgumentType.STRING,
defaultValue: "Mr_rudy",
},
},
},
{
opcode: "idtoname",
blockType: Scratch.BlockType.REPORTER,
text: Scratch.translate("name of project id [WHO]"),
arguments: {
WHO: {
type: Scratch.ArgumentType.STRING,
defaultValue: "6793751705525", //we do a bit of selfpromo
},
},
},
{
opcode: "idtoowner",
blockType: Scratch.BlockType.REPORTER,
text: Scratch.translate("creator of project id [WHO]"),
arguments: {
WHO: {
type: Scratch.ArgumentType.STRING,
defaultValue: "6793751705525", //
},
},
},
],
};
}
async usergrab(args) {
try {
const response = await Scratch.fetch(
"https://snailshare-backend.glitch.me/api/users/getFollowerCount?username=" + encodeURIComponent(args.WHO)
);
return response.text(); //pretty straightforward isnt it
} catch (error) {
return "";
}
}
async idtoname(args) {
try {
const response = await Scratch.fetch(
"https://snailshare-backend.glitch.me/api/pmWrapper/getProject?id=" + args.WHO
);
const jsonData = await response.json();
return jsonData.name;
} catch (error) {
return "";
}
}
async idtoowner(args) {
try {
const response = await Scratch.fetch(
"https://snailshare-backend.glitch.me/api/pmWrapper/getProject?id=" + args.WHO
);
const jsonData = await response.json();
return jsonData.author.username;
} catch (error) {
return "";
}
}
}
Scratch.extensions.register(new snailapi());
})(Scratch);