blob: 765c5aadd401ab01686f6f08688373b69e69f14e [file] [log] [blame]
Takashi Matsuo06694102015-09-11 13:55:40 -07001<html><body>
2<style>
3
4body, 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
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, 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.invitations.html">invitations</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#accept">accept(id, x__xgafv=None)</a></code></p>
Sai Cheemalapatie833b792017-03-24 15:06:46 -070079<p class="firstline">Accepts an invitation, removing it and adding the invited user to the</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070080<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#create">create(body=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatie833b792017-03-24 15:06:46 -070082<p class="firstline">Creates an invitation. Only one invitation for a user and course may exist</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070083<p class="toc_element">
84 <code><a href="#delete">delete(id, x__xgafv=None)</a></code></p>
Sai Cheemalapatie833b792017-03-24 15:06:46 -070085<p class="firstline">Deletes an invitation.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070086<p class="toc_element">
87 <code><a href="#get">get(id, x__xgafv=None)</a></code></p>
Sai Cheemalapatie833b792017-03-24 15:06:46 -070088<p class="firstline">Returns an invitation.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070089<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070090 <code><a href="#list">list(userId=None, pageToken=None, pageSize=None, courseId=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatie833b792017-03-24 15:06:46 -070091<p class="firstline">Returns a list of invitations that the requesting user is permitted to</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070092<p class="toc_element">
93 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
95<h3>Method Details</h3>
96<div class="method">
97 <code class="details" id="accept">accept(id, x__xgafv=None)</code>
Sai Cheemalapatie833b792017-03-24 15:06:46 -070098 <pre>Accepts an invitation, removing it and adding the invited user to the
99teachers or students (as appropriate) of the specified course. Only the
100invited user may accept an invitation.
101
102This method returns the following error codes:
103
104* `PERMISSION_DENIED` if the requesting user is not permitted to accept the
105requested invitation or for access errors.
106* `FAILED_PRECONDITION` for the following request errors:
107 * CourseMemberLimitReached
108 * CourseNotModifiable
109 * CourseTeacherLimitReached
110 * UserGroupsMembershipLimitReached
111* `NOT_FOUND` if no invitation exists with the requested ID.
Takashi Matsuo06694102015-09-11 13:55:40 -0700112
113Args:
114 id: string, Identifier of the invitation to accept. (required)
115 x__xgafv: string, V1 error format.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700116 Allowed values
117 1 - v1 error format
118 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700119
120Returns:
121 An object of the form:
122
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700123 { # A generic empty message that you can re-use to avoid defining duplicated
124 # empty messages in your APIs. A typical example is to use it as the request
125 # or the response type of an API method. For instance:
126 #
127 # service Foo {
128 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
129 # }
130 #
131 # The JSON representation for `Empty` is empty JSON object `{}`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700132 }</pre>
133</div>
134
135<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700136 <code class="details" id="create">create(body=None, x__xgafv=None)</code>
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700137 <pre>Creates an invitation. Only one invitation for a user and course may exist
138at a time. Delete and re-create an invitation to make changes.
139
140This method returns the following error codes:
141
142* `PERMISSION_DENIED` if the requesting user is not permitted to create
143invitations for this course or for access errors.
144* `NOT_FOUND` if the course or the user does not exist.
Bu Sun Kim65020912020-05-20 12:08:20 -0700145* `FAILED_PRECONDITION` if the requested user&#x27;s account is disabled or if
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700146the user already has this role or a role with greater permissions.
147* `ALREADY_EXISTS` if an invitation for the specified user and course
148already exists.
Takashi Matsuo06694102015-09-11 13:55:40 -0700149
150Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700151 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -0700152 The object takes the form of:
153
154{ # An invitation to join a course.
Bu Sun Kim65020912020-05-20 12:08:20 -0700155 &quot;role&quot;: &quot;A String&quot;, # Role to invite the user to have.
156 # Must not be `COURSE_ROLE_UNSPECIFIED`.
157 &quot;userId&quot;: &quot;A String&quot;, # Identifier of the invited user.
158 #
159 # When specified as a parameter of a request, this identifier can be set to
160 # one of the following:
161 #
162 # * the numeric identifier for the user
163 # * the email address of the user
164 # * the string literal `&quot;me&quot;`, indicating the requesting user
165 &quot;courseId&quot;: &quot;A String&quot;, # Identifier of the course to invite the user to.
166 &quot;id&quot;: &quot;A String&quot;, # Identifier assigned by Classroom.
167 #
168 # Read-only.
169}
Takashi Matsuo06694102015-09-11 13:55:40 -0700170
171 x__xgafv: string, V1 error format.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700172 Allowed values
173 1 - v1 error format
174 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700175
176Returns:
177 An object of the form:
178
179 { # An invitation to join a course.
Bu Sun Kim65020912020-05-20 12:08:20 -0700180 &quot;role&quot;: &quot;A String&quot;, # Role to invite the user to have.
181 # Must not be `COURSE_ROLE_UNSPECIFIED`.
182 &quot;userId&quot;: &quot;A String&quot;, # Identifier of the invited user.
183 #
184 # When specified as a parameter of a request, this identifier can be set to
185 # one of the following:
186 #
187 # * the numeric identifier for the user
188 # * the email address of the user
189 # * the string literal `&quot;me&quot;`, indicating the requesting user
190 &quot;courseId&quot;: &quot;A String&quot;, # Identifier of the course to invite the user to.
191 &quot;id&quot;: &quot;A String&quot;, # Identifier assigned by Classroom.
192 #
193 # Read-only.
194 }</pre>
Takashi Matsuo06694102015-09-11 13:55:40 -0700195</div>
196
197<div class="method">
198 <code class="details" id="delete">delete(id, x__xgafv=None)</code>
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700199 <pre>Deletes an invitation.
200
201This method returns the following error codes:
202
203* `PERMISSION_DENIED` if the requesting user is not permitted to delete the
204requested invitation or for access errors.
205* `NOT_FOUND` if no invitation exists with the requested ID.
Takashi Matsuo06694102015-09-11 13:55:40 -0700206
207Args:
208 id: string, Identifier of the invitation to delete. (required)
209 x__xgafv: string, V1 error format.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700210 Allowed values
211 1 - v1 error format
212 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700213
214Returns:
215 An object of the form:
216
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700217 { # A generic empty message that you can re-use to avoid defining duplicated
218 # empty messages in your APIs. A typical example is to use it as the request
219 # or the response type of an API method. For instance:
220 #
221 # service Foo {
222 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
223 # }
224 #
225 # The JSON representation for `Empty` is empty JSON object `{}`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700226 }</pre>
227</div>
228
229<div class="method">
230 <code class="details" id="get">get(id, x__xgafv=None)</code>
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700231 <pre>Returns an invitation.
232
233This method returns the following error codes:
234
235* `PERMISSION_DENIED` if the requesting user is not permitted to view the
236requested invitation or for access errors.
237* `NOT_FOUND` if no invitation exists with the requested ID.
Takashi Matsuo06694102015-09-11 13:55:40 -0700238
239Args:
240 id: string, Identifier of the invitation to return. (required)
241 x__xgafv: string, V1 error format.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700242 Allowed values
243 1 - v1 error format
244 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700245
246Returns:
247 An object of the form:
248
249 { # An invitation to join a course.
Bu Sun Kim65020912020-05-20 12:08:20 -0700250 &quot;role&quot;: &quot;A String&quot;, # Role to invite the user to have.
251 # Must not be `COURSE_ROLE_UNSPECIFIED`.
252 &quot;userId&quot;: &quot;A String&quot;, # Identifier of the invited user.
253 #
254 # When specified as a parameter of a request, this identifier can be set to
255 # one of the following:
256 #
257 # * the numeric identifier for the user
258 # * the email address of the user
259 # * the string literal `&quot;me&quot;`, indicating the requesting user
260 &quot;courseId&quot;: &quot;A String&quot;, # Identifier of the course to invite the user to.
261 &quot;id&quot;: &quot;A String&quot;, # Identifier assigned by Classroom.
262 #
263 # Read-only.
264 }</pre>
Takashi Matsuo06694102015-09-11 13:55:40 -0700265</div>
266
267<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700268 <code class="details" id="list">list(userId=None, pageToken=None, pageSize=None, courseId=None, x__xgafv=None)</code>
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700269 <pre>Returns a list of invitations that the requesting user is permitted to
270view, restricted to those that match the list request.
271
272*Note:* At least one of `user_id` or `course_id` must be supplied. Both
273fields can be supplied.
274
275This method returns the following error codes:
276
277* `PERMISSION_DENIED` for access errors.
Takashi Matsuo06694102015-09-11 13:55:40 -0700278
279Args:
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700280 userId: string, Restricts returned invitations to those for a specific user. The identifier
281can be one of the following:
282
283* the numeric identifier for the user
284* the email address of the user
Bu Sun Kim65020912020-05-20 12:08:20 -0700285* the string literal `&quot;me&quot;`, indicating the requesting user
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700286 pageToken: string, nextPageToken
287value returned from a previous
288list call, indicating
289that the subsequent page of results should be returned.
290
291The list request must be
292otherwise identical to the one that resulted in this token.
Bu Sun Kim65020912020-05-20 12:08:20 -0700293 pageSize: integer, Maximum number of items to return. Zero means no maximum.
294
295The server may return fewer than the specified number of results.
296 courseId: string, Restricts returned invitations to those for a course with the specified
297identifier.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700298 x__xgafv: string, V1 error format.
299 Allowed values
300 1 - v1 error format
301 2 - v2 error format
Takashi Matsuo06694102015-09-11 13:55:40 -0700302
303Returns:
304 An object of the form:
305
306 { # Response when listing invitations.
Bu Sun Kim65020912020-05-20 12:08:20 -0700307 &quot;invitations&quot;: [ # Invitations that match the list request.
Takashi Matsuo06694102015-09-11 13:55:40 -0700308 { # An invitation to join a course.
Bu Sun Kim65020912020-05-20 12:08:20 -0700309 &quot;role&quot;: &quot;A String&quot;, # Role to invite the user to have.
310 # Must not be `COURSE_ROLE_UNSPECIFIED`.
311 &quot;userId&quot;: &quot;A String&quot;, # Identifier of the invited user.
312 #
313 # When specified as a parameter of a request, this identifier can be set to
314 # one of the following:
315 #
316 # * the numeric identifier for the user
317 # * the email address of the user
318 # * the string literal `&quot;me&quot;`, indicating the requesting user
319 &quot;courseId&quot;: &quot;A String&quot;, # Identifier of the course to invite the user to.
320 &quot;id&quot;: &quot;A String&quot;, # Identifier assigned by Classroom.
321 #
322 # Read-only.
323 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700324 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700325 &quot;nextPageToken&quot;: &quot;A String&quot;, # Token identifying the next page of results to return. If empty, no further
326 # results are available.
Takashi Matsuo06694102015-09-11 13:55:40 -0700327 }</pre>
328</div>
329
330<div class="method">
331 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
332 <pre>Retrieves the next page of results.
333
334Args:
335 previous_request: The request for the previous page. (required)
336 previous_response: The response from the request for the previous page. (required)
337
338Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700339 A request object that you can call &#x27;execute()&#x27; on to request the next
Takashi Matsuo06694102015-09-11 13:55:40 -0700340 page. Returns None if there are no more items in the collection.
341 </pre>
342</div>
343
344</body></html>