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> 79 <p class="firstline">Accepts an invitation, removing it and adding the invited user to the</p> 80 <p class="toc_element"> 81 <code><a href="#create">create(body, x__xgafv=None)</a></code></p> 82 <p class="firstline">Creates an invitation. Only one invitation for a user and course may exist</p> 83 <p class="toc_element"> 84 <code><a href="#delete">delete(id, x__xgafv=None)</a></code></p> 85 <p class="firstline">Deletes an invitation.</p> 86 <p class="toc_element"> 87 <code><a href="#get">get(id, x__xgafv=None)</a></code></p> 88 <p class="firstline">Returns an invitation.</p> 89 <p class="toc_element"> 90 <code><a href="#list">list(pageSize=None, courseId=None, userId=None, x__xgafv=None, pageToken=None)</a></code></p> 91 <p class="firstline">Returns a list of invitations that the requesting user is permitted to</p> 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> 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. 112 113 Args: 114 id: string, Identifier of the invitation to accept. (required) 115 x__xgafv: string, V1 error format. 116 Allowed values 117 1 - v1 error format 118 2 - v2 error format 119 120 Returns: 121 An object of the form: 122 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 `{}`. 132 }</pre> 133 </div> 134 135 <div class="method"> 136 <code class="details" id="create">create(body, x__xgafv=None)</code> 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. 145 * `FAILED_PRECONDITION` if the requested user's account is disabled or if 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. 149 150 Args: 151 body: object, The request body. (required) 152 The object takes the form of: 153 154 { # An invitation to join a course. 155 "courseId": "A String", # Identifier of the course to invite the user to. 156 "role": "A String", # Role to invite the user to have. 157 # Must not be `COURSE_ROLE_UNSPECIFIED`. 158 "userId": "A String", # Identifier of the invited user. 159 # 160 # When specified as a parameter of a request, this identifier can be set to 161 # one of the following: 162 # 163 # * the numeric identifier for the user 164 # * the email address of the user 165 # * the string literal `"me"`, indicating the requesting user 166 "id": "A String", # Identifier assigned by Classroom. 167 # 168 # Read-only. 169 } 170 171 x__xgafv: string, V1 error format. 172 Allowed values 173 1 - v1 error format 174 2 - v2 error format 175 176 Returns: 177 An object of the form: 178 179 { # An invitation to join a course. 180 "courseId": "A String", # Identifier of the course to invite the user to. 181 "role": "A String", # Role to invite the user to have. 182 # Must not be `COURSE_ROLE_UNSPECIFIED`. 183 "userId": "A String", # Identifier of the invited user. 184 # 185 # When specified as a parameter of a request, this identifier can be set to 186 # one of the following: 187 # 188 # * the numeric identifier for the user 189 # * the email address of the user 190 # * the string literal `"me"`, indicating the requesting user 191 "id": "A String", # Identifier assigned by Classroom. 192 # 193 # Read-only. 194 }</pre> 195 </div> 196 197 <div class="method"> 198 <code class="details" id="delete">delete(id, x__xgafv=None)</code> 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. 206 207 Args: 208 id: string, Identifier of the invitation to delete. (required) 209 x__xgafv: string, V1 error format. 210 Allowed values 211 1 - v1 error format 212 2 - v2 error format 213 214 Returns: 215 An object of the form: 216 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 `{}`. 226 }</pre> 227 </div> 228 229 <div class="method"> 230 <code class="details" id="get">get(id, x__xgafv=None)</code> 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. 238 239 Args: 240 id: string, Identifier of the invitation to return. (required) 241 x__xgafv: string, V1 error format. 242 Allowed values 243 1 - v1 error format 244 2 - v2 error format 245 246 Returns: 247 An object of the form: 248 249 { # An invitation to join a course. 250 "courseId": "A String", # Identifier of the course to invite the user to. 251 "role": "A String", # Role to invite the user to have. 252 # Must not be `COURSE_ROLE_UNSPECIFIED`. 253 "userId": "A String", # Identifier of the invited user. 254 # 255 # When specified as a parameter of a request, this identifier can be set to 256 # one of the following: 257 # 258 # * the numeric identifier for the user 259 # * the email address of the user 260 # * the string literal `"me"`, indicating the requesting user 261 "id": "A String", # Identifier assigned by Classroom. 262 # 263 # Read-only. 264 }</pre> 265 </div> 266 267 <div class="method"> 268 <code class="details" id="list">list(pageSize=None, courseId=None, userId=None, x__xgafv=None, pageToken=None)</code> 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. 278 279 Args: 280 pageSize: integer, Maximum number of items to return. Zero means no maximum. 281 282 The server may return fewer than the specified number of results. 283 courseId: string, Restricts returned invitations to those for a course with the specified 284 identifier. 285 userId: string, Restricts returned invitations to those for a specific user. The identifier 286 can be one of the following: 287 288 * the numeric identifier for the user 289 * the email address of the user 290 * the string literal `"me"`, indicating the requesting user 291 x__xgafv: string, V1 error format. 292 Allowed values 293 1 - v1 error format 294 2 - v2 error format 295 pageToken: string, nextPageToken 296 value returned from a previous 297 list call, indicating 298 that the subsequent page of results should be returned. 299 300 The list request must be 301 otherwise identical to the one that resulted in this token. 302 303 Returns: 304 An object of the form: 305 306 { # Response when listing invitations. 307 "nextPageToken": "A String", # Token identifying the next page of results to return. If empty, no further 308 # results are available. 309 "invitations": [ # Invitations that match the list request. 310 { # An invitation to join a course. 311 "courseId": "A String", # Identifier of the course to invite the user to. 312 "role": "A String", # Role to invite the user to have. 313 # Must not be `COURSE_ROLE_UNSPECIFIED`. 314 "userId": "A String", # Identifier of the invited user. 315 # 316 # When specified as a parameter of a request, this identifier can be set to 317 # one of the following: 318 # 319 # * the numeric identifier for the user 320 # * the email address of the user 321 # * the string literal `"me"`, indicating the requesting user 322 "id": "A String", # Identifier assigned by Classroom. 323 # 324 # Read-only. 325 }, 326 ], 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: 339 A request object that you can call 'execute()' on to request the next 340 page. Returns None if there are no more items in the collection. 341 </pre> 342 </div> 343 344 </body></html>