# HG changeset patch # User Mikael Berthe # Date 1521473527 -3600 # Node ID 0b58780582d95d5fd373c519051fa96be8b9b47b # Parent 301d5b94be3f99e37fbd84cfe3fde552601f28e6 Add GetCustomEmojis diff -r 301d5b94be3f -r 0b58780582d9 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 +}