Add GetAccountCurrentUser

pull/5/head
178inaba 2017-04-14 15:46:21 +09:00
parent 720344456d
commit 9cace6b291
1 changed files with 10 additions and 0 deletions

View File

@ -215,6 +215,16 @@ func (c *Client) GetAccount(id int) (*Account, error) {
return &account, nil return &account, nil
} }
// GetAccountCurrentUser return current user Account.
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. // GetAccountFollowers return followers list.
func (c *Client) GetAccountFollowers(id int64) ([]*Account, error) { func (c *Client) GetAccountFollowers(id int64) ([]*Account, error) {
var accounts []*Account var accounts []*Account