realms support

This commit is contained in:
Tnze
2019-08-09 23:50:53 +08:00
parent b0e6a70e0a
commit ad5dfeffd7
7 changed files with 316 additions and 1 deletions

13
realms/invite.go Normal file
View File

@ -0,0 +1,13 @@
package realms
import "fmt"
// Invite invite player to Realm
func (r *Realms) Invite(s Server, name, uuid string) error {
pl := struct {
Name string `json:"name"`
UUID string `json:"uuid"`
}{Name: name, UUID: uuid}
return r.post(fmt.Sprintf("/invites/%d", s.ID), pl, struct{}{})
}