Add GET /teams/invite/{invite_id} endpoint for v4 (#6685)

Этот коммит содержится в:
Joram Wilander
2017-06-20 09:55:43 -04:00
коммит произвёл George Goldberg
родитель effaeee830
Коммит 2e6fd031d1
5 изменённых файлов: 72 добавлений и 0 удалений

Просмотреть файл

@@ -1204,6 +1204,16 @@ func (c *Client4) InviteUsersToTeam(teamId string, userEmails []string) (bool, *
}
}
// GetTeamInviteInfo returns a team object from an invite id containing sanitized information.
func (c *Client4) GetTeamInviteInfo(inviteId string) (*Team, *Response) {
if r, err := c.DoApiGet(c.GetTeamsRoute()+"/invite/"+inviteId, ""); err != nil {
return nil, &Response{StatusCode: r.StatusCode, Error: err}
} else {
defer closeBody(r)
return TeamFromJson(r.Body), BuildResponse(r)
}
}
// Channel Section
// CreateChannel creates a channel based on the provided channel struct.