favourites.go
author Mikael Berthe <mikael@lilotux.net>
Fri, 28 Apr 2017 11:47:18 +0200
changeset 147 b682706e2f31
parent 138 23d3a518d0ad
child 149 5f922977d7c7
permissions -rw-r--r--
Add version filed (Mastodon 1.3+) to the Instance type

/*
Copyright 2017 Mikael Berthe

Licensed under the MIT license.  Please see the LICENSE file is this directory.
*/

package madon

import (
	"github.com/sendgrid/rest"
)

// GetFavourites returns the list of the user's favourites
func (mc *Client) GetFavourites() ([]Status, error) {
	var faves []Status
	err := mc.apiCall("favourites", rest.Get, nil, &faves)
	if err != nil {
		return nil, err
	}
	return faves, nil
}