author | Mikael Berthe <mikael@lilotux.net> |
Sat, 22 Apr 2017 14:49:19 +0200 | |
changeset 145 | d7ccfe67fa9e |
parent 138 | 23d3a518d0ad |
child 149 | 5f922977d7c7 |
permissions | -rw-r--r-- |
130 | 1 |
/* |
2 |
Copyright 2017 Mikael Berthe |
|
3 |
||
4 |
Licensed under the MIT license. Please see the LICENSE file is this directory. |
|
5 |
*/ |
|
6 |
||
138
23d3a518d0ad
Update package name in source files
Mikael Berthe <mikael@lilotux.net>
parents:
130
diff
changeset
|
7 |
package madon |
93 | 8 |
|
9 |
import ( |
|
10 |
"github.com/sendgrid/rest" |
|
11 |
) |
|
12 |
||
13 |
// GetFavourites returns the list of the user's favourites |
|
138
23d3a518d0ad
Update package name in source files
Mikael Berthe <mikael@lilotux.net>
parents:
130
diff
changeset
|
14 |
func (mc *Client) GetFavourites() ([]Status, error) { |
93 | 15 |
var faves []Status |
138
23d3a518d0ad
Update package name in source files
Mikael Berthe <mikael@lilotux.net>
parents:
130
diff
changeset
|
16 |
err := mc.apiCall("favourites", rest.Get, nil, &faves) |
93 | 17 |
if err != nil { |
120 | 18 |
return nil, err |
93 | 19 |
} |
20 |
return faves, nil |
|
21 |
} |