v0.2.0
Major Changes
The Library is now based on Client Class to interact with the Mowojang API.
Creating a new Client would be done the following way:
import { Client as MowojangClient } from "mowojang"
const Mowojang = new MowojangClient()
const UUID = await Mowojang.getUUID("Pixelic")
const username = await Mowojang.getUsername("14727fae-fbdc-4aff-848c-d2713eb9939e")
Other Exports such as the Utilities and Validator Functions now need to be imported the following way:
import { utils, validate } from "mowojang"
const isValid = validate.UUID("14727fae-fbdc-4aff-848c-d2713eb9939e")
const undashed = utils.undashUUID("14727fae-fbdc-4aff-848c-d2713eb9939e")
There were also major changes to the now exported classes and their naming schemes.
The following methods to interact with the Mowojang API are implemented:
getProfiles()
: Retrieve full Player Data of multiple Players by UUID or UsernamegetProfile()
: Retrieve full Player Data by UUID or UsernamegetSessions()
: Retrieve Player Session Data of multiple Players by UUID or UsernamegetSession()
: Retrieve Player Session Data by UUID or UsernamegetUUID()
: Converts Username to UUIDgetUsername()
: Converts UUID to UsernamegetSkin()
: Returns the Skin the specified Player is currently wearinggetSkinBuffer()
: Skin-Data fetched via getSkin() as a BuffergetCape()
: Returns the Cape the specified Player is currently wearinggetCapeBuffer()
: Cape-Data fetched via getCape() as a Buffer
Furthermore the Library this way supports full control over your caching behaviour through exposing the internally used axios-cache-interceptor
library config. More details about this can be found here.