-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathXMLRPC
160 lines (90 loc) · 6.13 KB
/
XMLRPC
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
================================================================================
getSkills
================================================================================
parameters: login (string), password (string), modShortName (string), accountIds (array of ints).
modShortName values: "BA", "EVO", "KP", "NOTA", "S1944", "TA", "XTA", "ZK"
It returns a map with following keys: status (int), results (array of maps).
"status" values:
0: OK, 1: authentication failed, 2: invalid params
(the "results" key is only present if status=0)
"results" is an array of maps having following keys: accountId (int), status (int), privacyMode (int), skills (array)
"status" values:
0: OK, 1: invalid accountId, 2: unknown skill
(the privacyMode and skills keys are only present if status=0)
"skills" is an array of 5 strings containing skill data in following order:
Duel.mu|Duel.sigma , Ffa.mu|Ffa.sigma , Team.mu|Team.sigma , TeamFfa.mu|TeamFfa.sigma, Global.mu|Global.sigma
Example:
33.15|1.08 , 26.00|8.33 , 38.81|1.78 , 30.16|8.33, 36.13|0.95
================================================================================
getPref
================================================================================
parameters: login (string), password (string), accountId (int), prefName (string)
It returns a map with following keys: status (int), result (string)
"status" values:
0: OK, 1: authentication failed, 2: invalid params
(the "result" key is only present if status=0)
================================================================================
setPref
================================================================================
parameters: login (string), password (string), accountId (int), prefName (string) [, value (string)]
"value" is optional, if not provided the preference is set back to default value in SLDB.
It returns a map with only one key: status (int)
"status" values are the same as for getPref (the preference is only updated if status=0)
================================================================================
getMatchSkills
================================================================================
parameters: login (string), password (string), gameIds (array of strings)
It returns a map with following keys: status (int), results (array of maps).
"status" values:
0: OK, 1: authentication failed, 2: invalid params
(the "results" key is only present if status=0)
"results" is an array of maps having following keys: gameId (string), status (int), gameType (string), players (array of maps)
"status" values:
0: OK, 1: invalid gameId value, 2: unknown or unrated gameId
(the "gameType" and "players" keys are only present if status=0)
"gameType" values: "Duel", "FFA", "Team", "TeamFFA"
"players" is an array of maps having following keys: accountId (int), privacyMode (int), skills (array of strings)
"skills" is an array of 4 strings containing skill data in following order:
muBefore|sigmaBefore , muAfter|sigmaAfter , globalMuBefore|globalSigmaBefore , globalMuAfter|globalSigmaAfter
Example:
18.18|2.54 , 18.93|2.51 , 19.32|2.44 , 20.07|2.42
Only the ratings specific to the gameType of the gameId and the global ratings are provided, as other ratings don't change.
================================================================================
getLeaderboards
================================================================================
parameters: login (string), password (string), modShortName (string), gameTypes (array of strings)
allowed gameType values: "Duel", "FFA", "Team", "TeamFFA", "Global"
It returns a map with following keys: status (int), results (array of maps).
"status" values:
0: OK, 1: authentication failed, 2: invalid params
(the "results" key is only present if status=0)
"results" is an array of maps having following keys: gameType (string), status (int), players (array of maps)
"status" values:
0: OK, 1: invalid gameType
(the "players" key is only present if status=0)
"players" is an array of maps having following keys: accountId (int), name (string), inactivity (int), trustedSkill (string), estimatedSkill (string), uncertainty (string)
"trustedSkill", "estimatedSkill" and "uncertainty" are transmitted as strings to avoid rounding approximations when sent as floats.
"name" is provided in case you want to show the same names as SLDB
The leaderboard size is 20, as when saying !leaderboard to SLDB. But the returned players array can be of smaller size (and even empty for totally unrated mods), in case not enough players have been rated yet.
================================================================================
getPlayerStats
================================================================================
parameters: login (string), password (string), modShortName (string), accountId (int)
It returns a map with following keys: status (int), results (map of arrays).
"status" values:
0: OK, 1: authentication failed, 2: invalid params
(the "results" key is only present if status=0)
"results" is a map indexed by gameType ("Duel", "FFA", "Team", "TeamFFA"), giving the following stats array for each one of these game types: nbOfGamesLost (int), nbOfGamesWon (int), nbOfGamesUndecided (int)
================================================================================
getPlayerSkillGraphs
================================================================================
parameters: login (string), password (string), modShortName (string), accountId (int)
It returns a map with following keys: status (int), results (map of maps).
"status" values:
0: OK, 1: authentication failed, 2: invalid params
(the "results" key is only present if status=0)
"results" is a map indexed by game type ("Duel", "FFA", "Team", "TeamFFA", "Global") of maps having following keys: status (int), graph (base64)
"status" values:
0: OK, 1: unrated account for this game type
(the "graph" key is only present if status=0)
"graph" contains a base64 encoded png image