Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an instance of the realms api with a token.
func NewClient ¶
func NewClient(src oauth2.TokenSource) *Client
NewClient returns a new Client instance with the supplied token source for authentication.
type Player ¶
type Player struct { UUID string `json:"uuid"` Name string `json:"Name"` Operator bool `json:"operator"` Accepted bool `json:"accepted"` Online bool `json:"online"` Permission string `json:"permission"` }
Player is a player in a Realm.
type Realm ¶
type Realm struct { // ID is the unique id for this realm. ID int `json:"id"` // RemoteSubscriptionID is The subscription ID of the realm. RemoteSubscriptionID string `json:"remoteSubscriptionID"` // Owner is always an empty string. Owner string `json:"owner"` // OwnerUUID is the XboxUserID (XUID) of the owner. OwnerUUID string `json:"ownerUUID"` // Name is the name of the Realm. Name string `json:"name"` // MOTD is always an empty string. MOTD string `json:"motd"` // DefaultPermission is the default permission level of the Realm world. // one of ["MEMBER", "OPERATOR"] DefaultPermission string `json:"defaultPermission"` // State is the current state of the realm // one of: ["OPEN", "CLOSED"] State string `json:"state"` // DaysLeft is the days remaining before renewal of the Realm as an integer. // (always 0 for Realms where the current user is not the owner) DaysLeft int `json:"daysLeft"` // Expired is whether the Realm has expired as a trial or not. Expired bool `json:"expired"` // ExpiredTrial is whether the Realm has expired as a trial or not. ExpiredTrial bool `json:"expiredTrial"` // GracePeriod is whether the Realm is in its grace period after expiry or not. GracePeriod bool `json:"gracePeriod"` // WorldType is the world type of the currently loaded world. WorldType string `json:"worldType"` // Players is a list of the players currently online in the realm // NOTE: this is only sent when directly requesting a realm. Players []Player `json:"players"` // MaxPlayers is how many player slots this realm has. MaxPlayers int `json:"maxPlayers"` // MinigameName is always null MinigameName string `json:"minigameName"` // MinigameID is always null MinigameID string `json:"minigameId"` // MinigameImage is always null MinigameImage string `json:"minigameImage"` // ActiveSlot is unused, always 1 ActiveSlot int `json:"activeSlot"` // Slots is unused, always null Slots []struct{} `json:"slots"` // Member is Unknown, always false. (even when member or owner) Member bool `json:"member"` // ClubID is the ID of the associated Xbox Live club as an integer. ClubID int `json:"clubId"` // SubscriptionRefreshStatus is Unknown, always null. SubscriptionRefreshStatus struct{} `json:"subscriptionRefreshStatus"` // contains filtered or unexported fields }
Realm is the realm structure returned from the api.
Click to show internal directories.
Click to hide internal directories.