From 060b9f92c382052276fa784065af6b18eda70669 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Tue, 28 Mar 2017 08:07:15 -0400 Subject: Remove API endpoints being deprecated in 3.8 (#5880) --- model/client.go | 43 ------------------------------------------- 1 file changed, 43 deletions(-) (limited to 'model') diff --git a/model/client.go b/model/client.go index 772265843..74793c5eb 100644 --- a/model/client.go +++ b/model/client.go @@ -1191,17 +1191,6 @@ func (c *Client) GetChannel(id, etag string) (*Result, *AppError) { } } -// SCHEDULED FOR DEPRECATION IN 3.7 - use GetMoreChannelsPage instead -func (c *Client) GetMoreChannels(etag string) (*Result, *AppError) { - if r, err := c.DoApiGet(c.GetTeamRoute()+"/channels/more", "", etag); err != nil { - return nil, err - } else { - defer closeBody(r) - return &Result{r.Header.Get(HEADER_REQUEST_ID), - r.Header.Get(HEADER_ETAG_SERVER), ChannelListFromJson(r.Body)}, nil - } -} - // GetMoreChannelsPage will return a page of open channels the user is not in based on // the provided offset and limit. Must be authenticated. func (c *Client) GetMoreChannelsPage(offset int, limit int) (*Result, *AppError) { @@ -1333,22 +1322,6 @@ func (c *Client) RemoveChannelMember(id, user_id string) (*Result, *AppError) { } } -// UpdateLastViewedAt will mark a channel as read. -// The channelId indicates the channel to mark as read. If active is true, push notifications -// will be cleared if there are unread messages. The default for active is true. -// SCHEDULED FOR DEPRECATION IN 3.8 - use ViewChannel instead -func (c *Client) UpdateLastViewedAt(channelId string, active bool) (*Result, *AppError) { - data := make(map[string]interface{}) - data["active"] = active - if r, err := c.DoApiPost(c.GetChannelRoute(channelId)+"/update_last_viewed_at", StringInterfaceToJson(data)); err != nil { - return nil, err - } else { - defer closeBody(r) - return &Result{r.Header.Get(HEADER_REQUEST_ID), - r.Header.Get(HEADER_ETAG_SERVER), nil}, nil - } -} - // ViewChannel performs all the actions related to viewing a channel. This includes marking // the channel and the previous one as read, and marking the channel as being actively viewed. // ChannelId is required but may be blank to indicate no channel is being viewed. @@ -1792,22 +1765,6 @@ func (c *Client) GetStatusesByIds(userIds []string) (*Result, *AppError) { } } -// SetActiveChannel sets the the channel id the user is currently viewing. -// The channelId key is required but the value can be blank. Returns standard -// response. -// SCHEDULED FOR DEPRECATION IN 3.8 - use ViewChannel instead -func (c *Client) SetActiveChannel(channelId string) (*Result, *AppError) { - data := map[string]string{} - data["channel_id"] = channelId - if r, err := c.DoApiPost("/users/status/set_active_channel", MapToJson(data)); err != nil { - return nil, err - } else { - defer closeBody(r) - return &Result{r.Header.Get(HEADER_REQUEST_ID), - r.Header.Get(HEADER_ETAG_SERVER), MapFromJson(r.Body)}, nil - } -} - func (c *Client) GetMyTeam(etag string) (*Result, *AppError) { if r, err := c.DoApiGet(c.GetTeamRoute()+"/me", "", etag); err != nil { return nil, err -- cgit v1.2.3-1-g7c22