emoji.go
author Mikael Berthe <mikael@lilotux.net>
Thu, 06 Sep 2018 01:07:40 +0200
changeset 238 1c0042e76902
parent 208 0b58780582d9
permissions -rw-r--r--
Do not use a global API version Mastodon uses an API version per endpoint (cf. search v2) so we need to be able to specify the version for any API call.

/*
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("v1/custom_emojis", rest.Get, nil, lopt, nil, &emojiList); err != nil {
		return nil, err
	}
	return emojiList, nil
}