feat: authlite command
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
use palc::Parser;
|
||||
use palc::Subcommand;
|
||||
use strum::EnumString;
|
||||
|
||||
#[derive(Parser)]
|
||||
#[command(about = "SDGB api tool", long_about = env!("CARGO_PKG_DESCRIPTION"))]
|
||||
@@ -8,8 +9,28 @@ pub struct Cli {
|
||||
pub command: Commands,
|
||||
}
|
||||
|
||||
#[derive(EnumString)]
|
||||
pub enum AuthLiteVariant {
|
||||
SDGB,
|
||||
SDHJ,
|
||||
}
|
||||
|
||||
#[derive(Subcommand)]
|
||||
pub enum Commands {
|
||||
/// Login with QRCode from wechat
|
||||
QRLogin {
|
||||
/// content of the qrcode, only the last 64 characters were used
|
||||
#[arg(short, long)]
|
||||
qrcode_content: String,
|
||||
},
|
||||
|
||||
AuthLite {
|
||||
#[arg(short, long, default_value = "1.50")]
|
||||
title_ver: String,
|
||||
#[arg(long, default_value = "SDGB")]
|
||||
variant: AuthLiteVariant,
|
||||
},
|
||||
|
||||
Ping,
|
||||
Preview {
|
||||
#[arg(short, long)]
|
||||
@@ -19,10 +40,4 @@ pub enum Commands {
|
||||
#[arg(short, long)]
|
||||
user_id: u32,
|
||||
},
|
||||
/// Login with QRCode from wechat
|
||||
QRLogin {
|
||||
/// content of the qrcode, only the last 64 characters were used
|
||||
#[arg(short, long)]
|
||||
qrcode_content: String,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user