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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
use serde::{Deserialize, Serialize};
pub mod bans {
use super::{Deserialize, Serialize};
#[derive(Debug, Deserialize, Serialize, Default)]
#[allow(non_snake_case)]
pub struct User {
pub SteamId: String,
pub CommunityBanned: bool,
pub VACBanned: bool,
pub NumberOfVACBans: i32,
pub DaysSinceLastBan: i32,
pub NumberOfGameBans: i32,
pub EconomyBan: String,
}
#[derive(Debug, Deserialize, Default)]
pub struct Response {
pub players: Vec<User>,
}
}
pub mod level {
use super::{Deserialize, Serialize};
#[derive(Debug, Serialize, Deserialize, Default)]
#[allow(non_snake_case)]
pub struct User {
pub player_level: Option<i32>,
}
#[derive(Debug, Serialize, Deserialize, Default)]
#[allow(non_snake_case)]
pub struct Response {
pub response: User,
}
}
pub mod friends {
use super::{Deserialize, Serialize};
#[derive(Debug, Deserialize, Serialize, Default)]
#[allow(non_snake_case)]
pub struct User {
pub steamid: String,
pub relationship: String,
pub friend_since: i32,
}
#[derive(Debug, Deserialize, Default)]
#[allow(non_snake_case)]
pub struct Users {
pub friends: Vec<User>,
}
#[derive(Debug, Deserialize, Default)]
pub struct Response {
pub friendslist: Users,
}
}
pub mod summaries {
use super::{Deserialize, Serialize};
#[derive(Debug, Deserialize, Serialize, Default)]
pub struct User {
pub steamid: String,
pub communityvisibilitystate: i32,
pub profilestate: i32,
pub personaname: String,
pub commentpermissions: Option<i32>,
pub profileurl: String,
pub avatar: String,
pub avatarmedium: String,
pub avatarfull: String,
pub avatarhash: String,
pub lastlogoff: Option<i32>,
pub personastate: i32,
pub realname: Option<String>,
pub primaryclanid: Option<String>,
pub timecreated: Option<i32>,
pub gameid: Option<String>,
pub gameserverip: Option<String>,
pub gameextrainfo: Option<String>,
pub loccountrycode: Option<String>,
pub locstatecode: Option<String>,
pub loccityid: Option<i32>,
}
#[derive(Debug, Deserialize, Default)]
pub struct Users {
pub players: Vec<User>,
}
#[derive(Debug, Deserialize, Default)]
pub struct Response {
pub response: Users,
}
}
pub mod profile {
use super::Serialize;
#[derive(Default, Debug, Serialize)]
#[allow(non_snake_case)]
pub struct User {
pub steamid: String,
pub communityvisibilitystate: i32,
pub profilestate: i32,
pub personaname: String,
pub commentpermissions: i32,
pub profileurl: String,
pub avatar: String,
pub avatarmedium: String,
pub avatarfull: String,
pub avatarhash: String,
pub lastlogoff: i32,
pub personastate: i32,
pub realname: String,
pub primaryclanid: String,
pub timecreated: i32,
pub gameid: String,
pub gameserverip: String,
pub gameextrainfo: String,
pub loccountrycode: String,
pub locstatecode: String,
pub loccityid: i32,
pub CommunityBanned: bool,
pub VACBanned: bool,
pub NumberOfVACBans: i32,
pub DaysSinceLastBan: i32,
pub NumberOfGameBans: i32,
pub EconomyBan: String,
pub player_level: i32,
}
#[derive(Debug, Serialize, Default)]
pub struct Users {
pub api_call_count: i32,
pub user: Vec<User>,
}
}
pub mod api {
#[derive(Default)]
pub struct Api<'a> {
pub interface: &'a str,
pub version: &'a str,
pub accepts_multiple_ids: bool,
}
}