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, 11 insertions, 0 deletions
diff --git a/model/client4.go b/model/client4.go
index 3a6507f82..7e0cd1acf 100644
--- a/model/client4.go
+++ b/model/client4.go
@@ -1242,6 +1242,17 @@ func (c *Client4) GetPublicChannelsForTeam(teamId string, page int, perPage int,
}
}
+// GetDeletedChannelsForTeam returns a list of public channels based on the provided team id string.
+func (c *Client4) GetDeletedChannelsForTeam(teamId string, page int, perPage int, etag string) (*ChannelList, *Response) {
+ query := fmt.Sprintf("/deleted?page=%v&per_page=%v", page, perPage)
+ if r, err := c.DoApiGet(c.GetChannelsForTeamRoute(teamId)+query, etag); err != nil {
+ return nil, &Response{StatusCode: r.StatusCode, Error: err}
+ } else {
+ defer closeBody(r)
+ return ChannelListFromJson(r.Body), BuildResponse(r)
+ }
+}
+
// GetPublicChannelsByIdsForTeam returns a list of public channels based on provided team id string
func (c *Client4) GetPublicChannelsByIdsForTeam(teamId string, channelIds []string) (*ChannelList, *Response) {
if r, err := c.DoApiPost(c.GetChannelsForTeamRoute(teamId)+"/ids", ArrayToJson(channelIds)); err != nil {