implement GET /emoji for apiV4 (#6007)

Этот коммит содержится в:
Carlos Tadeu Panato Junior
2017-04-07 19:05:14 +02:00
коммит произвёл Corey Hulen
родитель 08a469a006
Коммит 1bd19f006d
5 изменённых файлов: 94 добавлений и 14 удалений

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

@@ -2267,3 +2267,13 @@ func (c *Client4) CreateEmoji(emoji *Emoji, image []byte, filename string) (*Emo
return c.DoEmojiUploadFile(c.GetEmojisRoute(), body.Bytes(), writer.FormDataContentType())
}
// GetEmojiList returns a list of custom emoji in the system.
func (c *Client4) GetEmojiList() ([]*Emoji, *Response) {
if r, err := c.DoApiGet(c.GetEmojisRoute(), ""); err != nil {
return nil, &Response{StatusCode: r.StatusCode, Error: err}
} else {
defer closeBody(r)
return EmojiListFromJson(r.Body), BuildResponse(r)
}
}