| Crates.io | license-api |
| lib.rs | license-api |
| version | 0.2.11 |
| created_at | 2025-06-09 23:12:29.98998+00 |
| updated_at | 2025-08-04 17:54:13.333938+00 |
| description | License API client library |
| homepage | |
| repository | https://github.com/awalki/license-api-rs |
| max_upload_size | |
| id | 1706479 |
| size | 59,111 |
License API client library made with Rust
cargo add license-api
use inquire::{Password, Text};
use license_api::auth::LoginRequest;
use license_api::hwid::get_hwid;
use license_api::auth::LicenseAPI;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut api = LicenseAPI::new("http://localhost:8080");
let hwid = get_hwid(true, "anything");
let key = String::from("your-license-key");
let creds = LoginRequest {
key,
hwid,
};
if let Ok(true) = api.login(&creds).await {
println!("✔ Successfully logged in and HWID linked!");
} else {
println!("❌ Failed to login");
}
Ok(())
}