Layanan Classroom memungkinkan Anda menggunakan Google Classroom API di Apps Script. API ini memberi admin,
pengajar, dan siswa kemampuan untuk melihat serta mengelola kursus dan daftar nama mereka.
Referensi
Untuk mengetahui informasi selengkapnya tentang layanan ini, lihat
dokumentasi referensi untuk Google Classroom API.
Seperti semua layanan lanjutan di Apps Script, layanan Classroom menggunakan objek, metode, dan parameter yang sama dengan API publik. Untuk informasi selengkapnya, lihat Cara menentukan tanda tangan metode.
/** * Lists 10 course names and IDs. */functionlistCourses(){/** * @see https://developers.google.com/classroom/reference/rest/v1/courses/list */constoptionalArgs={pageSize:10// Use other query parameters here if needed.};try{constresponse=Classroom.Courses.list(optionalArgs);constcourses=response.courses;if(!courses||courses.length===0){console.log('Nocoursesfound.');return;}// Print the course names and IDs of the available courses.for(constcourseincourses){console.log('%s(%s)',courses[course].name,courses[course].id);}}catch(err){// TODO (developer)- Handle Courses.list() exception from Classroom APIconsole.log('Failedwitherror%s',err.message);}}
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2024-12-21 UTC."],[[["The Google Classroom API within Apps Script allows admins, teachers, and students to manage courses and rosters."],["This is an advanced service requiring prior enabling and provides functionalities mirroring the public API."],["Comprehensive documentation, support resources, and sample code are available for guidance and troubleshooting."],["You can find sample code demonstrating functionalities like listing the user's accessible courses."]]],[]]