Documentation
¶
Index ¶
- Constants
- type Backup
- type Error
- type Realms
- func (r *Realms) Address(s Server) (string, error)
- func (r *Realms) Available() (ok bool, err error)
- func (r *Realms) Backups(s Server) ([]Backup, error)
- func (r *Realms) Compatible() (string, error)
- func (r *Realms) Download() (link, resURL, resHash string)
- func (r *Realms) Invite(s Server, name, uuid string) error
- func (r *Realms) Ops(s Server) (ops []string, err error)
- func (r *Realms) Server(ID int) (s Server, err error)
- func (r *Realms) SubscriptionLife(s Server) (startDate int64, daysLeft int, Type string, err error)
- func (r *Realms) TOS() error
- func (r *Realms) Worlds() ([]Server, error)
- type Server
Constants ¶
const Domain = "https://pc.realms.minecraft.net"
Domain is the URL of Realms API server Panic if it cannot be parsed by url.Parse().
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backup ¶
type Backup struct { ID int `json:"backupId"` LastModifiedDate int64 `json:"lastModifiedDate"` Size int64 `json:"size"` Metadata struct { Difficulty string `json:"game_difficulty"` Name string `json:"name"` Version string `json:"version"` EnabledPacks struct { RessourcePacks []string `json:"resourcePacks"` BehaviorPacks []string `json:"behaviorPacks"` } Description string `json:"description"` Mode string `json:"game_mode"` Type string `json:"world_type"` } `json:"metadata"` }
type Realms ¶
type Realms struct {
// contains filtered or unexported fields
}
func NewRealms ¶
NewRealms create a new Realms with version, username, accessToken and UUID without dashes.
func (*Realms) Address ¶
Address used to get the IP address for a server. Call TOS before you call this function.
func (*Realms) Available ¶
Available returns whether the user can access the Minecraft Realms service
func (*Realms) Compatible ¶
Compatible returns whether the clients version is up-to-date with Realms.
if the client is outdated, it returns OUTDATED, if the client is running a snapshot, it returns OTHER, else it returns COMPATIBLE.
func (*Realms) Ops ¶
Ops returns a list of operators for this server. You must own this server to view this.
func (*Realms) Server ¶
Server returns a single server listing about a server. you must be the owner of the server.
func (*Realms) SubscriptionLife ¶
SubscriptionLife returns the current life of a server subscription.
type Server ¶
type Server struct { ID int `json:"id"` RemoteSubscriptionID string `json:"remoteSubscriptionId"` Owner string `json:"owner"` OwnerUUID string `json:"ownerUUID"` Name string `json:"name"` MOTD string `json:"motd"` State string `json:"state"` DaysLeft int `json:"daysLeft"` Expired bool `json:"expired"` ExpiredTrial bool `json:"expiredTrial"` WorldType string `json:"worldType"` Players []string `json:"players"` MaxPlayers int `json:"maxPlayers"` MiniGameName *string `json:"minigameName,omitempty"` MiniGameID *int `json:"minigameId,omitempty"` MinigameImage *string `json:"minigameImage,omitempty"` ActiveSlot int `json:"activeSlot"` //Slots interface{} Member bool `json:"member"` }