classrooms
Creates, updates, deletes, gets or lists a classrooms resource.
Overview
| Name | classrooms |
| Type | Resource |
| Id | github.classroom.classrooms |
Fields
The following fields are returned by SELECT queries:
- get_a_classroom
- list_classrooms
Response
| Name | Datatype | Description |
|---|---|---|
id | integer | Unique identifier of the classroom. |
name | string | The name of the classroom. (example: Programming Elixir) |
archived | boolean | Whether classroom is archived. |
organization | object | A GitHub organization. (title: Organization Simple for Classroom) |
url | string | The URL of the classroom on GitHub Classroom. (example: https://classroom.github.com/classrooms/1-programming-elixir) |
Response
| Name | Datatype | Description |
|---|---|---|
id | integer | Unique identifier of the classroom. |
name | string | The name of the classroom. (example: Programming Elixir) |
archived | boolean | Returns whether classroom is archived or not. |
url | string | The url of the classroom on GitHub Classroom. (example: https://classroom.github.com/classrooms/1-programming-elixir) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_a_classroom | select | classroom_id | Gets a GitHub Classroom classroom for the current user. Classroom will only be returned if the current user is an administrator of the GitHub Classroom. | |
list_classrooms | select | page, per_page | Lists GitHub Classroom classrooms for the current user. Classrooms will only be returned if the current user is an administrator of one or more GitHub Classrooms. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
classroom_id | integer | The unique identifier of the classroom. |
page | integer | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
per_page | integer | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
SELECT examples
- get_a_classroom
- list_classrooms
Gets a GitHub Classroom classroom for the current user. Classroom will only be returned if the current user is an administrator of the GitHub Classroom.
SELECT
id,
name,
archived,
organization,
url
FROM github.classroom.classrooms
WHERE classroom_id = '{{ classroom_id }}' -- required
;
Lists GitHub Classroom classrooms for the current user. Classrooms will only be returned if the current user is an administrator of one or more GitHub Classrooms.
SELECT
id,
name,
archived,
url
FROM github.classroom.classrooms
WHERE page = '{{ page }}'
AND per_page = '{{ per_page }}'
;