implement GET /emoji for apiV4 (#6007)
Этот коммит содержится в:
коммит произвёл
Corey Hulen
родитель
08a469a006
Коммит
1bd19f006d
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user