bw_web_api_rs/models/
matchmaker_player_info.rs1use super::common::{Avatar, ReplayAttributes, WinStats};
2use serde::{Deserialize, Serialize};
3use std::collections::HashMap;
4
5#[derive(Debug, Serialize, Deserialize)]
6pub struct MatchmakerPlayerStats {
7 pub game_mode_id: u32,
8 pub losses: u32,
9 pub min_games: u32,
10 pub season_id: u32,
11 pub total_games: u32,
12 pub wins: u32,
13}
14
15#[derive(Debug, Serialize, Deserialize)]
16pub struct MatchmakerPlayerScore {
17 pub base: i32,
18 pub bucket_new: i32,
19 pub bucket_old: i32,
20 pub current_stat_bucket: i32,
21 pub current_stat_losses: i32,
22 pub current_stat_wins: i32,
23 pub delta: i32,
24 pub season_id: i32,
25 pub win_streak: i32,
26}
27
28#[derive(Debug, Serialize, Deserialize)]
29pub struct MatchmakerReplay {
30 pub attributes: ReplayAttributes,
31 pub create_time: u64,
32 pub link: String,
33 pub md5: String,
34 pub url: String,
35}
36
37#[derive(Debug, Serialize, Deserialize)]
38pub struct MatchmakerPlayerInfoPlayer {
39 pub aurora_id: u64,
40 pub benefactor_id: String,
41 pub game_info: super::matchmaker_game_info::GameInfo,
42 pub game_result: super::matchmaker_game_info::MatchmakerGameResult,
43 pub gateway_id: crate::types::Gateway,
44 pub info_attributes: super::matchmaker_game_info::PlayerInfoAttributes,
45 pub matching_attributes: HashMap<String, String>,
46 pub name: String,
47 pub score: MatchmakerPlayerScore,
48}
49
50#[derive(Debug, Serialize, Deserialize)]
51pub struct MatchmakerPlayerInfo {
52 pub avatars: HashMap<String, String>,
53 pub avatars_awards: HashMap<String, f64>,
54 pub avatars_locked: HashMap<String, Avatar>,
55 pub avatars_stats: HashMap<String, WinStats>,
56 pub maps: Vec<String>,
57 pub matchmaked_season_buckets: HashMap<String, Vec<i32>>,
58 pub player_stats: Vec<MatchmakerPlayerStats>,
59 pub players: HashMap<String, MatchmakerPlayerInfoPlayer>,
60 pub replays: Vec<MatchmakerReplay>,
61}