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.courses.html">courses</a> . <a href="classroom_v1.courses.teachers.html">teachers</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#create">create(courseId, body, x__xgafv=None)</a></code></p> 79<p class="firstline">Creates a teacher of a course.</p> 80<p class="toc_element"> 81 <code><a href="#delete">delete(courseId, userId, x__xgafv=None)</a></code></p> 82<p class="firstline">Deletes a teacher of a course.</p> 83<p class="toc_element"> 84 <code><a href="#get">get(courseId, userId, x__xgafv=None)</a></code></p> 85<p class="firstline">Returns a teacher of a course.</p> 86<p class="toc_element"> 87 <code><a href="#list">list(courseId, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p> 88<p class="firstline">Returns a list of teachers of this course that the requester</p> 89<p class="toc_element"> 90 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> 91<p class="firstline">Retrieves the next page of results.</p> 92<h3>Method Details</h3> 93<div class="method"> 94 <code class="details" id="create">create(courseId, body, x__xgafv=None)</code> 95 <pre>Creates a teacher of a course. 96 97This method returns the following error codes: 98 99* `PERMISSION_DENIED` if the requesting user is not permitted to create 100teachers in this course or for access errors. 101* `NOT_FOUND` if the requested course ID does not exist. 102* `FAILED_PRECONDITION` if the requested user's account is disabled, 103for the following request errors: 104 * CourseMemberLimitReached 105 * CourseNotModifiable 106 * CourseTeacherLimitReached 107 * UserGroupsMembershipLimitReached 108* `ALREADY_EXISTS` if the user is already a teacher or student in the 109course. 110 111Args: 112 courseId: string, Identifier of the course. 113This identifier can be either the Classroom-assigned identifier or an 114alias. (required) 115 body: object, The request body. (required) 116 The object takes the form of: 117 118{ # Teacher of a course. 119 "courseId": "A String", # Identifier of the course. 120 # 121 # Read-only. 122 "profile": { # Global information for a user. # Global user information for the teacher. 123 # 124 # Read-only. 125 "name": { # Details of the user's name. # Name of the user. 126 # 127 # Read-only. 128 "fullName": "A String", # The user's full name formed by concatenating the first and last name 129 # values. 130 # 131 # Read-only. 132 "givenName": "A String", # The user's first name. 133 # 134 # Read-only. 135 "familyName": "A String", # The user's last name. 136 # 137 # Read-only. 138 }, 139 "photoUrl": "A String", # URL of user's profile photo. 140 # 141 # Read-only. 142 "emailAddress": "A String", # Email address of the user. 143 # 144 # Read-only. 145 "verifiedTeacher": True or False, # Represents whether a G Suite for Education user's domain administrator has 146 # explicitly verified them as being a teacher. If the user is not a member of 147 # a G Suite for Education domain, than this field will always be false. 148 # 149 # Read-only 150 "id": "A String", # Identifier of the user. 151 # 152 # Read-only. 153 "permissions": [ # Global permissions of the user. 154 # 155 # Read-only. 156 { # Global user permission description. 157 "permission": "A String", # Permission value. 158 }, 159 ], 160 }, 161 "userId": "A String", # Identifier of the user. 162 # 163 # When specified as a parameter of a request, this identifier can be one of 164 # the following: 165 # 166 # * the numeric identifier for the user 167 # * the email address of the user 168 # * the string literal `"me"`, indicating the requesting user 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 { # Teacher of a course. 180 "courseId": "A String", # Identifier of the course. 181 # 182 # Read-only. 183 "profile": { # Global information for a user. # Global user information for the teacher. 184 # 185 # Read-only. 186 "name": { # Details of the user's name. # Name of the user. 187 # 188 # Read-only. 189 "fullName": "A String", # The user's full name formed by concatenating the first and last name 190 # values. 191 # 192 # Read-only. 193 "givenName": "A String", # The user's first name. 194 # 195 # Read-only. 196 "familyName": "A String", # The user's last name. 197 # 198 # Read-only. 199 }, 200 "photoUrl": "A String", # URL of user's profile photo. 201 # 202 # Read-only. 203 "emailAddress": "A String", # Email address of the user. 204 # 205 # Read-only. 206 "verifiedTeacher": True or False, # Represents whether a G Suite for Education user's domain administrator has 207 # explicitly verified them as being a teacher. If the user is not a member of 208 # a G Suite for Education domain, than this field will always be false. 209 # 210 # Read-only 211 "id": "A String", # Identifier of the user. 212 # 213 # Read-only. 214 "permissions": [ # Global permissions of the user. 215 # 216 # Read-only. 217 { # Global user permission description. 218 "permission": "A String", # Permission value. 219 }, 220 ], 221 }, 222 "userId": "A String", # Identifier of the user. 223 # 224 # When specified as a parameter of a request, this identifier can be one of 225 # the following: 226 # 227 # * the numeric identifier for the user 228 # * the email address of the user 229 # * the string literal `"me"`, indicating the requesting user 230 }</pre> 231</div> 232 233<div class="method"> 234 <code class="details" id="delete">delete(courseId, userId, x__xgafv=None)</code> 235 <pre>Deletes a teacher of a course. 236 237This method returns the following error codes: 238 239* `PERMISSION_DENIED` if the requesting user is not permitted to delete 240teachers of this course or for access errors. 241* `NOT_FOUND` if no teacher of this course has the requested ID or if the 242course does not exist. 243* `FAILED_PRECONDITION` if the requested ID belongs to the primary teacher 244of this course. 245 246Args: 247 courseId: string, Identifier of the course. 248This identifier can be either the Classroom-assigned identifier or an 249alias. (required) 250 userId: string, Identifier of the teacher to delete. The identifier can be one of the 251following: 252 253* the numeric identifier for the user 254* the email address of the user 255* the string literal `"me"`, indicating the requesting user (required) 256 x__xgafv: string, V1 error format. 257 Allowed values 258 1 - v1 error format 259 2 - v2 error format 260 261Returns: 262 An object of the form: 263 264 { # A generic empty message that you can re-use to avoid defining duplicated 265 # empty messages in your APIs. A typical example is to use it as the request 266 # or the response type of an API method. For instance: 267 # 268 # service Foo { 269 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); 270 # } 271 # 272 # The JSON representation for `Empty` is empty JSON object `{}`. 273 }</pre> 274</div> 275 276<div class="method"> 277 <code class="details" id="get">get(courseId, userId, x__xgafv=None)</code> 278 <pre>Returns a teacher of a course. 279 280This method returns the following error codes: 281 282* `PERMISSION_DENIED` if the requesting user is not permitted to view 283teachers of this course or for access errors. 284* `NOT_FOUND` if no teacher of this course has the requested ID or if the 285course does not exist. 286 287Args: 288 courseId: string, Identifier of the course. 289This identifier can be either the Classroom-assigned identifier or an 290alias. (required) 291 userId: string, Identifier of the teacher to return. The identifier can be one of the 292following: 293 294* the numeric identifier for the user 295* the email address of the user 296* the string literal `"me"`, indicating the requesting user (required) 297 x__xgafv: string, V1 error format. 298 Allowed values 299 1 - v1 error format 300 2 - v2 error format 301 302Returns: 303 An object of the form: 304 305 { # Teacher of a course. 306 "courseId": "A String", # Identifier of the course. 307 # 308 # Read-only. 309 "profile": { # Global information for a user. # Global user information for the teacher. 310 # 311 # Read-only. 312 "name": { # Details of the user's name. # Name of the user. 313 # 314 # Read-only. 315 "fullName": "A String", # The user's full name formed by concatenating the first and last name 316 # values. 317 # 318 # Read-only. 319 "givenName": "A String", # The user's first name. 320 # 321 # Read-only. 322 "familyName": "A String", # The user's last name. 323 # 324 # Read-only. 325 }, 326 "photoUrl": "A String", # URL of user's profile photo. 327 # 328 # Read-only. 329 "emailAddress": "A String", # Email address of the user. 330 # 331 # Read-only. 332 "verifiedTeacher": True or False, # Represents whether a G Suite for Education user's domain administrator has 333 # explicitly verified them as being a teacher. If the user is not a member of 334 # a G Suite for Education domain, than this field will always be false. 335 # 336 # Read-only 337 "id": "A String", # Identifier of the user. 338 # 339 # Read-only. 340 "permissions": [ # Global permissions of the user. 341 # 342 # Read-only. 343 { # Global user permission description. 344 "permission": "A String", # Permission value. 345 }, 346 ], 347 }, 348 "userId": "A String", # Identifier of the user. 349 # 350 # When specified as a parameter of a request, this identifier can be one of 351 # the following: 352 # 353 # * the numeric identifier for the user 354 # * the email address of the user 355 # * the string literal `"me"`, indicating the requesting user 356 }</pre> 357</div> 358 359<div class="method"> 360 <code class="details" id="list">list(courseId, pageSize=None, pageToken=None, x__xgafv=None)</code> 361 <pre>Returns a list of teachers of this course that the requester 362is permitted to view. 363 364This method returns the following error codes: 365 366* `NOT_FOUND` if the course does not exist. 367* `PERMISSION_DENIED` for access errors. 368 369Args: 370 courseId: string, Identifier of the course. 371This identifier can be either the Classroom-assigned identifier or an 372alias. (required) 373 pageSize: integer, Maximum number of items to return. Zero means no maximum. 374 375The server may return fewer than the specified number of results. 376 pageToken: string, nextPageToken 377value returned from a previous 378list call, indicating that 379the subsequent page of results should be returned. 380 381The list request must be 382otherwise identical to the one that resulted in this token. 383 x__xgafv: string, V1 error format. 384 Allowed values 385 1 - v1 error format 386 2 - v2 error format 387 388Returns: 389 An object of the form: 390 391 { # Response when listing teachers. 392 "nextPageToken": "A String", # Token identifying the next page of results to return. If empty, no further 393 # results are available. 394 "teachers": [ # Teachers who match the list request. 395 { # Teacher of a course. 396 "courseId": "A String", # Identifier of the course. 397 # 398 # Read-only. 399 "profile": { # Global information for a user. # Global user information for the teacher. 400 # 401 # Read-only. 402 "name": { # Details of the user's name. # Name of the user. 403 # 404 # Read-only. 405 "fullName": "A String", # The user's full name formed by concatenating the first and last name 406 # values. 407 # 408 # Read-only. 409 "givenName": "A String", # The user's first name. 410 # 411 # Read-only. 412 "familyName": "A String", # The user's last name. 413 # 414 # Read-only. 415 }, 416 "photoUrl": "A String", # URL of user's profile photo. 417 # 418 # Read-only. 419 "emailAddress": "A String", # Email address of the user. 420 # 421 # Read-only. 422 "verifiedTeacher": True or False, # Represents whether a G Suite for Education user's domain administrator has 423 # explicitly verified them as being a teacher. If the user is not a member of 424 # a G Suite for Education domain, than this field will always be false. 425 # 426 # Read-only 427 "id": "A String", # Identifier of the user. 428 # 429 # Read-only. 430 "permissions": [ # Global permissions of the user. 431 # 432 # Read-only. 433 { # Global user permission description. 434 "permission": "A String", # Permission value. 435 }, 436 ], 437 }, 438 "userId": "A String", # Identifier of the user. 439 # 440 # When specified as a parameter of a request, this identifier can be one of 441 # the following: 442 # 443 # * the numeric identifier for the user 444 # * the email address of the user 445 # * the string literal `"me"`, indicating the requesting user 446 }, 447 ], 448 }</pre> 449</div> 450 451<div class="method"> 452 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 453 <pre>Retrieves the next page of results. 454 455Args: 456 previous_request: The request for the previous page. (required) 457 previous_response: The response from the request for the previous page. (required) 458 459Returns: 460 A request object that you can call 'execute()' on to request the next 461 page. Returns None if there are no more items in the collection. 462 </pre> 463</div> 464 465</body></html>