person
person

Reputation: 1

How can I use a google classroom API on a website I am making to access specific rosters and put them on a list displayed on the website?

I am making a website for a teacher and he wants to be able to take attendance easily and he wants me to use the google classroom api to access his roster in his class so that it can then display that list of names on the website and he can easily take attendance there

Upvotes: 0

Views: 5921

Answers (2)

lesley2958
lesley2958

Reputation: 2608

Roster importing is a common use case we see with the Classroom API. Here's what the workflow typically looks like:

  1. On your website, the teacher chooses the option to import a Classroom Course.
  2. On your backend, call the courses.list method through the Classroom API, which will return a json response.
  3. From this json response, list the titles of the teacher's courses for them to select 1. Note: you'll need to keep track of the course IDs to continue onto the next step.
  4. With the course ID, call the students.list method and display all names on your website for teachers to take attendance.

On each of the links above, you can use the API Explorer to see exactly how these methods behave. I also recommend you check the documentation for managing courses and students/teachers -- there are code snippets for a few different languages, including Python.

Hope this helps!

Upvotes: 4

MαπμQμαπkγVπ.0
MαπμQμαπkγVπ.0

Reputation: 6729

The best thing to start with is to navigate in the official documentation for Classroom API.

The Classroom API provides a RESTful interface for you to manage courses and rosters in Google Classroom.

For python, you can refer to the quickstart guide designed for Python implementation. See sample code.

To access students, use REST Resource: courses.students.

You will be able to use the supported methods such as create, delete, get and list.

Upvotes: 0

Related Questions