From 2e6fd031d15a9502e7a7a4536febfe49780c0697 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Tue, 20 Jun 2017 09:55:43 -0400 Subject: Add GET /teams/invite/{invite_id} endpoint for v4 (#6685) --- model/client4.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'model/client4.go') diff --git a/model/client4.go b/model/client4.go index efe12a3b9..be8a689f2 100644 --- a/model/client4.go +++ b/model/client4.go @@ -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. -- cgit v1.2.3-1-g7c22