Add GetCustomEmojis
authorMikael Berthe <mikael@lilotux.net>
Mon, 19 Mar 2018 16:32:07 +0100
changeset 208 0b58780582d9
parent 207 301d5b94be3f
child 209 b9d12bab993e
Add GetCustomEmojis
emoji.go
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/emoji.go	Mon Mar 19 16:32:07 2018 +0100
@@ -0,0 +1,20 @@
+/*
+Copyright 2018 Mikael Berthe
+
+Licensed under the MIT license.  Please see the LICENSE file is this directory.
+*/
+
+package madon
+
+import (
+	"github.com/sendgrid/rest"
+)
+
+// GetCustomEmojis returns a list with the server custom emojis
+func (mc *Client) GetCustomEmojis(lopt *LimitParams) ([]Emoji, error) {
+	var emojiList []Emoji
+	if err := mc.apiCall("custom_emojis", rest.Get, nil, lopt, nil, &emojiList); err != nil {
+		return nil, err
+	}
+	return emojiList, nil
+}