1<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> 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, pageToken=None, x__xgafv=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 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. 112 113Args: 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 120Returns: 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 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. 145* `FAILED_PRECONDITION` if the requested user's account is disabled or if 146the 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. 149 150Args: 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 "userId": "A String", # Identifier of the invited user. 157 # 158 # When specified as a parameter of a request, this identifier can be set to 159 # one of the following: 160 # 161 # * the numeric identifier for the user 162 # * the email address of the user 163 # * the string literal `"me"`, indicating the requesting user 164 "role": "A String", # Role to invite the user to have. 165 # Must not be `COURSE_ROLE_UNSPECIFIED`. 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 176Returns: 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 "userId": "A String", # Identifier of the invited user. 182 # 183 # When specified as a parameter of a request, this identifier can be set to 184 # one of the following: 185 # 186 # * the numeric identifier for the user 187 # * the email address of the user 188 # * the string literal `"me"`, indicating the requesting user 189 "role": "A String", # Role to invite the user to have. 190 # Must not be `COURSE_ROLE_UNSPECIFIED`. 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 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. 206 207Args: 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 214Returns: 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 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. 238 239Args: 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 246Returns: 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 "userId": "A String", # Identifier of the invited user. 252 # 253 # When specified as a parameter of a request, this identifier can be set to 254 # one of the following: 255 # 256 # * the numeric identifier for the user 257 # * the email address of the user 258 # * the string literal `"me"`, indicating the requesting user 259 "role": "A String", # Role to invite the user to have. 260 # Must not be `COURSE_ROLE_UNSPECIFIED`. 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, pageToken=None, x__xgafv=None)</code> 269 <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. 278 279Args: 280 pageSize: integer, Maximum number of items to return. Zero means no maximum. 281 282The server may return fewer than the specified number of results. 283 courseId: string, Restricts returned invitations to those for a course with the specified 284identifier. 285 userId: string, Restricts returned invitations to those for a specific user. The identifier 286can 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 pageToken: string, nextPageToken 292value returned from a previous 293list call, indicating 294that the subsequent page of results should be returned. 295 296The list request must be 297otherwise identical to the one that resulted in this token. 298 x__xgafv: string, V1 error format. 299 Allowed values 300 1 - v1 error format 301 2 - v2 error format 302 303Returns: 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 "userId": "A String", # Identifier of the invited user. 313 # 314 # When specified as a parameter of a request, this identifier can be set to 315 # one of the following: 316 # 317 # * the numeric identifier for the user 318 # * the email address of the user 319 # * the string literal `"me"`, indicating the requesting user 320 "role": "A String", # Role to invite the user to have. 321 # Must not be `COURSE_ROLE_UNSPECIFIED`. 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 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: 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>