Add API Endpoint for deleted Channels (#5889)
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
530814b8c9
Коммит
5efcd2d9d3
@@ -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 {
|
||||
|
||||
Ссылка в новой задаче
Block a user