-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathtest.js
More file actions
61 lines (42 loc) · 1.24 KB
/
test.js
File metadata and controls
61 lines (42 loc) · 1.24 KB
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
const Freemius = require("./Freemius");
const FS__API_SCOPE = 'developer'
const FS__API_DEV_ID = 007;
const FS__API_PUBLIC_KEY = 'pk_ed92a20a378ddd3c7e6bdb1be1234';
const FS__API_SECRET_KEY = 'sk_hv[xgNzLilJQHXgeTy2Qi<siz1324';
const fb = new Freemius(FS__API_SCOPE, FS__API_DEV_ID, FS__API_PUBLIC_KEY, FS__API_SECRET_KEY);
fb.Api('/plugins.json', 'GET', [], [], function (e) {
console.log(JSON.parse(e));
});
/*
fb.FindClockDiff(function (e) {
let timediff = Date.now() - strtotime(JSON.parse(e).timestamp);
console.log(timediff);
});
fb.Test(function (e) {
console.log(e);
if (JSON.parse(e).api === 'pong')
console.log("Ping Success");
else
console.log("Ping Failure");
})
fb.Api('/plugins.json', 'GET', [], [], function (e) {
console.log(e);
});
fb.Api('/plugins.json', 'GET', [], [], function (e) {
console.log(JSON.parse(e));
});
fb.Api('/plugins/5082.json', 'GET', [], [], function (e) {
console.log(e);
});
// Update title.
fb.Api("/plugins/5082.json", 'PUT', { 'title': 'Axxxx My New Title' }, {}, function (e) {
console.log(e);
});
*/
/*fb.Api('plugins/5082/tags.json', 'POST', {
'add_contributor': true
}, {
'file': 'freemius.zip'
}, function (e) {
console.log(e);
});*/