sponsorblock-mirror/src/structs.rs

27 lines
631 B
Rust
Raw Normal View History

2022-10-22 17:58:40 +05:30
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize)]
pub struct Sponsor {
pub hash: String,
2022-10-23 23:33:39 +05:30
#[serde(rename = "videoID")]
2022-10-22 17:58:40 +05:30
pub video_id: String,
pub segments: Vec<Segment>,
}
#[derive(Serialize, Deserialize)]
pub struct Segment {
2022-10-23 23:33:39 +05:30
#[serde(rename = "UUID")]
2022-10-22 17:58:40 +05:30
pub uuid: String,
2022-10-23 23:33:39 +05:30
#[serde(rename = "actionType")]
2022-10-22 17:58:40 +05:30
pub action_type: String,
pub category: String,
pub description: String,
pub locked: i32,
pub segment: Vec<f32>,
2022-10-23 23:33:39 +05:30
#[serde(rename = "userID")]
2022-10-22 17:58:40 +05:30
pub user_id: String,
2022-10-23 23:33:39 +05:30
#[serde(rename = "videoDuration")]
2022-10-22 17:58:40 +05:30
pub video_duration: f32,
pub votes: i32,
}