I want to build a tool that keeps track of my Google Classroom courses. I need to pull details like new assignments with information such as who created it, the assignment name, and its due date. For example:
- Alert: You have a new task from {instructor_name}
- Task: {TASK_TITLE}
- Due on: {DUE_DATE}
Below is a sample code snippet:
def generate_alert(instructor, task, deadline):
message = f"Notice: A fresh task from {instructor}!"
message += f"\nTask: {task}"
message += f"\nSubmit by: {deadline}"
return message
print(generate_alert("Dr. Allen", "Quiz Review", "2023-11-30"))
Is it possible to extract this information using the Google Classroom API or should I explore a different method?
hey, you can get assignment info via the classroom api, but sometimes the instructor details need extra calls. might be a bit messy but its doable. best of luck with your tool!
It is definitely possible to extract assignment details through the Google Classroom API, but do be aware that some details, such as instructor information, might not be directly embedded within the assignment data. In my own project, I encountered the necessity of additional API calls to retrieve profile details of the instructor, which required extra handling in the code. Planning for these extra steps during the design phase is essential. Investigating how the API structures its responses can help streamline your integration and ensure all required details are properly captured.