Crates.io | minecraft-uuid |
lib.rs | minecraft-uuid |
version | 1.0.0 |
source | src |
created_at | 2022-11-30 08:14:31.090313 |
updated_at | 2022-11-30 08:14:31.090313 |
description | A simple API wrapper to convert Minecraft usernames to UUIDs (and vice versa). |
homepage | |
repository | https://github.com/zekroTJA/plotty |
max_upload_size | |
id | 726040 |
size | 7,418 |
A simple API wrapper to convert Minecraft usernames to UUIDs and vice versa.
[dependencies]
minecraft-uuid = "1"
use minecraft_uuid::{get_uuid_by_username, get_username_by_uuid};
#[tokio::main]
async fn main() {
let uuid = get_uuid_by_username("zekrotja")
.await
.expect("getting uuid");
assert_eq!(uuid, "c3371e36f2884eaeb9d5b90e47258444");
let username = get_username_by_uuid("c3371e36f2884eaeb9d5b90e47258444")
.await
.expect("getting username");
assert_eq!(username, "zekroTJA");
}