diff options
Diffstat (limited to 'vendor/code.gitea.io/sdk/gitea/user.go')
-rw-r--r-- | vendor/code.gitea.io/sdk/gitea/user.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/vendor/code.gitea.io/sdk/gitea/user.go b/vendor/code.gitea.io/sdk/gitea/user.go index 8b78bea941..2560d85cb8 100644 --- a/vendor/code.gitea.io/sdk/gitea/user.go +++ b/vendor/code.gitea.io/sdk/gitea/user.go @@ -11,12 +11,13 @@ import ( // User represents a API user. type User struct { ID int64 `json:"id"` - UserName string `json:"username"` + UserName string `json:"login"` FullName string `json:"full_name"` Email string `json:"email"` - AvatarUrl string `json:"avatar_url"` + AvatarURL string `json:"avatar_url"` } +// GetUserInfo get user info by user's name func (c *Client) GetUserInfo(user string) (*User, error) { u := new(User) err := c.getParsedResponse("GET", fmt.Sprintf("/users/%s", user), nil, nil, u) |