vlr_scraper/model/
match_item.rs

1use chrono::NaiveDateTime;
2use serde::Serialize;
3
4/// A list of match items (used by both player and team match histories).
5pub type MatchItemList = Vec<MatchItem>;
6
7/// A single match entry in a match history.
8#[derive(Debug, Clone, Serialize)]
9pub struct MatchItem {
10    pub id: u32,
11    pub slug: String,
12    pub league_icon: String,
13    pub league_name: String,
14    pub league_series_name: String,
15    pub teams: Vec<MatchItemTeam>,
16    pub vods: Vec<String>,
17    pub match_start: Option<NaiveDateTime>,
18}
19
20/// Team information as shown in a match history item.
21#[derive(Debug, Clone, Serialize)]
22pub struct MatchItemTeam {
23    pub name: String,
24    pub tag: String,
25    pub logo_url: String,
26    pub score: Option<u8>,
27}