APIv4 GET /posts/{post_id}/reactions (#6047)

Этот коммит содержится в:
Saturnino Abril
2017-04-11 22:14:33 +09:00
коммит произвёл George Goldberg
родитель d2be3de2d3
Коммит e841d0c502
5 изменённых файлов: 157 добавлений и 0 удалений

Просмотреть файл

@@ -2311,3 +2311,15 @@ func (c *Client4) GetEmojiList() ([]*Emoji, *Response) {
return EmojiListFromJson(r.Body), BuildResponse(r)
}
}
// Reaction Section
// GetReactions returns a list of reactions to a post.
func (c *Client4) GetReactions(postId string) ([]*Reaction, *Response) {
if r, err := c.DoApiGet(c.GetPostRoute(postId)+"/reactions", ""); err != nil {
return nil, &Response{StatusCode: r.StatusCode, Error: err}
} else {
defer closeBody(r)
return ReactionsFromJson(r.Body), BuildResponse(r)
}
}