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.courseWorkMaterials.html">courseWorkMaterials</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#close">close()</a></code></p> 79<p class="firstline">Close httplib2 connections.</p> 80<p class="toc_element"> 81 <code><a href="#create">create(courseId, body=None, x__xgafv=None)</a></code></p> 82<p class="firstline">Creates a course work material. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, create course work material in the requested course, share a Drive attachment, or for access errors. * `INVALID_ARGUMENT` if the request is malformed or if more than 20 * materials are provided. * `NOT_FOUND` if the requested course does not exist. * `FAILED_PRECONDITION` for the following request error: * AttachmentNotVisible</p> 83<p class="toc_element"> 84 <code><a href="#delete">delete(courseId, id, x__xgafv=None)</a></code></p> 85<p class="firstline">Deletes a course work material. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work material item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding course work material, if the requesting user is not permitted to delete the requested course or for access errors. * `FAILED_PRECONDITION` if the requested course work material has already been deleted. * `NOT_FOUND` if no course exists with the requested ID.</p> 86<p class="toc_element"> 87 <code><a href="#get">get(courseId, id, x__xgafv=None)</a></code></p> 88<p class="firstline">Returns a course work material. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work material, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or course work material does not exist.</p> 89<p class="toc_element"> 90 <code><a href="#list">list(courseId, courseWorkMaterialStates=None, materialDriveId=None, materialLink=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p> 91<p class="firstline">Returns a list of course work material that the requester is permitted to view. Course students may only view `PUBLISHED` course work material. Course teachers and domain administrators may view all course work material. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist.</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<p class="toc_element"> 96 <code><a href="#patch">patch(courseId, id, body=None, updateMask=None, x__xgafv=None)</a></code></p> 97<p class="firstline">Updates one or more fields of a course work material. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `FAILED_PRECONDITION` if the requested course work material has already been deleted. * `NOT_FOUND` if the requested course or course work material does not exist</p> 98<h3>Method Details</h3> 99<div class="method"> 100 <code class="details" id="close">close()</code> 101 <pre>Close httplib2 connections.</pre> 102</div> 103 104<div class="method"> 105 <code class="details" id="create">create(courseId, body=None, x__xgafv=None)</code> 106 <pre>Creates a course work material. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, create course work material in the requested course, share a Drive attachment, or for access errors. * `INVALID_ARGUMENT` if the request is malformed or if more than 20 * materials are provided. * `NOT_FOUND` if the requested course does not exist. * `FAILED_PRECONDITION` for the following request error: * AttachmentNotVisible 107 108Args: 109 courseId: string, Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. (required) 110 body: object, The request body. 111 The object takes the form of: 112 113{ # Course work material created by a teacher for students of the course 114 "alternateLink": "A String", # Absolute link to this course work material in the Classroom web UI. This is only populated if `state` is `PUBLISHED`. Read-only. 115 "assigneeMode": "A String", # Assignee mode of the course work material. If unspecified, the default value is `ALL_STUDENTS`. 116 "courseId": "A String", # Identifier of the course. Read-only. 117 "creationTime": "A String", # Timestamp when this course work material was created. Read-only. 118 "creatorUserId": "A String", # Identifier for the user that created the course work material. Read-only. 119 "description": "A String", # Optional description of this course work material. The text must be a valid UTF-8 string containing no more than 30,000 characters. 120 "id": "A String", # Classroom-assigned identifier of this course work material, unique per course. Read-only. 121 "individualStudentsOptions": { # Assignee details about a coursework/announcement. This field is set if and only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. # Identifiers of students with access to the course work material. This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students specified in this field can see the course work material. 122 "studentIds": [ # Identifiers for the students that have access to the coursework/announcement. 123 "A String", 124 ], 125 }, 126 "materials": [ # Additional materials. A course work material must have no more than 20 material items. 127 { # Material attached to course work. When creating attachments, setting the `form` field is not supported. 128 "driveFile": { # Drive file that is used as material for course work. # Google Drive file material. 129 "driveFile": { # Representation of a Google Drive file. # Drive file details. 130 "alternateLink": "A String", # URL that can be used to access the Drive item. Read-only. 131 "id": "A String", # Drive API resource ID. 132 "thumbnailUrl": "A String", # URL of a thumbnail image of the Drive item. Read-only. 133 "title": "A String", # Title of the Drive item. Read-only. 134 }, 135 "shareMode": "A String", # Mechanism by which students access the Drive item. 136 }, 137 "form": { # Google Forms item. # Google Forms material. 138 "formUrl": "A String", # URL of the form. 139 "responseUrl": "A String", # URL of the form responses document. Only set if respsonses have been recorded and only when the requesting user is an editor of the form. Read-only. 140 "thumbnailUrl": "A String", # URL of a thumbnail image of the Form. Read-only. 141 "title": "A String", # Title of the Form. Read-only. 142 }, 143 "link": { # URL item. # Link material. On creation, this is upgraded to a more appropriate type if possible, and this is reflected in the response. 144 "thumbnailUrl": "A String", # URL of a thumbnail image of the target URL. Read-only. 145 "title": "A String", # Title of the target of the URL. Read-only. 146 "url": "A String", # URL to link to. This must be a valid UTF-8 string containing between 1 and 2024 characters. 147 }, 148 "youtubeVideo": { # YouTube video item. # YouTube video material. 149 "alternateLink": "A String", # URL that can be used to view the YouTube video. Read-only. 150 "id": "A String", # YouTube API resource ID. 151 "thumbnailUrl": "A String", # URL of a thumbnail image of the YouTube video. Read-only. 152 "title": "A String", # Title of the YouTube video. Read-only. 153 }, 154 }, 155 ], 156 "scheduledTime": "A String", # Optional timestamp when this course work material is scheduled to be published. 157 "state": "A String", # Status of this course work material. If unspecified, the default state is `DRAFT`. 158 "title": "A String", # Title of this course work material. The title must be a valid UTF-8 string containing between 1 and 3000 characters. 159 "topicId": "A String", # Identifier for the topic that this course work material is associated with. Must match an existing topic in the course. 160 "updateTime": "A String", # Timestamp of the most recent change to this course work material. Read-only. 161} 162 163 x__xgafv: string, V1 error format. 164 Allowed values 165 1 - v1 error format 166 2 - v2 error format 167 168Returns: 169 An object of the form: 170 171 { # Course work material created by a teacher for students of the course 172 "alternateLink": "A String", # Absolute link to this course work material in the Classroom web UI. This is only populated if `state` is `PUBLISHED`. Read-only. 173 "assigneeMode": "A String", # Assignee mode of the course work material. If unspecified, the default value is `ALL_STUDENTS`. 174 "courseId": "A String", # Identifier of the course. Read-only. 175 "creationTime": "A String", # Timestamp when this course work material was created. Read-only. 176 "creatorUserId": "A String", # Identifier for the user that created the course work material. Read-only. 177 "description": "A String", # Optional description of this course work material. The text must be a valid UTF-8 string containing no more than 30,000 characters. 178 "id": "A String", # Classroom-assigned identifier of this course work material, unique per course. Read-only. 179 "individualStudentsOptions": { # Assignee details about a coursework/announcement. This field is set if and only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. # Identifiers of students with access to the course work material. This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students specified in this field can see the course work material. 180 "studentIds": [ # Identifiers for the students that have access to the coursework/announcement. 181 "A String", 182 ], 183 }, 184 "materials": [ # Additional materials. A course work material must have no more than 20 material items. 185 { # Material attached to course work. When creating attachments, setting the `form` field is not supported. 186 "driveFile": { # Drive file that is used as material for course work. # Google Drive file material. 187 "driveFile": { # Representation of a Google Drive file. # Drive file details. 188 "alternateLink": "A String", # URL that can be used to access the Drive item. Read-only. 189 "id": "A String", # Drive API resource ID. 190 "thumbnailUrl": "A String", # URL of a thumbnail image of the Drive item. Read-only. 191 "title": "A String", # Title of the Drive item. Read-only. 192 }, 193 "shareMode": "A String", # Mechanism by which students access the Drive item. 194 }, 195 "form": { # Google Forms item. # Google Forms material. 196 "formUrl": "A String", # URL of the form. 197 "responseUrl": "A String", # URL of the form responses document. Only set if respsonses have been recorded and only when the requesting user is an editor of the form. Read-only. 198 "thumbnailUrl": "A String", # URL of a thumbnail image of the Form. Read-only. 199 "title": "A String", # Title of the Form. Read-only. 200 }, 201 "link": { # URL item. # Link material. On creation, this is upgraded to a more appropriate type if possible, and this is reflected in the response. 202 "thumbnailUrl": "A String", # URL of a thumbnail image of the target URL. Read-only. 203 "title": "A String", # Title of the target of the URL. Read-only. 204 "url": "A String", # URL to link to. This must be a valid UTF-8 string containing between 1 and 2024 characters. 205 }, 206 "youtubeVideo": { # YouTube video item. # YouTube video material. 207 "alternateLink": "A String", # URL that can be used to view the YouTube video. Read-only. 208 "id": "A String", # YouTube API resource ID. 209 "thumbnailUrl": "A String", # URL of a thumbnail image of the YouTube video. Read-only. 210 "title": "A String", # Title of the YouTube video. Read-only. 211 }, 212 }, 213 ], 214 "scheduledTime": "A String", # Optional timestamp when this course work material is scheduled to be published. 215 "state": "A String", # Status of this course work material. If unspecified, the default state is `DRAFT`. 216 "title": "A String", # Title of this course work material. The title must be a valid UTF-8 string containing between 1 and 3000 characters. 217 "topicId": "A String", # Identifier for the topic that this course work material is associated with. Must match an existing topic in the course. 218 "updateTime": "A String", # Timestamp of the most recent change to this course work material. Read-only. 219}</pre> 220</div> 221 222<div class="method"> 223 <code class="details" id="delete">delete(courseId, id, x__xgafv=None)</code> 224 <pre>Deletes a course work material. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course work material item. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding course work material, if the requesting user is not permitted to delete the requested course or for access errors. * `FAILED_PRECONDITION` if the requested course work material has already been deleted. * `NOT_FOUND` if no course exists with the requested ID. 225 226Args: 227 courseId: string, Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. (required) 228 id: string, Identifier of the course work material to delete. This identifier is a Classroom-assigned identifier. (required) 229 x__xgafv: string, V1 error format. 230 Allowed values 231 1 - v1 error format 232 2 - v2 error format 233 234Returns: 235 An object of the form: 236 237 { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`. 238}</pre> 239</div> 240 241<div class="method"> 242 <code class="details" id="get">get(courseId, id, x__xgafv=None)</code> 243 <pre>Returns a course work material. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or course work material, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or course work material does not exist. 244 245Args: 246 courseId: string, Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. (required) 247 id: string, Identifier of the course work material. (required) 248 x__xgafv: string, V1 error format. 249 Allowed values 250 1 - v1 error format 251 2 - v2 error format 252 253Returns: 254 An object of the form: 255 256 { # Course work material created by a teacher for students of the course 257 "alternateLink": "A String", # Absolute link to this course work material in the Classroom web UI. This is only populated if `state` is `PUBLISHED`. Read-only. 258 "assigneeMode": "A String", # Assignee mode of the course work material. If unspecified, the default value is `ALL_STUDENTS`. 259 "courseId": "A String", # Identifier of the course. Read-only. 260 "creationTime": "A String", # Timestamp when this course work material was created. Read-only. 261 "creatorUserId": "A String", # Identifier for the user that created the course work material. Read-only. 262 "description": "A String", # Optional description of this course work material. The text must be a valid UTF-8 string containing no more than 30,000 characters. 263 "id": "A String", # Classroom-assigned identifier of this course work material, unique per course. Read-only. 264 "individualStudentsOptions": { # Assignee details about a coursework/announcement. This field is set if and only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. # Identifiers of students with access to the course work material. This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students specified in this field can see the course work material. 265 "studentIds": [ # Identifiers for the students that have access to the coursework/announcement. 266 "A String", 267 ], 268 }, 269 "materials": [ # Additional materials. A course work material must have no more than 20 material items. 270 { # Material attached to course work. When creating attachments, setting the `form` field is not supported. 271 "driveFile": { # Drive file that is used as material for course work. # Google Drive file material. 272 "driveFile": { # Representation of a Google Drive file. # Drive file details. 273 "alternateLink": "A String", # URL that can be used to access the Drive item. Read-only. 274 "id": "A String", # Drive API resource ID. 275 "thumbnailUrl": "A String", # URL of a thumbnail image of the Drive item. Read-only. 276 "title": "A String", # Title of the Drive item. Read-only. 277 }, 278 "shareMode": "A String", # Mechanism by which students access the Drive item. 279 }, 280 "form": { # Google Forms item. # Google Forms material. 281 "formUrl": "A String", # URL of the form. 282 "responseUrl": "A String", # URL of the form responses document. Only set if respsonses have been recorded and only when the requesting user is an editor of the form. Read-only. 283 "thumbnailUrl": "A String", # URL of a thumbnail image of the Form. Read-only. 284 "title": "A String", # Title of the Form. Read-only. 285 }, 286 "link": { # URL item. # Link material. On creation, this is upgraded to a more appropriate type if possible, and this is reflected in the response. 287 "thumbnailUrl": "A String", # URL of a thumbnail image of the target URL. Read-only. 288 "title": "A String", # Title of the target of the URL. Read-only. 289 "url": "A String", # URL to link to. This must be a valid UTF-8 string containing between 1 and 2024 characters. 290 }, 291 "youtubeVideo": { # YouTube video item. # YouTube video material. 292 "alternateLink": "A String", # URL that can be used to view the YouTube video. Read-only. 293 "id": "A String", # YouTube API resource ID. 294 "thumbnailUrl": "A String", # URL of a thumbnail image of the YouTube video. Read-only. 295 "title": "A String", # Title of the YouTube video. Read-only. 296 }, 297 }, 298 ], 299 "scheduledTime": "A String", # Optional timestamp when this course work material is scheduled to be published. 300 "state": "A String", # Status of this course work material. If unspecified, the default state is `DRAFT`. 301 "title": "A String", # Title of this course work material. The title must be a valid UTF-8 string containing between 1 and 3000 characters. 302 "topicId": "A String", # Identifier for the topic that this course work material is associated with. Must match an existing topic in the course. 303 "updateTime": "A String", # Timestamp of the most recent change to this course work material. Read-only. 304}</pre> 305</div> 306 307<div class="method"> 308 <code class="details" id="list">list(courseId, courseWorkMaterialStates=None, materialDriveId=None, materialLink=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)</code> 309 <pre>Returns a list of course work material that the requester is permitted to view. Course students may only view `PUBLISHED` course work material. Course teachers and domain administrators may view all course work material. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist. 310 311Args: 312 courseId: string, Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. (required) 313 courseWorkMaterialStates: string, Restriction on the work status to return. Only course work material that matches is returned. If unspecified, items with a work status of `PUBLISHED` is returned. (repeated) 314 Allowed values 315 COURSEWORK_MATERIAL_STATE_UNSPECIFIED - No state specified. This is never returned. 316 PUBLISHED - Status for course work material that has been published. This is the default state. 317 DRAFT - Status for an course work material that is not yet published. Course work material in this state is visible only to course teachers and domain administrators. 318 DELETED - Status for course work material that was published but is now deleted. Course work material in this state is visible only to course teachers and domain administrators. Course work material in this state is deleted after some time. 319 materialDriveId: string, Optional filtering for course work material with at least one Drive material whose ID matches the provided string. If `material_link` is also specified, course work material must have materials matching both filters. 320 materialLink: string, Optional filtering for course work material with at least one link material whose URL partially matches the provided string. 321 orderBy: string, Optional sort ordering for results. A comma-separated list of fields with an optional sort direction keyword. Supported field is `updateTime`. Supported direction keywords are `asc` and `desc`. If not specified, `updateTime desc` is the default behavior. Examples: `updateTime asc`, `updateTime` 322 pageSize: integer, Maximum number of items to return. Zero or unspecified indicates that the server may assign a maximum. The server may return fewer than the specified number of results. 323 pageToken: string, nextPageToken value returned from a previous list call, indicating that the subsequent page of results should be returned. The list request must be otherwise identical to the one that resulted in this token. 324 x__xgafv: string, V1 error format. 325 Allowed values 326 1 - v1 error format 327 2 - v2 error format 328 329Returns: 330 An object of the form: 331 332 { # Response when listing course work material. 333 "courseWorkMaterial": [ # Course work material items that match the request. 334 { # Course work material created by a teacher for students of the course 335 "alternateLink": "A String", # Absolute link to this course work material in the Classroom web UI. This is only populated if `state` is `PUBLISHED`. Read-only. 336 "assigneeMode": "A String", # Assignee mode of the course work material. If unspecified, the default value is `ALL_STUDENTS`. 337 "courseId": "A String", # Identifier of the course. Read-only. 338 "creationTime": "A String", # Timestamp when this course work material was created. Read-only. 339 "creatorUserId": "A String", # Identifier for the user that created the course work material. Read-only. 340 "description": "A String", # Optional description of this course work material. The text must be a valid UTF-8 string containing no more than 30,000 characters. 341 "id": "A String", # Classroom-assigned identifier of this course work material, unique per course. Read-only. 342 "individualStudentsOptions": { # Assignee details about a coursework/announcement. This field is set if and only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. # Identifiers of students with access to the course work material. This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students specified in this field can see the course work material. 343 "studentIds": [ # Identifiers for the students that have access to the coursework/announcement. 344 "A String", 345 ], 346 }, 347 "materials": [ # Additional materials. A course work material must have no more than 20 material items. 348 { # Material attached to course work. When creating attachments, setting the `form` field is not supported. 349 "driveFile": { # Drive file that is used as material for course work. # Google Drive file material. 350 "driveFile": { # Representation of a Google Drive file. # Drive file details. 351 "alternateLink": "A String", # URL that can be used to access the Drive item. Read-only. 352 "id": "A String", # Drive API resource ID. 353 "thumbnailUrl": "A String", # URL of a thumbnail image of the Drive item. Read-only. 354 "title": "A String", # Title of the Drive item. Read-only. 355 }, 356 "shareMode": "A String", # Mechanism by which students access the Drive item. 357 }, 358 "form": { # Google Forms item. # Google Forms material. 359 "formUrl": "A String", # URL of the form. 360 "responseUrl": "A String", # URL of the form responses document. Only set if respsonses have been recorded and only when the requesting user is an editor of the form. Read-only. 361 "thumbnailUrl": "A String", # URL of a thumbnail image of the Form. Read-only. 362 "title": "A String", # Title of the Form. Read-only. 363 }, 364 "link": { # URL item. # Link material. On creation, this is upgraded to a more appropriate type if possible, and this is reflected in the response. 365 "thumbnailUrl": "A String", # URL of a thumbnail image of the target URL. Read-only. 366 "title": "A String", # Title of the target of the URL. Read-only. 367 "url": "A String", # URL to link to. This must be a valid UTF-8 string containing between 1 and 2024 characters. 368 }, 369 "youtubeVideo": { # YouTube video item. # YouTube video material. 370 "alternateLink": "A String", # URL that can be used to view the YouTube video. Read-only. 371 "id": "A String", # YouTube API resource ID. 372 "thumbnailUrl": "A String", # URL of a thumbnail image of the YouTube video. Read-only. 373 "title": "A String", # Title of the YouTube video. Read-only. 374 }, 375 }, 376 ], 377 "scheduledTime": "A String", # Optional timestamp when this course work material is scheduled to be published. 378 "state": "A String", # Status of this course work material. If unspecified, the default state is `DRAFT`. 379 "title": "A String", # Title of this course work material. The title must be a valid UTF-8 string containing between 1 and 3000 characters. 380 "topicId": "A String", # Identifier for the topic that this course work material is associated with. Must match an existing topic in the course. 381 "updateTime": "A String", # Timestamp of the most recent change to this course work material. Read-only. 382 }, 383 ], 384 "nextPageToken": "A String", # Token identifying the next page of results to return. If empty, no further results are available. 385}</pre> 386</div> 387 388<div class="method"> 389 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 390 <pre>Retrieves the next page of results. 391 392Args: 393 previous_request: The request for the previous page. (required) 394 previous_response: The response from the request for the previous page. (required) 395 396Returns: 397 A request object that you can call 'execute()' on to request the next 398 page. Returns None if there are no more items in the collection. 399 </pre> 400</div> 401 402<div class="method"> 403 <code class="details" id="patch">patch(courseId, id, body=None, updateMask=None, x__xgafv=None)</code> 404 <pre>Updates one or more fields of a course work material. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `FAILED_PRECONDITION` if the requested course work material has already been deleted. * `NOT_FOUND` if the requested course or course work material does not exist 405 406Args: 407 courseId: string, Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. (required) 408 id: string, Identifier of the course work material. (required) 409 body: object, The request body. 410 The object takes the form of: 411 412{ # Course work material created by a teacher for students of the course 413 "alternateLink": "A String", # Absolute link to this course work material in the Classroom web UI. This is only populated if `state` is `PUBLISHED`. Read-only. 414 "assigneeMode": "A String", # Assignee mode of the course work material. If unspecified, the default value is `ALL_STUDENTS`. 415 "courseId": "A String", # Identifier of the course. Read-only. 416 "creationTime": "A String", # Timestamp when this course work material was created. Read-only. 417 "creatorUserId": "A String", # Identifier for the user that created the course work material. Read-only. 418 "description": "A String", # Optional description of this course work material. The text must be a valid UTF-8 string containing no more than 30,000 characters. 419 "id": "A String", # Classroom-assigned identifier of this course work material, unique per course. Read-only. 420 "individualStudentsOptions": { # Assignee details about a coursework/announcement. This field is set if and only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. # Identifiers of students with access to the course work material. This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students specified in this field can see the course work material. 421 "studentIds": [ # Identifiers for the students that have access to the coursework/announcement. 422 "A String", 423 ], 424 }, 425 "materials": [ # Additional materials. A course work material must have no more than 20 material items. 426 { # Material attached to course work. When creating attachments, setting the `form` field is not supported. 427 "driveFile": { # Drive file that is used as material for course work. # Google Drive file material. 428 "driveFile": { # Representation of a Google Drive file. # Drive file details. 429 "alternateLink": "A String", # URL that can be used to access the Drive item. Read-only. 430 "id": "A String", # Drive API resource ID. 431 "thumbnailUrl": "A String", # URL of a thumbnail image of the Drive item. Read-only. 432 "title": "A String", # Title of the Drive item. Read-only. 433 }, 434 "shareMode": "A String", # Mechanism by which students access the Drive item. 435 }, 436 "form": { # Google Forms item. # Google Forms material. 437 "formUrl": "A String", # URL of the form. 438 "responseUrl": "A String", # URL of the form responses document. Only set if respsonses have been recorded and only when the requesting user is an editor of the form. Read-only. 439 "thumbnailUrl": "A String", # URL of a thumbnail image of the Form. Read-only. 440 "title": "A String", # Title of the Form. Read-only. 441 }, 442 "link": { # URL item. # Link material. On creation, this is upgraded to a more appropriate type if possible, and this is reflected in the response. 443 "thumbnailUrl": "A String", # URL of a thumbnail image of the target URL. Read-only. 444 "title": "A String", # Title of the target of the URL. Read-only. 445 "url": "A String", # URL to link to. This must be a valid UTF-8 string containing between 1 and 2024 characters. 446 }, 447 "youtubeVideo": { # YouTube video item. # YouTube video material. 448 "alternateLink": "A String", # URL that can be used to view the YouTube video. Read-only. 449 "id": "A String", # YouTube API resource ID. 450 "thumbnailUrl": "A String", # URL of a thumbnail image of the YouTube video. Read-only. 451 "title": "A String", # Title of the YouTube video. Read-only. 452 }, 453 }, 454 ], 455 "scheduledTime": "A String", # Optional timestamp when this course work material is scheduled to be published. 456 "state": "A String", # Status of this course work material. If unspecified, the default state is `DRAFT`. 457 "title": "A String", # Title of this course work material. The title must be a valid UTF-8 string containing between 1 and 3000 characters. 458 "topicId": "A String", # Identifier for the topic that this course work material is associated with. Must match an existing topic in the course. 459 "updateTime": "A String", # Timestamp of the most recent change to this course work material. Read-only. 460} 461 462 updateMask: string, Mask that identifies which fields on the course work material to update. This field is required to do an update. The update fails if invalid fields are specified. If a field supports empty values, it can be cleared by specifying it in the update mask and not in the course work material object. If a field that does not support empty values is included in the update mask and not set in the course work material object, an `INVALID_ARGUMENT` error is returned. The following fields may be specified by teachers: * `title` * `description` * `state` * `scheduled_time` * `topic_id` 463 x__xgafv: string, V1 error format. 464 Allowed values 465 1 - v1 error format 466 2 - v2 error format 467 468Returns: 469 An object of the form: 470 471 { # Course work material created by a teacher for students of the course 472 "alternateLink": "A String", # Absolute link to this course work material in the Classroom web UI. This is only populated if `state` is `PUBLISHED`. Read-only. 473 "assigneeMode": "A String", # Assignee mode of the course work material. If unspecified, the default value is `ALL_STUDENTS`. 474 "courseId": "A String", # Identifier of the course. Read-only. 475 "creationTime": "A String", # Timestamp when this course work material was created. Read-only. 476 "creatorUserId": "A String", # Identifier for the user that created the course work material. Read-only. 477 "description": "A String", # Optional description of this course work material. The text must be a valid UTF-8 string containing no more than 30,000 characters. 478 "id": "A String", # Classroom-assigned identifier of this course work material, unique per course. Read-only. 479 "individualStudentsOptions": { # Assignee details about a coursework/announcement. This field is set if and only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. # Identifiers of students with access to the course work material. This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students specified in this field can see the course work material. 480 "studentIds": [ # Identifiers for the students that have access to the coursework/announcement. 481 "A String", 482 ], 483 }, 484 "materials": [ # Additional materials. A course work material must have no more than 20 material items. 485 { # Material attached to course work. When creating attachments, setting the `form` field is not supported. 486 "driveFile": { # Drive file that is used as material for course work. # Google Drive file material. 487 "driveFile": { # Representation of a Google Drive file. # Drive file details. 488 "alternateLink": "A String", # URL that can be used to access the Drive item. Read-only. 489 "id": "A String", # Drive API resource ID. 490 "thumbnailUrl": "A String", # URL of a thumbnail image of the Drive item. Read-only. 491 "title": "A String", # Title of the Drive item. Read-only. 492 }, 493 "shareMode": "A String", # Mechanism by which students access the Drive item. 494 }, 495 "form": { # Google Forms item. # Google Forms material. 496 "formUrl": "A String", # URL of the form. 497 "responseUrl": "A String", # URL of the form responses document. Only set if respsonses have been recorded and only when the requesting user is an editor of the form. Read-only. 498 "thumbnailUrl": "A String", # URL of a thumbnail image of the Form. Read-only. 499 "title": "A String", # Title of the Form. Read-only. 500 }, 501 "link": { # URL item. # Link material. On creation, this is upgraded to a more appropriate type if possible, and this is reflected in the response. 502 "thumbnailUrl": "A String", # URL of a thumbnail image of the target URL. Read-only. 503 "title": "A String", # Title of the target of the URL. Read-only. 504 "url": "A String", # URL to link to. This must be a valid UTF-8 string containing between 1 and 2024 characters. 505 }, 506 "youtubeVideo": { # YouTube video item. # YouTube video material. 507 "alternateLink": "A String", # URL that can be used to view the YouTube video. Read-only. 508 "id": "A String", # YouTube API resource ID. 509 "thumbnailUrl": "A String", # URL of a thumbnail image of the YouTube video. Read-only. 510 "title": "A String", # Title of the YouTube video. Read-only. 511 }, 512 }, 513 ], 514 "scheduledTime": "A String", # Optional timestamp when this course work material is scheduled to be published. 515 "state": "A String", # Status of this course work material. If unspecified, the default state is `DRAFT`. 516 "title": "A String", # Title of this course work material. The title must be a valid UTF-8 string containing between 1 and 3000 characters. 517 "topicId": "A String", # Identifier for the topic that this course work material is associated with. Must match an existing topic in the course. 518 "updateTime": "A String", # Timestamp of the most recent change to this course work material. Read-only. 519}</pre> 520</div> 521 522</body></html>