MCPcopy Index your code
hub / github.com/google/go-github / ListAll

Method ListAll

github/users.go:226–244  ·  view source on GitHub ↗

ListAll lists all GitHub users. To paginate through all users, populate 'Since' with the ID of the last user. GitHub API docs: https://docs.github.com/rest/users/users?apiVersion=2022-11-28#list-users meta:operation GET /users

(ctx context.Context, opts *UserListOptions)

Source from the content-addressed store, hash-verified

224//
225//meta:operation GET /users
226func (s *UsersService) ListAll(ctx context.Context, opts *UserListOptions) ([]*User, *Response, error) {
227 u, err := addOptions("users", opts)
228 if err != nil {
229 return nil, nil, err
230 }
231
232 req, err := s.client.NewRequest(ctx, "GET", u, nil)
233 if err != nil {
234 return nil, nil, err
235 }
236
237 var users []*User
238 resp, err := s.client.Do(req, &users)
239 if err != nil {
240 return nil, resp, err
241 }
242
243 return users, resp, nil
244}
245
246// ListInvitations lists all currently-open repository invitations for the
247// authenticated user.

Callers 6

TestUsers_GetFunction · 0.45
TestGistsService_ListAllFunction · 0.45
TestUsersService_ListAllFunction · 0.45

Calls 3

addOptionsFunction · 0.85
NewRequestMethod · 0.80
DoMethod · 0.45

Tested by 6

TestUsers_GetFunction · 0.36
TestGistsService_ListAllFunction · 0.36
TestUsersService_ListAllFunction · 0.36