Add GetBlocks

This commit is contained in:
178inaba 2017-04-15 02:23:17 +09:00
parent 5d72d54344
commit 70efe09ff4

View File

@ -66,6 +66,16 @@ func (c *Client) GetAccountFollowing(id int64) ([]*Account, error) {
return accounts, nil 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. // Relationship hold information for relation-ship to the account.
type Relationship struct { type Relationship struct {
ID int64 `json:"id"` ID int64 `json:"id"`