Skip to content

Commit 4ab716b

Browse files
authored
New client method: GetSelfInfo() (#119)
Retrieves the information for the current authenticated user. API endpoint "/user".
1 parent 26bb60b commit 4ab716b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

user.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,9 @@ func (c *Client) GetUserInfo(user string) (*User, error) {
2323
err := c.getParsedResponse("GET", fmt.Sprintf("/users/%s", user), nil, nil, u)
2424
return u, err
2525
}
26+
27+
func (c *Client) GetSelfInfo() (*User, error) {
28+
u := new(User)
29+
err := c.getParsedResponse("GET", "/user", nil, nil, u)
30+
return u, err
31+
}

0 commit comments

Comments
 (0)