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