minecraft-uuid

Crates.iominecraft-uuid
lib.rsminecraft-uuid
version1.0.0
sourcesrc
created_at2022-11-30 08:14:31.090313
updated_at2022-11-30 08:14:31.090313
descriptionA simple API wrapper to convert Minecraft usernames to UUIDs (and vice versa).
homepage
repositoryhttps://github.com/zekroTJA/plotty
max_upload_size
id726040
size7,418
Ringo Hoffmann (zekroTJA)

documentation

https://docs.rs/minecraft-uuid

README

minecraft-uuid

A simple API wrapper to convert Minecraft usernames to UUIDs and vice versa.

[dependencies]
minecraft-uuid = "1"

Example

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");
}
Commit count: 29

cargo fmt