一个用Hyper,Rust和Tokio实现的第三方OpenFrp OPENAPI。
cargo add --git "https://github.com/W9pi3cZ1/openfrp_api_rs.git" openfrp-api
use openfrp_sdk::{login::*, prelude::*};
pub const EMAIL: &'static str = "xslimenb@xslimenb.eu.org";
pub const PASSWORD: &'static str = "123Tester_";
#[tokio::main]
async fn main() -> Result<()>{
let mut client = Client::new();
let account = Account::new(EMAIL, PASSWORD);
login(&account, &mut client).await?;
println!("auth: {:#?}",client.auth.get()?);
Ok(())
}