Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 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.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 Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 79 | <p class="firstline">Accepts an invitation, removing it and adding the invited user to the</p> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 80 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 81 | <code><a href="#create">create(body=None, x__xgafv=None)</a></code></p> |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 82 | <p class="firstline">Creates an invitation. Only one invitation for a user and course may exist</p> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 83 | <p class="toc_element"> |
| 84 | <code><a href="#delete">delete(id, x__xgafv=None)</a></code></p> |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 85 | <p class="firstline">Deletes an invitation.</p> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 86 | <p class="toc_element"> |
| 87 | <code><a href="#get">get(id, x__xgafv=None)</a></code></p> |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 88 | <p class="firstline">Returns an invitation.</p> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 89 | <p class="toc_element"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 90 | <code><a href="#list">list(userId=None, pageToken=None, pageSize=None, courseId=None, x__xgafv=None)</a></code></p> |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 91 | <p class="firstline">Returns a list of invitations that the requesting user is permitted to</p> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 92 | <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 Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 98 | <pre>Accepts an invitation, removing it and adding the invited user to the |
| 99 | teachers or students (as appropriate) of the specified course. Only the |
| 100 | invited user may accept an invitation. |
| 101 | |
| 102 | This method returns the following error codes: |
| 103 | |
| 104 | * `PERMISSION_DENIED` if the requesting user is not permitted to accept the |
| 105 | requested 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 Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 112 | |
| 113 | Args: |
| 114 | id: string, Identifier of the invitation to accept. (required) |
| 115 | x__xgafv: string, V1 error format. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 116 | Allowed values |
| 117 | 1 - v1 error format |
| 118 | 2 - v2 error format |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 119 | |
| 120 | Returns: |
| 121 | An object of the form: |
| 122 | |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 123 | { # 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 Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 132 | }</pre> |
| 133 | </div> |
| 134 | |
| 135 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 136 | <code class="details" id="create">create(body=None, x__xgafv=None)</code> |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 137 | <pre>Creates an invitation. Only one invitation for a user and course may exist |
| 138 | at a time. Delete and re-create an invitation to make changes. |
| 139 | |
| 140 | This method returns the following error codes: |
| 141 | |
| 142 | * `PERMISSION_DENIED` if the requesting user is not permitted to create |
| 143 | invitations for this course or for access errors. |
| 144 | * `NOT_FOUND` if the course or the user does not exist. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 145 | * `FAILED_PRECONDITION` if the requested user's account is disabled or if |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 146 | the user already has this role or a role with greater permissions. |
| 147 | * `ALREADY_EXISTS` if an invitation for the specified user and course |
| 148 | already exists. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 149 | |
| 150 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 151 | body: object, The request body. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 152 | The object takes the form of: |
| 153 | |
| 154 | { # An invitation to join a course. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 155 | "role": "A String", # Role to invite the user to have. |
| 156 | # Must not be `COURSE_ROLE_UNSPECIFIED`. |
| 157 | "userId": "A String", # 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 `"me"`, indicating the requesting user |
| 165 | "courseId": "A String", # Identifier of the course to invite the user to. |
| 166 | "id": "A String", # Identifier assigned by Classroom. |
| 167 | # |
| 168 | # Read-only. |
| 169 | } |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 170 | |
| 171 | x__xgafv: string, V1 error format. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 172 | Allowed values |
| 173 | 1 - v1 error format |
| 174 | 2 - v2 error format |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 175 | |
| 176 | Returns: |
| 177 | An object of the form: |
| 178 | |
| 179 | { # An invitation to join a course. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 180 | "role": "A String", # Role to invite the user to have. |
| 181 | # Must not be `COURSE_ROLE_UNSPECIFIED`. |
| 182 | "userId": "A String", # 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 `"me"`, indicating the requesting user |
| 190 | "courseId": "A String", # Identifier of the course to invite the user to. |
| 191 | "id": "A String", # Identifier assigned by Classroom. |
| 192 | # |
| 193 | # Read-only. |
| 194 | }</pre> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 195 | </div> |
| 196 | |
| 197 | <div class="method"> |
| 198 | <code class="details" id="delete">delete(id, x__xgafv=None)</code> |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 199 | <pre>Deletes an invitation. |
| 200 | |
| 201 | This method returns the following error codes: |
| 202 | |
| 203 | * `PERMISSION_DENIED` if the requesting user is not permitted to delete the |
| 204 | requested invitation or for access errors. |
| 205 | * `NOT_FOUND` if no invitation exists with the requested ID. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 206 | |
| 207 | Args: |
| 208 | id: string, Identifier of the invitation to delete. (required) |
| 209 | x__xgafv: string, V1 error format. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 210 | Allowed values |
| 211 | 1 - v1 error format |
| 212 | 2 - v2 error format |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 213 | |
| 214 | Returns: |
| 215 | An object of the form: |
| 216 | |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 217 | { # 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 Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 226 | }</pre> |
| 227 | </div> |
| 228 | |
| 229 | <div class="method"> |
| 230 | <code class="details" id="get">get(id, x__xgafv=None)</code> |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 231 | <pre>Returns an invitation. |
| 232 | |
| 233 | This method returns the following error codes: |
| 234 | |
| 235 | * `PERMISSION_DENIED` if the requesting user is not permitted to view the |
| 236 | requested invitation or for access errors. |
| 237 | * `NOT_FOUND` if no invitation exists with the requested ID. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 238 | |
| 239 | Args: |
| 240 | id: string, Identifier of the invitation to return. (required) |
| 241 | x__xgafv: string, V1 error format. |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 242 | Allowed values |
| 243 | 1 - v1 error format |
| 244 | 2 - v2 error format |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 245 | |
| 246 | Returns: |
| 247 | An object of the form: |
| 248 | |
| 249 | { # An invitation to join a course. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 250 | "role": "A String", # Role to invite the user to have. |
| 251 | # Must not be `COURSE_ROLE_UNSPECIFIED`. |
| 252 | "userId": "A String", # 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 `"me"`, indicating the requesting user |
| 260 | "courseId": "A String", # Identifier of the course to invite the user to. |
| 261 | "id": "A String", # Identifier assigned by Classroom. |
| 262 | # |
| 263 | # Read-only. |
| 264 | }</pre> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 265 | </div> |
| 266 | |
| 267 | <div class="method"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 268 | <code class="details" id="list">list(userId=None, pageToken=None, pageSize=None, courseId=None, x__xgafv=None)</code> |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 269 | <pre>Returns a list of invitations that the requesting user is permitted to |
| 270 | view, restricted to those that match the list request. |
| 271 | |
| 272 | *Note:* At least one of `user_id` or `course_id` must be supplied. Both |
| 273 | fields can be supplied. |
| 274 | |
| 275 | This method returns the following error codes: |
| 276 | |
| 277 | * `PERMISSION_DENIED` for access errors. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 278 | |
| 279 | Args: |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 280 | userId: string, Restricts returned invitations to those for a specific user. The identifier |
| 281 | can be one of the following: |
| 282 | |
| 283 | * the numeric identifier for the user |
| 284 | * the email address of the user |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 285 | * the string literal `"me"`, indicating the requesting user |
Sai Cheemalapati | e833b79 | 2017-03-24 15:06:46 -0700 | [diff] [blame] | 286 | pageToken: string, nextPageToken |
| 287 | value returned from a previous |
| 288 | list call, indicating |
| 289 | that the subsequent page of results should be returned. |
| 290 | |
| 291 | The list request must be |
| 292 | otherwise identical to the one that resulted in this token. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 293 | pageSize: integer, Maximum number of items to return. Zero means no maximum. |
| 294 | |
| 295 | The server may return fewer than the specified number of results. |
| 296 | courseId: string, Restricts returned invitations to those for a course with the specified |
| 297 | identifier. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 298 | x__xgafv: string, V1 error format. |
| 299 | Allowed values |
| 300 | 1 - v1 error format |
| 301 | 2 - v2 error format |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 302 | |
| 303 | Returns: |
| 304 | An object of the form: |
| 305 | |
| 306 | { # Response when listing invitations. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 307 | "invitations": [ # Invitations that match the list request. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 308 | { # An invitation to join a course. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 309 | "role": "A String", # Role to invite the user to have. |
| 310 | # Must not be `COURSE_ROLE_UNSPECIFIED`. |
| 311 | "userId": "A String", # 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 `"me"`, indicating the requesting user |
| 319 | "courseId": "A String", # Identifier of the course to invite the user to. |
| 320 | "id": "A String", # Identifier assigned by Classroom. |
| 321 | # |
| 322 | # Read-only. |
| 323 | }, |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 324 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 325 | "nextPageToken": "A String", # Token identifying the next page of results to return. If empty, no further |
| 326 | # results are available. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 327 | }</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 | |
| 334 | Args: |
| 335 | previous_request: The request for the previous page. (required) |
| 336 | previous_response: The response from the request for the previous page. (required) |
| 337 | |
| 338 | Returns: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 339 | A request object that you can call 'execute()' on to request the next |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 340 | page. Returns None if there are no more items in the collection. |
| 341 | </pre> |
| 342 | </div> |
| 343 | |
| 344 | </body></html> |