@@ -12,11 +12,19 @@ type AccountsService struct {
12
12
}
13
13
14
14
// AccountInfo entity contains information about an account.
15
+ //
16
+ // TODO Add field secondary_emails
17
+ // TODO Add field status
18
+ // TODO Add field inactive
19
+ // TODO Add field tags
20
+ //
21
+ // Gerrit API docs: https://gerrit-review.googlesource.com/Documentation/rest-api-accounts.html#account-info
15
22
type AccountInfo struct {
16
- AccountID int `json:"_account_id,omitempty"`
17
- Name string `json:"name,omitempty"`
18
- Email string `json:"email,omitempty"`
19
- Username string `json:"username,omitempty"`
23
+ AccountID int `json:"_account_id,omitempty"`
24
+ Name string `json:"name,omitempty"`
25
+ DisplayName string `json:"display_name,omitempty"`
26
+ Email string `json:"email,omitempty"`
27
+ Username string `json:"username,omitempty"`
20
28
21
29
// Avatars lists avatars of various sizes for the account.
22
30
// This field is only populated if the avatars plugin is enabled.
@@ -27,6 +35,14 @@ type AccountInfo struct {
27
35
MoreAccounts bool `json:"_more_accounts,omitempty"`
28
36
}
29
37
38
+ // QueryAccountOptions queries accounts visible to the caller.
39
+ type QueryAccountOptions struct {
40
+ QueryOptions
41
+
42
+ // The `S` or `start` query parameter can be supplied to skip a number of accounts from the list.
43
+ Start int `url:"S,omitempty"`
44
+ }
45
+
30
46
// SSHKeyInfo entity contains information about an SSH key of a user.
31
47
type SSHKeyInfo struct {
32
48
Seq int `json:"seq"`
@@ -519,7 +535,7 @@ func (s *AccountsService) GetStarredChanges(accountID string) (*[]ChangeInfo, *R
519
535
// Returns a list of matching AccountInfo entities.
520
536
//
521
537
// Gerrit API docs: https://gerrit-review.googlesource.com/Documentation/rest-api-accounts.html#query-account
522
- func (s * AccountsService ) SuggestAccount (opt * QueryOptions ) (* []AccountInfo , * Response , error ) {
538
+ func (s * AccountsService ) SuggestAccount (opt * QueryAccountOptions ) (* []AccountInfo , * Response , error ) {
523
539
u := "accounts/"
524
540
525
541
u , err := addOptions (u , opt )
0 commit comments