/openfrp_api_rs

OpenFrp OPENAPI的第三方Rust实现。

Primary LanguageRustApache License 2.0Apache-2.0

OpenFrp API Rust

一个用Hyper,RustTokio实现的第三方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(())
}