summaryrefslogtreecommitdiffstats
path: root/model/client4.go
diff options
context:
space:
mode:
Diffstat (limited to 'model/client4.go')
-rw-r--r--model/client4.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/model/client4.go b/model/client4.go
index 3c585fbe4..6752a4b60 100644
--- a/model/client4.go
+++ b/model/client4.go
@@ -213,7 +213,16 @@ func (c *Client4) UpdateUser(user *User) (*User, *Response) {
}
// Team Section
-// to be filled in..
+
+// CreateTeam creates a team in the system based on the provided team struct.
+func (c *Client4) CreateTeam(team *Team) (*Team, *Response) {
+ if r, err := c.DoApiPost(c.GetTeamsRoute(), team.ToJson()); err != nil {
+ return nil, &Response{StatusCode: r.StatusCode, Error: err}
+ } else {
+ defer closeBody(r)
+ return TeamFromJson(r.Body), BuildResponse(r)
+ }
+}
// Channel Section
// to be filled in..