Debian Codegraph @

docs/dyn/classroom_v1.courses.posts.html

raw
1 <html><body>
2 <style>
3
4 body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13 }
14
15 body {
16 font-size: 13px;
17 padding: 1em;
18 }
19
20 h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23 }
24
25 h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28 }
29
30 h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34 }
35
36 pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39 }
40
41 pre {
42 margin-top: 0.5em;
43 }
44
45 h1, h2, h3, p {
46 font-family: Arial, sans serif;
47 }
48
49 h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51 }
52
53 .toc_element {
54 margin-top: 0.5em;
55 }
56
57 .firstline {
58 margin-left: 2 em;
59 }
60
61 .method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66 }
67
68 .details {
69 font-weight: bold;
70 font-size: 14px;
71 }
72
73 </style>
74
75 <h1><a href="classroom_v1.html">Google Classroom API</a> . <a href="classroom_v1.courses.html">courses</a> . <a href="classroom_v1.courses.posts.html">posts</a></h1>
76 <h2>Instance Methods</h2>
77 <p class="toc_element">
78 <code><a href="classroom_v1.courses.posts.addOnAttachments.html">addOnAttachments()</a></code>
79 </p>
80 <p class="firstline">Returns the addOnAttachments Resource.</p>
81
82 <p class="toc_element">
83 <code><a href="#close">close()</a></code></p>
84 <p class="firstline">Close httplib2 connections.</p>
85 <p class="toc_element">
86 <code><a href="#getAddOnContext">getAddOnContext(courseId, postId, addOnToken=None, attachmentId=None, itemId=None, x__xgafv=None)</a></code></p>
87 <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/workspace/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>
88 <h3>Method Details</h3>
89 <div class="method">
90 <code class="details" id="close">close()</code>
91 <pre>Close httplib2 connections.</pre>
92 </div>
93
94 <div class="method">
95 <code class="details" id="getAddOnContext">getAddOnContext(courseId, postId, addOnToken=None, attachmentId=None, itemId=None, x__xgafv=None)</code>
96 <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/workspace/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.
97
98 Args:
99 courseId: string, Required. Identifier of the course. (required)
100 postId: string, Optional. Deprecated, use `item_id` instead. (required)
101 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.
102 attachmentId: string, Optional. The identifier of the attachment. This field is required for all requests except when the user is in the [Attachment Discovery iframe](https://developers.google.com/workspace/classroom/add-ons/get-started/iframes/attachment-discovery-iframe).
103 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.
104 x__xgafv: string, V1 error format.
105 Allowed values
106 1 - v1 error format
107 2 - v2 error format
108
109 Returns:
110 An object of the form:
111
112 { # Attachment-relevant metadata for Classroom add-ons in the context of a specific post.
113 &quot;courseId&quot;: &quot;A String&quot;, # Immutable. Identifier of the course.
114 &quot;itemId&quot;: &quot;A String&quot;, # Immutable. Identifier of the `Announcement`, `CourseWork`, or `CourseWorkMaterial` under which the attachment is attached.
115 &quot;postId&quot;: &quot;A String&quot;, # Immutable. Deprecated, use `item_id` instead.
116 &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.
117 &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`.
118 },
119 &quot;supportsStudentWork&quot;: True or False, # Optional. Whether the post allows the teacher to see student work and passback grades.
120 &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.
121 },
122 }</pre>
123 </div>
124
125 </body></html>