From bcdd8d879bd7cb9ad5e14ccd43ade5e097d383d0 Mon Sep 17 00:00:00 2001 From: 178inaba <178inaba@users.noreply.github.com> Date: Fri, 14 Apr 2017 16:41:47 +0900 Subject: [PATCH] Add GetAccountFollowing --- mastodon.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mastodon.go b/mastodon.go index 94f6a7b..bbddf19 100644 --- a/mastodon.go +++ b/mastodon.go @@ -235,6 +235,16 @@ func (c *Client) GetAccountFollowers(id int64) ([]*Account, error) { return accounts, nil } +// GetAccountFollowing return following list. +func (c *Client) GetAccountFollowing(id int64) ([]*Account, error) { + var accounts []*Account + err := c.doAPI("GET", fmt.Sprintf("/api/v1/accounts/%d/following", 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