Documentation
¶
Index ¶
- Constants
- func ExistsKey(cacheKey string) int64
- func FetchNames(uuid string) []model.NameHistoryEntry
- func FetchProfile(uuid string) model.Profile
- func GetEnv(key, defaultValue string) string
- func GetValue(cacheKey string) string
- func InitServer()
- func SaveValue(cacheKey string, value string) bool
- type CacheResponse
- type MojangResponse
- func BlockedServers() MojangResponse
- func FetchProfileByName(userName string) (model.Profile, MojangResponse)
- func HasJoined(userName string, serverId string) MojangResponse
- func HasPaid(userName string) (string, MojangResponse)
- func UsernameToUUID(userName string) MojangResponse
- func UsernamesToUUIDs(jsonData []byte) MojangResponse
- func UuidToName(uuid string, action string) MojangResponse
- func UuidToNameHistory(uuid string) MojangResponse
- func UuidToProfile(uuid string, unsigned string) MojangResponse
Constants ¶
View Source
const API_URL = "https://api.mojang.com/"
View Source
const SESSION_URL = "https://sessionserver.mojang.com/"
View Source
const VERSION = "1.0.4"
Variables ¶
This section is empty.
Functions ¶
func FetchNames ¶ added in v1.0.2
func FetchNames(uuid string) []model.NameHistoryEntry
func FetchProfile ¶ added in v1.0.2
func InitServer ¶
func InitServer()
Types ¶
type CacheResponse ¶
type CacheResponse struct { HasCache bool `json:"hascache"` Response MojangResponse `json:"response"` }
func HasCache ¶
func HasCache(cacheKey string) CacheResponse
func SaveCache ¶
func SaveCache(cacheKey string, response MojangResponse) CacheResponse
type MojangResponse ¶
func BlockedServers ¶
func BlockedServers() MojangResponse
func FetchProfileByName ¶ added in v1.0.2
func FetchProfileByName(userName string) (model.Profile, MojangResponse)
func HasJoined ¶ added in v1.0.3
func HasJoined(userName string, serverId string) MojangResponse
func HasPaid ¶ added in v1.0.3
func HasPaid(userName string) (string, MojangResponse)
func UsernameToUUID ¶
func UsernameToUUID(userName string) MojangResponse
func UsernamesToUUIDs ¶
func UsernamesToUUIDs(jsonData []byte) MojangResponse
func UuidToName ¶
func UuidToName(uuid string, action string) MojangResponse
func UuidToNameHistory ¶
func UuidToNameHistory(uuid string) MojangResponse
This endpoint has been deprecated by Mojang and was removed on 13 September 2022 at 9:25 AM CET to "improve player safety and data privacy"
func UuidToProfile ¶
func UuidToProfile(uuid string, unsigned string) MojangResponse
Click to show internal directories.
Click to hide internal directories.