forked from SSARCandy/MSAuto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
msaapi.js
66 lines (63 loc) · 1.56 KB
/
msaapi.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
'use strict';
const myHeader = require('./fixtures/header.json');
const BASE_URL = 'https://msaapi.snkplaymore.info/';
exports.api = {
search: {
top: 'search/top/',
get: 'search/get/',
start: 'search/start/'
},
training: {
top: 'training/top/',
start: 'training/battle_start/',
win: 'training/battle_win/'
},
sneak: {
reset: 'sneak/reset/',
top: 'sneak/top/',
start: 'sneak/battle_start/',
win: 'sneak/battle_win/',
decide: 'sneak/battle_decide/',
shop: {
update: 'sneak_shop/update/',
buy: 'sneak_shop/buy'
}
},
one_on_one: {
top: 'off_1on1/top',
get_enemy: 'off_1on1/get_enemy',
reset_top: 'off_1on1/reset_top',
battle_start: 'off_1on1/battle_start',
battle_win: 'off_1on1/battle_win',
shop: {
update: 'off_1on1_btl_shop/update',
buy: 'off_1on1_btl_shop/buy'
}
},
team_battle: {
shop: {
update: 'off_team_btl_shop/update',
buy: 'off_team_btl_shop/buy'
}
},
guild: {
shop: {
update: 'guild_shop/update',
buy: 'guild_shop/buy'
}
},
event: {
pile: {
battle_start: 'event/pile/battle_start',
battle_win: 'event/pile/battle_win'
}
}
}
exports.getRequestOptions = (url, data) => {
return {
method: 'POST',
url: `${BASE_URL}${url}`,
headers: myHeader,
form: data
};
}