Documentation ¶
Index ¶
- Constants
- Variables
- type Client
- func (client *Client) FetchMultipleUUIDs(usernames []string) (map[string]string, error)
- func (client *Client) FetchNameHistory(uuid string) ([]NameHistoryEntry, error)
- func (client *Client) FetchProfile(uuid string, unsigned bool) (*Profile, error)
- func (client *Client) FetchStatus() (*Status, error)
- func (client *Client) FetchUUID(username string) (string, error)
- func (client *Client) FetchUUIDAtTime(username string, timestamp int64) (string, error)
- type NameHistoryEntry
- type Profile
- type ProfileProperty
- type Status
Constants ¶
View Source
const ( StatusGreen = "green" StatusYellow = "yellow" StatusRed = "red" )
These constants represent the possible states of the Mojang services
Variables ¶
View Source
var ErrNoContent = errors.New("no Mojang API result")
View Source
var ErrTooManyRequests = errors.New("too many Mojang API requests")
Define possible known errors
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents an API client
func (*Client) FetchMultipleUUIDs ¶
FetchMultipleUUIDs fetches the UUIDs of the given usernames
func (*Client) FetchNameHistory ¶
func (client *Client) FetchNameHistory(uuid string) ([]NameHistoryEntry, error)
FetchNameHistory fetches all names of the given UUID and their corresponding changing timestamps
func (*Client) FetchProfile ¶
FetchProfile fetches the profile of the given UUID
func (*Client) FetchStatus ¶
FetchStatus fetches the states of all Mojang services and wraps them into a single object
type NameHistoryEntry ¶
NameHistoryEntry represents an entry of the name history of an account
type Profile ¶
type Profile struct { UUID string `json:"id"` Name string `json:"name"` Properties []ProfileProperty `json:"properties"` }
Profile represents a whole player profile
type ProfileProperty ¶
type ProfileProperty struct { Name string `json:"name"` Value string `json:"value"` Signature string `json:"signature"` }
ProfileProperty represents a property of a player profile
Click to show internal directories.
Click to hide internal directories.