From a4d83d3b95476a6dafc95a238872d1bed8718a4e Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Fri, 14 Apr 2017 13:37:43 +0900 Subject: [PATCH] add GetAccountFollowers --- mastodon.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mastodon.go b/mastodon.go index a621def..163777f 100644 --- a/mastodon.go +++ b/mastodon.go @@ -217,6 +217,15 @@ func (c *Client) GetAccount(id int) (*Account, error) { return &account, nil } +func (c *Client) GetAccountFollowers(id int64) ([]*Account, error) { + var accounts []*Account + err := c.doAPI("GET", fmt.Sprintf("/api/v1/accounts/%d/followers", id), nil, &accounts) + if err != nil { + return nil, err + } + return accounts, nil +} + // GetTimelineHome return statuses from home timeline. func (c *Client) GetTimelineHome() ([]*Status, error) { var statuses []*Status