ListClassrooms lists GitHub Classrooms for the current user. Classrooms will only be returned if the current user is an administrator of one or more GitHub Classrooms. GitHub API docs: https://docs.github.com/rest/classroom/classroom?apiVersion=2022-11-28#list-classrooms meta:operation GET /classr
(ctx context.Context, opts *ListOptions)
| 157 | // |
| 158 | //meta:operation GET /classrooms |
| 159 | func (s *ClassroomService) ListClassrooms(ctx context.Context, opts *ListOptions) ([]*Classroom, *Response, error) { |
| 160 | u, err := addOptions("classrooms", opts) |
| 161 | if err != nil { |
| 162 | return nil, nil, err |
| 163 | } |
| 164 | |
| 165 | req, err := s.client.NewRequest(ctx, "GET", u, nil) |
| 166 | if err != nil { |
| 167 | return nil, nil, err |
| 168 | } |
| 169 | |
| 170 | var classrooms []*Classroom |
| 171 | resp, err := s.client.Do(req, &classrooms) |
| 172 | if err != nil { |
| 173 | return nil, resp, err |
| 174 | } |
| 175 | |
| 176 | return classrooms, resp, nil |
| 177 | } |
| 178 | |
| 179 | // ListClassroomAssignments lists GitHub Classroom assignments for a classroom. Assignments will only be |
| 180 | // returned if the current user is an administrator of the GitHub Classroom. |