From 4eb784dd8159fe5ca1133ceed1ed3490ce8f090c Mon Sep 17 00:00:00 2001 From: 178inaba <178inaba@users.noreply.github.com> Date: Sat, 15 Apr 2017 03:28:50 +0900 Subject: [PATCH] Add GetFavourites --- status.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/status.go b/status.go index b597fe5..56f5fe1 100644 --- a/status.go +++ b/status.go @@ -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