diff --git a/team.go b/team.go index 89a970b..519406c 100644 --- a/team.go +++ b/team.go @@ -43,6 +43,19 @@ func (t Team) AddUser(user, role string) (TeamAPI, error) { return r, err } +// RemoveUser removes a member from a team +func (t Team) RemoveUser(user string) (TeamAPI, error) { + m := TeamAPI{ + Params: &tParams{}, + } + m.Method = "remove-member" + m.Params.Options.Team = t.Name + m.Params.Options.Username = user + + r, err := teamAPIOut(t.keybase.Path, m) + return r, err +} + // AddReaders adds members to a team by username, and sets their roles to Reader func (t Team) AddReaders(users ...string) (TeamAPI, error) { m := TeamAPI{ diff --git a/types.go b/types.go index 697dddb..f681bdb 100644 --- a/types.go +++ b/types.go @@ -374,6 +374,7 @@ type tOptions struct { Team string `json:"team"` Emails []emails `json:"emails"` Usernames []usernames `json:"usernames"` + Username string `json:"username"` } type tParams struct { Options tOptions `json:"options"`