From 70efe09ff42f4f69cc72c017e24a94ae6ee37dcb Mon Sep 17 00:00:00 2001 From: 178inaba <178inaba@users.noreply.github.com> Date: Sat, 15 Apr 2017 02:23:17 +0900 Subject: [PATCH] Add GetBlocks --- accounts.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/accounts.go b/accounts.go index 751e3d3..4504758 100644 --- a/accounts.go +++ b/accounts.go @@ -66,6 +66,16 @@ func (c *Client) GetAccountFollowing(id int64) ([]*Account, error) { return accounts, nil } +// GetBlocks return block list. +func (c *Client) GetBlocks() ([]*Account, error) { + var accounts []*Account + err := c.doAPI(http.MethodGet, "/api/v1/blocks", nil, &accounts) + if err != nil { + return nil, err + } + return accounts, nil +} + // Relationship hold information for relation-ship to the account. type Relationship struct { ID int64 `json:"id"`