feat: support dxratingnet format
This commit is contained in:
@@ -43,6 +43,13 @@ pub enum Commands {
|
||||
Rating {
|
||||
#[arg(short, long)]
|
||||
user_id: u32,
|
||||
|
||||
/// JSON format.
|
||||
///
|
||||
/// - `origin`: official json response
|
||||
/// - `dx_rating_net`: DxRatingNet Format
|
||||
#[arg(short, long, default_value_t = RatingFormat::default())]
|
||||
format: RatingFormat,
|
||||
},
|
||||
|
||||
// below requires login
|
||||
@@ -71,3 +78,14 @@ pub enum Commands {
|
||||
timestamp: u64,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Default, EnumString)]
|
||||
#[strum(serialize_all = "snake_case")]
|
||||
pub enum RatingFormat {
|
||||
#[default]
|
||||
/// Official API response
|
||||
Origin,
|
||||
|
||||
/// dxrating.net format
|
||||
DxRatingNet,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user