Add GetMyUserInfo (#111)

Signed-off-by: Jonas Franz <info@jonasfranz.software>
This commit is contained in:
Jonas Franz 2018-06-24 13:13:26 +02:00 committed by Lauris BH
parent ec80752c95
commit 9c719de11f
1 changed files with 7 additions and 0 deletions

View File

@ -42,3 +42,10 @@ func (c *Client) GetUserInfo(user string) (*User, error) {
err := c.getParsedResponse("GET", fmt.Sprintf("/users/%s", user), nil, nil, u)
return u, err
}
// GetMyUserInfo get user info of current user
func (c *Client) GetMyUserInfo() (*User, error) {
u := new(User)
err := c.getParsedResponse("GET", "/user", nil, nil, u)
return u, err
}