favourites.go
author Mikael Berthe <mikael@lilotux.net>
Fri, 28 Apr 2017 16:22:39 +0200
changeset 150 cd328b30af77
parent 149 5f922977d7c7
child 155 0c581e0108da
permissions -rw-r--r--
Fix mistake in previous changeset

/*
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(lopt *LimitParams) ([]Status, error) {
	var faves []Status
	err := mc.apiCall("favourites", rest.Get, nil, lopt, &faves)
	if err != nil {
		return nil, err
	}
	return faves, nil
}