gws-classroom by googleworkspace/cli
npx skills add https://github.com/googleworkspace/cli --skill gws-classroom前提条件: 阅读
../gws-shared/SKILL.md以了解身份验证、全局标志和安全规则。如果该文件缺失,请运行gws generate-skills来创建它。
gws classroom <resource> <method> [flags]
create — 创建课程。ownerId 中指定的用户是所创建课程的所有者,并被添加为教师。非管理员请求用户只能创建自己作为所有者的课程。域管理员可以创建其域内任何用户拥有的课程。此方法返回以下错误代码:* 如果请求用户无权创建课程或出现访问错误,则返回 PERMISSION_DENIED。* 如果主要教师不是有效用户,则返回 NOT_FOUND。delete — 删除课程。此方法返回以下错误代码:* 如果请求用户无权删除请求的课程或出现访问错误,则返回 。* 如果不存在具有请求 ID 的课程,则返回 。广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
PERMISSION_DENIEDNOT_FOUNDget — 返回课程。此方法返回以下错误代码:* 如果请求用户无权访问请求的课程或出现访问错误,则返回 PERMISSION_DENIED。* 如果不存在具有请求 ID 的课程,则返回 NOT_FOUND。getGradingPeriodSettings — 返回课程中的评分周期设置。此方法返回以下错误代码:* 如果请求用户无权访问请求课程中的评分周期设置或出现访问错误,则返回 PERMISSION_DENIED。* 如果请求的课程不存在,则返回 NOT_FOUND。list — 返回请求用户有权查看的课程列表,仅限于与请求匹配的课程。返回的课程按创建时间排序,最近创建的排在最前面。此方法返回以下错误代码:* 对于访问错误,返回 PERMISSION_DENIED。* 如果查询参数格式错误,则返回 INVALID_ARGUMENT。* 如果查询参数中指定的任何用户不存在,则返回 NOT_FOUND。patch — 更新课程中的一个或多个字段。此方法返回以下错误代码:* 如果请求用户无权修改请求的课程或出现访问错误,则返回 PERMISSION_DENIED。* 如果不存在具有请求 ID 的课程,则返回 NOT_FOUND。* 如果在更新掩码中指定了无效字段或未提供更新掩码,则返回 INVALID_ARGUMENT。update — 更新课程。此方法返回以下错误代码:* 如果请求用户无权修改请求的课程或出现访问错误,则返回 PERMISSION_DENIED。* 如果不存在具有请求 ID 的课程,则返回 NOT_FOUND。* 对于以下请求错误,返回 FAILED_PRECONDITION:* CourseNotModifiable * CourseTitleCannotContainUrlupdateGradingPeriodSettings — 更新课程的评分周期设置。可以使用此方法添加、移除或修改单个评分周期。请求用户和课程所有者必须符合修改评分周期的资格。详情请参阅许可要求。aliases — 对 'aliases' 资源的操作announcements — 对 'announcements' 资源的操作courseWork — 对 'courseWork' 资源的操作courseWorkMaterials — 对 'courseWorkMaterials' 资源的操作posts — 对 'posts' 资源的操作studentGroups — 对 'studentGroups' 资源的操作students — 对 'students' 资源的操作teachers — 对 'teachers' 资源的操作topics — 对 'topics' 资源的操作accept — 接受邀请,移除该邀请并将受邀用户添加到指定课程的教师或学生(视情况而定)中。只有受邀用户可以接受邀请。此方法返回以下错误代码:* 如果请求用户无权接受请求的邀请或出现访问错误,则返回 PERMISSION_DENIED。create — 创建邀请。一个用户和一门课程一次只能存在一个邀请。删除并重新创建邀请以进行更改。此方法返回以下错误代码:* 如果请求用户无权为此课程创建邀请或出现访问错误,则返回 PERMISSION_DENIED。* 如果课程或用户不存在,则返回 NOT_FOUND。* FAILED_PRECONDITION:* 如果请求用户的帐户已停用。delete — 删除邀请。此方法返回以下错误代码:* 如果请求用户无权删除请求的邀请或出现访问错误,则返回 PERMISSION_DENIED。* 如果不存在具有请求 ID 的邀请,则返回 NOT_FOUND。get — 返回邀请。此方法返回以下错误代码:* 如果请求用户无权查看请求的邀请或出现访问错误,则返回 PERMISSION_DENIED。* 如果不存在具有请求 ID 的邀请,则返回 NOT_FOUND。list — 返回请求用户有权查看的邀请列表,仅限于与列表请求匹配的邀请。注意: 必须提供 user_id 或 course_id 中的至少一个。两个字段可以同时提供。此方法返回以下错误代码:* 对于访问错误,返回 PERMISSION_DENIED。create — 创建 Registration,使 Classroom 开始将来自提供的 feed 的通知发送到 cloudPubSubTopic 中提供的目标。返回创建的 Registration。目前,这将与参数相同,但会填充服务器分配的字段,例如 expiry_time 和 id。请注意,为 expiry_time 或 id 字段指定的任何值都将被忽略。delete — 删除 Registration,使 Classroom 停止发送该 Registration 的通知。get — 返回用户个人资料。此方法返回以下错误代码:* 如果请求用户无权访问此用户个人资料、不存在具有请求 ID 的个人资料或出现访问错误,则返回 PERMISSION_DENIED。guardianInvitations — 对 'guardianInvitations' 资源的操作guardians — 对 'guardians' 资源的操作在调用任何 API 方法之前,请先检查它:
# 浏览资源和方法
gws classroom --help
# 检查方法的必需参数、类型和默认值
gws schema classroom.<resource>.<method>
使用 gws schema 输出来构建你的 --params 和 --json 标志。
每周安装量
5.2K
代码仓库
GitHub 星标数
22.5K
首次出现
2026年3月4日
安全审计
已安装于
codex5.0K
opencode5.0K
gemini-cli5.0K
cursor5.0K
github-copilot5.0K
kimi-cli5.0K
PREREQUISITE: Read
../gws-shared/SKILL.mdfor auth, global flags, and security rules. If missing, rungws generate-skillsto create it.
gws classroom <resource> <method> [flags]
create — Creates a course. The user specified in ownerId is the owner of the created course and added as a teacher. A non-admin requesting user can only create a course with themselves as the owner. Domain admins can create courses owned by any user within their domain. This method returns the following error codes: * PERMISSION_DENIED if the requesting user is not permitted to create courses or for access errors. * NOT_FOUND if the primary teacher is not a valid user.delete — Deletes a course. This method returns the following error codes: * PERMISSION_DENIED if the requesting user is not permitted to delete the requested course or for access errors. * NOT_FOUND if no course exists with the requested ID.get — Returns a course. This method returns the following error codes: * PERMISSION_DENIED if the requesting user is not permitted to access the requested course or for access errors. * NOT_FOUND if no course exists with the requested ID.getGradingPeriodSettings — Returns the grading period settings in a course. This method returns the following error codes: * PERMISSION_DENIED if the requesting user isn't permitted to access the grading period settings in the requested course or for access errors. * NOT_FOUND if the requested course does not exist.list — Returns a list of courses that the requesting user is permitted to view, restricted to those that match the request. Returned courses are ordered by creation time, with the most recently created coming first. This method returns the following error codes: * PERMISSION_DENIED for access errors. * INVALID_ARGUMENT if the query argument is malformed. * NOT_FOUND if any users specified in the query arguments do not exist.patch — Updates one or more fields in a course. This method returns the following error codes: * PERMISSION_DENIED if the requesting user is not permitted to modify the requested course or for access errors. * NOT_FOUND if no course exists with the requested ID. * INVALID_ARGUMENT if invalid fields are specified in the update mask or if no update mask is supplied.update — Updates a course. This method returns the following error codes: * PERMISSION_DENIED if the requesting user is not permitted to modify the requested course or for access errors. * NOT_FOUND if no course exists with the requested ID. * FAILED_PRECONDITION for the following request errors: * CourseNotModifiable * CourseTitleCannotContainUrlupdateGradingPeriodSettings — Updates grading period settings of a course. Individual grading periods can be added, removed, or modified using this method. The requesting user and course owner must be eligible to modify Grading Periods. For details, see licensing requirements.aliases — Operations on the 'aliases' resourceannouncements — Operations on the 'announcements' resourcecourseWork — Operations on the 'courseWork' resourcecourseWorkMaterials — Operations on the 'courseWorkMaterials' resourceposts — Operations on the 'posts' resourcestudentGroups — Operations on the 'studentGroups' resourcestudents — Operations on the 'students' resourceteachers — Operations on the 'teachers' resourcetopics — Operations on the 'topics' resourceaccept — Accepts an invitation, removing it and adding the invited user to the teachers or students (as appropriate) of the specified course. Only the invited user may accept an invitation. This method returns the following error codes: * PERMISSION_DENIED if the requesting user is not permitted to accept the requested invitation or for access errors.create — Creates an invitation. Only one invitation for a user and course may exist at a time. Delete and re-create an invitation to make changes. This method returns the following error codes: * PERMISSION_DENIED if the requesting user is not permitted to create invitations for this course or for access errors. * NOT_FOUND if the course or the user does not exist. * FAILED_PRECONDITION: * if the requested user's account is disabled.delete — Deletes an invitation. This method returns the following error codes: * PERMISSION_DENIED if the requesting user is not permitted to delete the requested invitation or for access errors. * if no invitation exists with the requested ID.create — Creates a Registration, causing Classroom to start sending notifications from the provided feed to the destination provided in cloudPubSubTopic. Returns the created Registration. Currently, this will be the same as the argument, but with server-assigned fields such as expiry_time and id filled in. Note that any value specified for the expiry_time or id fields will be ignored.delete — Deletes a Registration, causing Classroom to stop sending notifications for that .get — Returns a user profile. This method returns the following error codes: * PERMISSION_DENIED if the requesting user is not permitted to access this user profile, if no profile exists with the requested ID, or for access errors.guardianInvitations — Operations on the 'guardianInvitations' resourceguardians — Operations on the 'guardians' resourceBefore calling any API method, inspect it:
# Browse resources and methods
gws classroom --help
# Inspect a method's required params, types, and defaults
gws schema classroom.<resource>.<method>
Use gws schema output to build your --params and --json flags.
Weekly Installs
5.2K
Repository
GitHub Stars
22.5K
First Seen
Mar 4, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex5.0K
opencode5.0K
gemini-cli5.0K
cursor5.0K
github-copilot5.0K
kimi-cli5.0K
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
102,200 周安装
NOT_FOUNDget — Returns an invitation. This method returns the following error codes: * PERMISSION_DENIED if the requesting user is not permitted to view the requested invitation or for access errors. * NOT_FOUND if no invitation exists with the requested ID.list — Returns a list of invitations that the requesting user is permitted to view, restricted to those that match the list request. Note: At least one of user_id or course_id must be supplied. Both fields can be supplied. This method returns the following error codes: * PERMISSION_DENIED for access errors.Registration