Skip to content

Commit 64f950c

Browse files
feat(classroom): update the api
#### classroom:v1 The following keys were added: - resources.courses.resources.announcements.methods.getAddOnContext (Total Keys: 19) - resources.courses.resources.announcements.resources.addOnAttachments.methods.create (Total Keys: 18) - resources.courses.resources.announcements.resources.addOnAttachments.methods.delete (Total Keys: 18) - resources.courses.resources.announcements.resources.addOnAttachments.methods.get (Total Keys: 18) - resources.courses.resources.announcements.resources.addOnAttachments.methods.list (Total Keys: 20) - resources.courses.resources.announcements.resources.addOnAttachments.methods.patch (Total Keys: 21) - resources.courses.resources.courseWork.methods.getAddOnContext (Total Keys: 19) - resources.courses.resources.courseWork.resources.addOnAttachments.methods.create (Total Keys: 18) - resources.courses.resources.courseWork.resources.addOnAttachments.methods.delete (Total Keys: 18) - resources.courses.resources.courseWork.resources.addOnAttachments.methods.get (Total Keys: 18) - resources.courses.resources.courseWork.resources.addOnAttachments.methods.list (Total Keys: 20) - resources.courses.resources.courseWork.resources.addOnAttachments.methods.patch (Total Keys: 21) - resources.courses.resources.courseWork.resources.addOnAttachments.resources.studentSubmissions.methods.get (Total Keys: 22) - resources.courses.resources.courseWork.resources.addOnAttachments.resources.studentSubmissions.methods.patch (Total Keys: 25) - resources.courses.resources.courseWorkMaterials.methods.getAddOnContext (Total Keys: 19) - resources.courses.resources.courseWorkMaterials.resources.addOnAttachments.methods.create (Total Keys: 18) - resources.courses.resources.courseWorkMaterials.resources.addOnAttachments.methods.delete (Total Keys: 18) - resources.courses.resources.courseWorkMaterials.resources.addOnAttachments.methods.get (Total Keys: 18) - resources.courses.resources.courseWorkMaterials.resources.addOnAttachments.methods.list (Total Keys: 20) - resources.courses.resources.courseWorkMaterials.resources.addOnAttachments.methods.patch (Total Keys: 21) - resources.courses.resources.posts.methods.getAddOnContext (Total Keys: 18) - resources.courses.resources.posts.resources.addOnAttachments.methods.create (Total Keys: 17) - resources.courses.resources.posts.resources.addOnAttachments.methods.delete (Total Keys: 17) - resources.courses.resources.posts.resources.addOnAttachments.methods.get (Total Keys: 17) - resources.courses.resources.posts.resources.addOnAttachments.methods.list (Total Keys: 19) - resources.courses.resources.posts.resources.addOnAttachments.methods.patch (Total Keys: 21) - resources.courses.resources.posts.resources.addOnAttachments.resources.studentSubmissions.methods.get (Total Keys: 21) - resources.courses.resources.posts.resources.addOnAttachments.resources.studentSubmissions.methods.patch (Total Keys: 24) - schemas.AddOnAttachment (Total Keys: 22) - schemas.AddOnContext (Total Keys: 9) - schemas.CopyHistory (Total Keys: 7) - schemas.EmbedUri (Total Keys: 3) - schemas.ListAddOnAttachmentsResponse (Total Keys: 5) - schemas.StudentContext (Total Keys: 3) - schemas.TeacherContext (Total Keys: 2)
1 parent 6e68c87 commit 64f950c

12 files changed

+3950
-121
lines changed

docs/dyn/classroom_v1.courses.announcements.addOnAttachments.html

Lines changed: 446 additions & 0 deletions
Large diffs are not rendered by default.

docs/dyn/classroom_v1.courses.announcements.html

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@
7474

7575
<h1><a href="classroom_v1.html">Google Classroom API</a> . <a href="classroom_v1.courses.html">courses</a> . <a href="classroom_v1.courses.announcements.html">announcements</a></h1>
7676
<h2>Instance Methods</h2>
77+
<p class="toc_element">
78+
<code><a href="classroom_v1.courses.announcements.addOnAttachments.html">addOnAttachments()</a></code>
79+
</p>
80+
<p class="firstline">Returns the addOnAttachments Resource.</p>
81+
7782
<p class="toc_element">
7883
<code><a href="#close">close()</a></code></p>
7984
<p class="firstline">Close httplib2 connections.</p>
@@ -86,6 +91,9 @@ <h2>Instance Methods</h2>
8691
<p class="toc_element">
8792
<code><a href="#get">get(courseId, id, x__xgafv=None)</a></code></p>
8893
<p class="firstline">Returns an announcement. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or announcement, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or announcement does not exist.</p>
94+
<p class="toc_element">
95+
<code><a href="#getAddOnContext">getAddOnContext(courseId, itemId, addOnToken=None, attachmentId=None, postId=None, x__xgafv=None)</a></code></p>
96+
<p class="firstline">Gets metadata for Classroom add-ons in the context of a specific post. To maintain the integrity of its own data and permissions model, an add-on should call this to validate query parameters and the requesting user's role whenever the add-on is opened in an [iframe](https://developers.google.com/classroom/add-ons/get-started/iframes/iframes-overview). This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist.</p>
8997
<p class="toc_element">
9098
<code><a href="#list">list(courseId, announcementStates=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
9199
<p class="firstline">Returns a list of announcements that the requester is permitted to view. Course students may only view `PUBLISHED` announcements. Course teachers and domain administrators may view all announcements. 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. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist.</p>
@@ -301,6 +309,37 @@ <h3>Method Details</h3>
301309
}</pre>
302310
</div>
303311

312+
<div class="method">
313+
<code class="details" id="getAddOnContext">getAddOnContext(courseId, itemId, addOnToken=None, attachmentId=None, postId=None, x__xgafv=None)</code>
314+
<pre>Gets metadata for Classroom add-ons in the context of a specific post. To maintain the integrity of its own data and permissions model, an add-on should call this to validate query parameters and the requesting user&#x27;s role whenever the add-on is opened in an [iframe](https://developers.google.com/classroom/add-ons/get-started/iframes/iframes-overview). This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist.
315+
316+
Args:
317+
courseId: string, Required. Identifier of the course. (required)
318+
itemId: string, Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id. (required)
319+
addOnToken: string, Optional. Token that authorizes the request. The token is passed as a query parameter when the user is redirected from Classroom to the add-on&#x27;s URL. The authorization token is required when neither of the following is true: * The add-on has attachments on the post. * The developer project issuing the request is the same project that created the post.
320+
attachmentId: string, Optional. The identifier of the attachment. This field is required for student users and optional for teacher users. If not provided in the student case, an error is returned.
321+
postId: string, Optional. Deprecated, use item_id instead.
322+
x__xgafv: string, V1 error format.
323+
Allowed values
324+
1 - v1 error format
325+
2 - v2 error format
326+
327+
Returns:
328+
An object of the form:
329+
330+
{ # Attachment-relevant metadata for Classroom add-ons in the context of a specific post.
331+
&quot;courseId&quot;: &quot;A String&quot;, # Immutable. Identifier of the course.
332+
&quot;itemId&quot;: &quot;A String&quot;, # Immutable. Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached.
333+
&quot;postId&quot;: &quot;A String&quot;, # Immutable. Deprecated, use item_id instead.
334+
&quot;studentContext&quot;: { # Role-specific context if the requesting user is a student. # Add-on context corresponding to the requesting user&#x27;s role as a student. Its presence implies that the requesting user is a student in the course.
335+
&quot;submissionId&quot;: &quot;A String&quot;, # Requesting user&#x27;s submission id to be used for grade passback and to identify the student when showing student work to the teacher. This is set exactly when `supportsStudentWork` is `true`.
336+
},
337+
&quot;supportsStudentWork&quot;: True or False, # Optional. Whether the post allows the teacher to see student work and passback grades.
338+
&quot;teacherContext&quot;: { # Role-specific context if the requesting user is a teacher. # Add-on context corresponding to the requesting user&#x27;s role as a teacher. Its presence implies that the requesting user is a teacher in the course.
339+
},
340+
}</pre>
341+
</div>
342+
304343
<div class="method">
305344
<code class="details" id="list">list(courseId, announcementStates=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
306345
<pre>Returns a list of announcements that the requester is permitted to view. Course students may only view `PUBLISHED` announcements. Course teachers and domain administrators may view all announcements. 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. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist.

0 commit comments

Comments
 (0)