Add GetFavourites

pull/9/head
178inaba 2017-04-15 03:28:50 +09:00
parent 2338b8e97e
commit 4eb784dd81
1 changed files with 10 additions and 0 deletions

View File

@ -45,6 +45,16 @@ type Card struct {
Image string `json:"image"`
}
// GetFavourites return the favorite list of the current user.
func (c *Client) GetFavourites() ([]*Status, error) {
var statuses []*Status
err := c.doAPI(http.MethodGet, "/api/v1/favourites", nil, &statuses)
if err != nil {
return nil, err
}
return statuses, nil
}
// GetStatus return status specified by id.
func (c *Client) GetStatus(id string) (*Status, error) {
var status Status