Profile-service Module
This is a sub-module belong to minecraft-launcher-core module. You can still use this individually.
Usage
Game Profile
Or lookup profile by name:
const username: string;
const gameProfilePromise: Promise<GameProfile> = ProfileService.lookup(username);
Fetch the user game profile by uuid. (This could also be used for get skin)
import { ProfileService, GameProfile } from "@xmcl/profile-service"
const userUUID: string;
const gameProfilePromise: GameProfile = await ProfileService.fetch(userUUID);
Get player texture:
const gameProfilePromise: GameProfile;
const texturesPromise: Promise<GameProfile.Textures> = ProfileService.fetchProfileTexture(gameProfilePromise);