Merge pull request #5 from 178inaba/current_user

Add GetAccountCurrentUser
This commit is contained in:
mattn 2017-04-14 16:18:13 +09:00 committed by GitHub
commit 0750bedc85

View File

@ -215,6 +215,16 @@ func (c *Client) GetAccount(id int) (*Account, error) {
return &account, nil
}
// GetAccountCurrentUser return Account of current user.
func (c *Client) GetAccountCurrentUser() (*Account, error) {
var account Account
err := c.doAPI("GET", "/api/v1/accounts/verify_credentials", nil, &account)
if err != nil {
return nil, err
}
return &account, nil
}
// GetAccountFollowers return followers list.
func (c *Client) GetAccountFollowers(id int64) ([]*Account, error) {
var accounts []*Account