Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 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.courses.html">courses</a> . <a href="classroom_v1.courses.announcements.html">announcements</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 78 | <code><a href="#create">create(courseId, body=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 79 | <p class="firstline">Creates an announcement.</p> |
| 80 | <p class="toc_element"> |
| 81 | <code><a href="#delete">delete(courseId, id, x__xgafv=None)</a></code></p> |
| 82 | <p class="firstline">Deletes an announcement.</p> |
| 83 | <p class="toc_element"> |
| 84 | <code><a href="#get">get(courseId, id, x__xgafv=None)</a></code></p> |
| 85 | <p class="firstline">Returns an announcement.</p> |
| 86 | <p class="toc_element"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 87 | <code><a href="#list">list(courseId, announcementStates=None, orderBy=None, pageToken=None, pageSize=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 88 | <p class="firstline">Returns a list of announcements that the requester is permitted to view.</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 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 93 | <code><a href="#modifyAssignees">modifyAssignees(courseId, id, body=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 94 | <p class="firstline">Modifies assignee mode and options of an announcement.</p> |
| 95 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 96 | <code><a href="#patch">patch(courseId, id, body=None, updateMask=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 97 | <p class="firstline">Updates one or more fields of an announcement.</p> |
| 98 | <h3>Method Details</h3> |
| 99 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 100 | <code class="details" id="create">create(courseId, body=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 101 | <pre>Creates an announcement. |
| 102 | |
| 103 | This method returns the following error codes: |
| 104 | |
| 105 | * `PERMISSION_DENIED` if the requesting user is not permitted to access the |
| 106 | requested course, create announcements in the requested course, share a |
| 107 | Drive attachment, or for access errors. |
| 108 | * `INVALID_ARGUMENT` if the request is malformed. |
| 109 | * `NOT_FOUND` if the requested course does not exist. |
| 110 | * `FAILED_PRECONDITION` for the following request error: |
| 111 | * AttachmentNotVisible |
| 112 | |
| 113 | Args: |
| 114 | courseId: string, Identifier of the course. |
| 115 | This identifier can be either the Classroom-assigned identifier or an |
| 116 | alias. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 117 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 118 | The object takes the form of: |
| 119 | |
| 120 | { # Announcement created by a teacher for students of the course |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 121 | "materials": [ # Additional materials. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 122 | # |
| 123 | # Announcements must have no more than 20 material items. |
| 124 | { # Material attached to course work. |
| 125 | # |
| 126 | # When creating attachments, setting the `form` field is not supported. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 127 | "form": { # Google Forms item. # Google Forms material. |
| 128 | "title": "A String", # Title of the Form. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 129 | # |
| 130 | # Read-only. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 131 | "thumbnailUrl": "A String", # URL of a thumbnail image of the Form. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 132 | # |
| 133 | # Read-only. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 134 | "responseUrl": "A String", # URL of the form responses document. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 135 | # Only set if respsonses have been recorded and only when the |
| 136 | # requesting user is an editor of the form. |
| 137 | # |
| 138 | # Read-only. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 139 | "formUrl": "A String", # URL of the form. |
| 140 | }, |
| 141 | "link": { # URL item. # Link material. On creation, this is upgraded to a more appropriate type |
| 142 | # if possible, and this is reflected in the response. |
| 143 | "url": "A String", # URL to link to. |
| 144 | # This must be a valid UTF-8 string containing between 1 and 2024 characters. |
| 145 | "title": "A String", # Title of the target of the URL. |
| 146 | # |
| 147 | # Read-only. |
| 148 | "thumbnailUrl": "A String", # URL of a thumbnail image of the target URL. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 149 | # |
| 150 | # Read-only. |
| 151 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 152 | "youtubeVideo": { # YouTube video item. # YouTube video material. |
| 153 | "alternateLink": "A String", # URL that can be used to view the YouTube video. |
| 154 | # |
| 155 | # Read-only. |
| 156 | "thumbnailUrl": "A String", # URL of a thumbnail image of the YouTube video. |
| 157 | # |
| 158 | # Read-only. |
| 159 | "id": "A String", # YouTube API resource ID. |
| 160 | "title": "A String", # Title of the YouTube video. |
| 161 | # |
| 162 | # Read-only. |
| 163 | }, |
| 164 | "driveFile": { # Drive file that is used as material for course work. # Google Drive file material. |
| 165 | "driveFile": { # Representation of a Google Drive file. # Drive file details. |
| 166 | "title": "A String", # Title of the Drive item. |
| 167 | # |
| 168 | # Read-only. |
| 169 | "alternateLink": "A String", # URL that can be used to access the Drive item. |
| 170 | # |
| 171 | # Read-only. |
| 172 | "thumbnailUrl": "A String", # URL of a thumbnail image of the Drive item. |
| 173 | # |
| 174 | # Read-only. |
| 175 | "id": "A String", # Drive API resource ID. |
| 176 | }, |
| 177 | "shareMode": "A String", # Mechanism by which students access the Drive item. |
| 178 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 179 | }, |
| 180 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 181 | "updateTime": "A String", # Timestamp of the most recent change to this announcement. |
| 182 | # |
| 183 | # Read-only. |
| 184 | "assigneeMode": "A String", # Assignee mode of the announcement. |
| 185 | # If unspecified, the default value is `ALL_STUDENTS`. |
| 186 | "alternateLink": "A String", # Absolute link to this announcement in the Classroom web UI. |
| 187 | # This is only populated if `state` is `PUBLISHED`. |
| 188 | # |
| 189 | # Read-only. |
| 190 | "scheduledTime": "A String", # Optional timestamp when this announcement is scheduled to be published. |
| 191 | "creationTime": "A String", # Timestamp when this announcement was created. |
| 192 | # |
| 193 | # Read-only. |
| 194 | "individualStudentsOptions": { # Assignee details about a coursework/announcement. # Identifiers of students with access to the announcement. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 195 | # This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. |
| 196 | # If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 197 | # specified in this field can see the announcement. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 198 | # This field is set if and only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 199 | "studentIds": [ # Identifiers for the students that have access to the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 200 | # coursework/announcement. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 201 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 202 | ], |
| 203 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 204 | "creatorUserId": "A String", # Identifier for the user that created the announcement. |
| 205 | # |
| 206 | # Read-only. |
| 207 | "state": "A String", # Status of this announcement. |
| 208 | # If unspecified, the default state is `DRAFT`. |
| 209 | "text": "A String", # Description of this announcement. |
| 210 | # The text must be a valid UTF-8 string containing no more |
| 211 | # than 30,000 characters. |
| 212 | "courseId": "A String", # Identifier of the course. |
| 213 | # |
| 214 | # Read-only. |
| 215 | "id": "A String", # Classroom-assigned identifier of this announcement, unique per course. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 216 | # |
| 217 | # Read-only. |
| 218 | } |
| 219 | |
| 220 | x__xgafv: string, V1 error format. |
| 221 | Allowed values |
| 222 | 1 - v1 error format |
| 223 | 2 - v2 error format |
| 224 | |
| 225 | Returns: |
| 226 | An object of the form: |
| 227 | |
| 228 | { # Announcement created by a teacher for students of the course |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 229 | "materials": [ # Additional materials. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 230 | # |
| 231 | # Announcements must have no more than 20 material items. |
| 232 | { # Material attached to course work. |
| 233 | # |
| 234 | # When creating attachments, setting the `form` field is not supported. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 235 | "form": { # Google Forms item. # Google Forms material. |
| 236 | "title": "A String", # Title of the Form. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 237 | # |
| 238 | # Read-only. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 239 | "thumbnailUrl": "A String", # URL of a thumbnail image of the Form. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 240 | # |
| 241 | # Read-only. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 242 | "responseUrl": "A String", # URL of the form responses document. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 243 | # Only set if respsonses have been recorded and only when the |
| 244 | # requesting user is an editor of the form. |
| 245 | # |
| 246 | # Read-only. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 247 | "formUrl": "A String", # URL of the form. |
| 248 | }, |
| 249 | "link": { # URL item. # Link material. On creation, this is upgraded to a more appropriate type |
| 250 | # if possible, and this is reflected in the response. |
| 251 | "url": "A String", # URL to link to. |
| 252 | # This must be a valid UTF-8 string containing between 1 and 2024 characters. |
| 253 | "title": "A String", # Title of the target of the URL. |
| 254 | # |
| 255 | # Read-only. |
| 256 | "thumbnailUrl": "A String", # URL of a thumbnail image of the target URL. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 257 | # |
| 258 | # Read-only. |
| 259 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 260 | "youtubeVideo": { # YouTube video item. # YouTube video material. |
| 261 | "alternateLink": "A String", # URL that can be used to view the YouTube video. |
| 262 | # |
| 263 | # Read-only. |
| 264 | "thumbnailUrl": "A String", # URL of a thumbnail image of the YouTube video. |
| 265 | # |
| 266 | # Read-only. |
| 267 | "id": "A String", # YouTube API resource ID. |
| 268 | "title": "A String", # Title of the YouTube video. |
| 269 | # |
| 270 | # Read-only. |
| 271 | }, |
| 272 | "driveFile": { # Drive file that is used as material for course work. # Google Drive file material. |
| 273 | "driveFile": { # Representation of a Google Drive file. # Drive file details. |
| 274 | "title": "A String", # Title of the Drive item. |
| 275 | # |
| 276 | # Read-only. |
| 277 | "alternateLink": "A String", # URL that can be used to access the Drive item. |
| 278 | # |
| 279 | # Read-only. |
| 280 | "thumbnailUrl": "A String", # URL of a thumbnail image of the Drive item. |
| 281 | # |
| 282 | # Read-only. |
| 283 | "id": "A String", # Drive API resource ID. |
| 284 | }, |
| 285 | "shareMode": "A String", # Mechanism by which students access the Drive item. |
| 286 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 287 | }, |
| 288 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 289 | "updateTime": "A String", # Timestamp of the most recent change to this announcement. |
| 290 | # |
| 291 | # Read-only. |
| 292 | "assigneeMode": "A String", # Assignee mode of the announcement. |
| 293 | # If unspecified, the default value is `ALL_STUDENTS`. |
| 294 | "alternateLink": "A String", # Absolute link to this announcement in the Classroom web UI. |
| 295 | # This is only populated if `state` is `PUBLISHED`. |
| 296 | # |
| 297 | # Read-only. |
| 298 | "scheduledTime": "A String", # Optional timestamp when this announcement is scheduled to be published. |
| 299 | "creationTime": "A String", # Timestamp when this announcement was created. |
| 300 | # |
| 301 | # Read-only. |
| 302 | "individualStudentsOptions": { # Assignee details about a coursework/announcement. # Identifiers of students with access to the announcement. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 303 | # This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. |
| 304 | # If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 305 | # specified in this field can see the announcement. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 306 | # This field is set if and only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 307 | "studentIds": [ # Identifiers for the students that have access to the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 308 | # coursework/announcement. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 309 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 310 | ], |
| 311 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 312 | "creatorUserId": "A String", # Identifier for the user that created the announcement. |
| 313 | # |
| 314 | # Read-only. |
| 315 | "state": "A String", # Status of this announcement. |
| 316 | # If unspecified, the default state is `DRAFT`. |
| 317 | "text": "A String", # Description of this announcement. |
| 318 | # The text must be a valid UTF-8 string containing no more |
| 319 | # than 30,000 characters. |
| 320 | "courseId": "A String", # Identifier of the course. |
| 321 | # |
| 322 | # Read-only. |
| 323 | "id": "A String", # Classroom-assigned identifier of this announcement, unique per course. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 324 | # |
| 325 | # Read-only. |
| 326 | }</pre> |
| 327 | </div> |
| 328 | |
| 329 | <div class="method"> |
| 330 | <code class="details" id="delete">delete(courseId, id, x__xgafv=None)</code> |
| 331 | <pre>Deletes an announcement. |
| 332 | |
| 333 | This request must be made by the Developer Console project of the |
| 334 | [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to |
| 335 | create the corresponding announcement item. |
| 336 | |
| 337 | This method returns the following error codes: |
| 338 | |
| 339 | * `PERMISSION_DENIED` if the requesting developer project did not create |
| 340 | the corresponding announcement, if the requesting user is not permitted |
| 341 | to delete the requested course or for access errors. |
| 342 | * `FAILED_PRECONDITION` if the requested announcement has already been |
| 343 | deleted. |
| 344 | * `NOT_FOUND` if no course exists with the requested ID. |
| 345 | |
| 346 | Args: |
| 347 | courseId: string, Identifier of the course. |
| 348 | This identifier can be either the Classroom-assigned identifier or an |
| 349 | alias. (required) |
| 350 | id: string, Identifier of the announcement to delete. |
| 351 | This identifier is a Classroom-assigned identifier. (required) |
| 352 | x__xgafv: string, V1 error format. |
| 353 | Allowed values |
| 354 | 1 - v1 error format |
| 355 | 2 - v2 error format |
| 356 | |
| 357 | Returns: |
| 358 | An object of the form: |
| 359 | |
| 360 | { # A generic empty message that you can re-use to avoid defining duplicated |
| 361 | # empty messages in your APIs. A typical example is to use it as the request |
| 362 | # or the response type of an API method. For instance: |
| 363 | # |
| 364 | # service Foo { |
| 365 | # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
| 366 | # } |
| 367 | # |
| 368 | # The JSON representation for `Empty` is empty JSON object `{}`. |
| 369 | }</pre> |
| 370 | </div> |
| 371 | |
| 372 | <div class="method"> |
| 373 | <code class="details" id="get">get(courseId, id, x__xgafv=None)</code> |
| 374 | <pre>Returns an announcement. |
| 375 | |
| 376 | This method returns the following error codes: |
| 377 | |
| 378 | * `PERMISSION_DENIED` if the requesting user is not permitted to access the |
| 379 | requested course or announcement, or for access errors. |
| 380 | * `INVALID_ARGUMENT` if the request is malformed. |
| 381 | * `NOT_FOUND` if the requested course or announcement does not exist. |
| 382 | |
| 383 | Args: |
| 384 | courseId: string, Identifier of the course. |
| 385 | This identifier can be either the Classroom-assigned identifier or an |
| 386 | alias. (required) |
| 387 | id: string, Identifier of the announcement. (required) |
| 388 | x__xgafv: string, V1 error format. |
| 389 | Allowed values |
| 390 | 1 - v1 error format |
| 391 | 2 - v2 error format |
| 392 | |
| 393 | Returns: |
| 394 | An object of the form: |
| 395 | |
| 396 | { # Announcement created by a teacher for students of the course |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 397 | "materials": [ # Additional materials. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 398 | # |
| 399 | # Announcements must have no more than 20 material items. |
| 400 | { # Material attached to course work. |
| 401 | # |
| 402 | # When creating attachments, setting the `form` field is not supported. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 403 | "form": { # Google Forms item. # Google Forms material. |
| 404 | "title": "A String", # Title of the Form. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 405 | # |
| 406 | # Read-only. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 407 | "thumbnailUrl": "A String", # URL of a thumbnail image of the Form. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 408 | # |
| 409 | # Read-only. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 410 | "responseUrl": "A String", # URL of the form responses document. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 411 | # Only set if respsonses have been recorded and only when the |
| 412 | # requesting user is an editor of the form. |
| 413 | # |
| 414 | # Read-only. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 415 | "formUrl": "A String", # URL of the form. |
| 416 | }, |
| 417 | "link": { # URL item. # Link material. On creation, this is upgraded to a more appropriate type |
| 418 | # if possible, and this is reflected in the response. |
| 419 | "url": "A String", # URL to link to. |
| 420 | # This must be a valid UTF-8 string containing between 1 and 2024 characters. |
| 421 | "title": "A String", # Title of the target of the URL. |
| 422 | # |
| 423 | # Read-only. |
| 424 | "thumbnailUrl": "A String", # URL of a thumbnail image of the target URL. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 425 | # |
| 426 | # Read-only. |
| 427 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 428 | "youtubeVideo": { # YouTube video item. # YouTube video material. |
| 429 | "alternateLink": "A String", # URL that can be used to view the YouTube video. |
| 430 | # |
| 431 | # Read-only. |
| 432 | "thumbnailUrl": "A String", # URL of a thumbnail image of the YouTube video. |
| 433 | # |
| 434 | # Read-only. |
| 435 | "id": "A String", # YouTube API resource ID. |
| 436 | "title": "A String", # Title of the YouTube video. |
| 437 | # |
| 438 | # Read-only. |
| 439 | }, |
| 440 | "driveFile": { # Drive file that is used as material for course work. # Google Drive file material. |
| 441 | "driveFile": { # Representation of a Google Drive file. # Drive file details. |
| 442 | "title": "A String", # Title of the Drive item. |
| 443 | # |
| 444 | # Read-only. |
| 445 | "alternateLink": "A String", # URL that can be used to access the Drive item. |
| 446 | # |
| 447 | # Read-only. |
| 448 | "thumbnailUrl": "A String", # URL of a thumbnail image of the Drive item. |
| 449 | # |
| 450 | # Read-only. |
| 451 | "id": "A String", # Drive API resource ID. |
| 452 | }, |
| 453 | "shareMode": "A String", # Mechanism by which students access the Drive item. |
| 454 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 455 | }, |
| 456 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 457 | "updateTime": "A String", # Timestamp of the most recent change to this announcement. |
| 458 | # |
| 459 | # Read-only. |
| 460 | "assigneeMode": "A String", # Assignee mode of the announcement. |
| 461 | # If unspecified, the default value is `ALL_STUDENTS`. |
| 462 | "alternateLink": "A String", # Absolute link to this announcement in the Classroom web UI. |
| 463 | # This is only populated if `state` is `PUBLISHED`. |
| 464 | # |
| 465 | # Read-only. |
| 466 | "scheduledTime": "A String", # Optional timestamp when this announcement is scheduled to be published. |
| 467 | "creationTime": "A String", # Timestamp when this announcement was created. |
| 468 | # |
| 469 | # Read-only. |
| 470 | "individualStudentsOptions": { # Assignee details about a coursework/announcement. # Identifiers of students with access to the announcement. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 471 | # This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. |
| 472 | # If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 473 | # specified in this field can see the announcement. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 474 | # This field is set if and only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 475 | "studentIds": [ # Identifiers for the students that have access to the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 476 | # coursework/announcement. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 477 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 478 | ], |
| 479 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 480 | "creatorUserId": "A String", # Identifier for the user that created the announcement. |
| 481 | # |
| 482 | # Read-only. |
| 483 | "state": "A String", # Status of this announcement. |
| 484 | # If unspecified, the default state is `DRAFT`. |
| 485 | "text": "A String", # Description of this announcement. |
| 486 | # The text must be a valid UTF-8 string containing no more |
| 487 | # than 30,000 characters. |
| 488 | "courseId": "A String", # Identifier of the course. |
| 489 | # |
| 490 | # Read-only. |
| 491 | "id": "A String", # Classroom-assigned identifier of this announcement, unique per course. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 492 | # |
| 493 | # Read-only. |
| 494 | }</pre> |
| 495 | </div> |
| 496 | |
| 497 | <div class="method"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 498 | <code class="details" id="list">list(courseId, announcementStates=None, orderBy=None, pageToken=None, pageSize=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 499 | <pre>Returns a list of announcements that the requester is permitted to view. |
| 500 | |
| 501 | Course students may only view `PUBLISHED` announcements. Course teachers |
| 502 | and domain administrators may view all announcements. |
| 503 | |
| 504 | This method returns the following error codes: |
| 505 | |
| 506 | * `PERMISSION_DENIED` if the requesting user is not permitted to access |
| 507 | the requested course or for access errors. |
| 508 | * `INVALID_ARGUMENT` if the request is malformed. |
| 509 | * `NOT_FOUND` if the requested course does not exist. |
| 510 | |
| 511 | Args: |
| 512 | courseId: string, Identifier of the course. |
| 513 | This identifier can be either the Classroom-assigned identifier or an |
| 514 | alias. (required) |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 515 | announcementStates: string, Restriction on the `state` of announcements returned. |
| 516 | If this argument is left unspecified, the default value is `PUBLISHED`. (repeated) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 517 | orderBy: string, Optional sort ordering for results. A comma-separated list of fields with |
| 518 | an optional sort direction keyword. Supported field is `updateTime`. |
| 519 | Supported direction keywords are `asc` and `desc`. |
| 520 | If not specified, `updateTime desc` is the default behavior. |
| 521 | Examples: `updateTime asc`, `updateTime` |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 522 | pageToken: string, nextPageToken |
| 523 | value returned from a previous |
| 524 | list call, |
| 525 | indicating that the subsequent page of results should be returned. |
| 526 | |
| 527 | The list request |
| 528 | must be otherwise identical to the one that resulted in this token. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 529 | pageSize: integer, Maximum number of items to return. Zero or unspecified indicates that the |
| 530 | server may assign a maximum. |
| 531 | |
| 532 | The server may return fewer than the specified number of results. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 533 | x__xgafv: string, V1 error format. |
| 534 | Allowed values |
| 535 | 1 - v1 error format |
| 536 | 2 - v2 error format |
| 537 | |
| 538 | Returns: |
| 539 | An object of the form: |
| 540 | |
| 541 | { # Response when listing course work. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 542 | "announcements": [ # Announcement items that match the request. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 543 | { # Announcement created by a teacher for students of the course |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 544 | "materials": [ # Additional materials. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 545 | # |
| 546 | # Announcements must have no more than 20 material items. |
| 547 | { # Material attached to course work. |
| 548 | # |
| 549 | # When creating attachments, setting the `form` field is not supported. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 550 | "form": { # Google Forms item. # Google Forms material. |
| 551 | "title": "A String", # Title of the Form. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 552 | # |
| 553 | # Read-only. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 554 | "thumbnailUrl": "A String", # URL of a thumbnail image of the Form. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 555 | # |
| 556 | # Read-only. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 557 | "responseUrl": "A String", # URL of the form responses document. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 558 | # Only set if respsonses have been recorded and only when the |
| 559 | # requesting user is an editor of the form. |
| 560 | # |
| 561 | # Read-only. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 562 | "formUrl": "A String", # URL of the form. |
| 563 | }, |
| 564 | "link": { # URL item. # Link material. On creation, this is upgraded to a more appropriate type |
| 565 | # if possible, and this is reflected in the response. |
| 566 | "url": "A String", # URL to link to. |
| 567 | # This must be a valid UTF-8 string containing between 1 and 2024 characters. |
| 568 | "title": "A String", # Title of the target of the URL. |
| 569 | # |
| 570 | # Read-only. |
| 571 | "thumbnailUrl": "A String", # URL of a thumbnail image of the target URL. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 572 | # |
| 573 | # Read-only. |
| 574 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 575 | "youtubeVideo": { # YouTube video item. # YouTube video material. |
| 576 | "alternateLink": "A String", # URL that can be used to view the YouTube video. |
| 577 | # |
| 578 | # Read-only. |
| 579 | "thumbnailUrl": "A String", # URL of a thumbnail image of the YouTube video. |
| 580 | # |
| 581 | # Read-only. |
| 582 | "id": "A String", # YouTube API resource ID. |
| 583 | "title": "A String", # Title of the YouTube video. |
| 584 | # |
| 585 | # Read-only. |
| 586 | }, |
| 587 | "driveFile": { # Drive file that is used as material for course work. # Google Drive file material. |
| 588 | "driveFile": { # Representation of a Google Drive file. # Drive file details. |
| 589 | "title": "A String", # Title of the Drive item. |
| 590 | # |
| 591 | # Read-only. |
| 592 | "alternateLink": "A String", # URL that can be used to access the Drive item. |
| 593 | # |
| 594 | # Read-only. |
| 595 | "thumbnailUrl": "A String", # URL of a thumbnail image of the Drive item. |
| 596 | # |
| 597 | # Read-only. |
| 598 | "id": "A String", # Drive API resource ID. |
| 599 | }, |
| 600 | "shareMode": "A String", # Mechanism by which students access the Drive item. |
| 601 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 602 | }, |
| 603 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 604 | "updateTime": "A String", # Timestamp of the most recent change to this announcement. |
| 605 | # |
| 606 | # Read-only. |
| 607 | "assigneeMode": "A String", # Assignee mode of the announcement. |
| 608 | # If unspecified, the default value is `ALL_STUDENTS`. |
| 609 | "alternateLink": "A String", # Absolute link to this announcement in the Classroom web UI. |
| 610 | # This is only populated if `state` is `PUBLISHED`. |
| 611 | # |
| 612 | # Read-only. |
| 613 | "scheduledTime": "A String", # Optional timestamp when this announcement is scheduled to be published. |
| 614 | "creationTime": "A String", # Timestamp when this announcement was created. |
| 615 | # |
| 616 | # Read-only. |
| 617 | "individualStudentsOptions": { # Assignee details about a coursework/announcement. # Identifiers of students with access to the announcement. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 618 | # This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. |
| 619 | # If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 620 | # specified in this field can see the announcement. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 621 | # This field is set if and only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 622 | "studentIds": [ # Identifiers for the students that have access to the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 623 | # coursework/announcement. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 624 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 625 | ], |
| 626 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 627 | "creatorUserId": "A String", # Identifier for the user that created the announcement. |
| 628 | # |
| 629 | # Read-only. |
| 630 | "state": "A String", # Status of this announcement. |
| 631 | # If unspecified, the default state is `DRAFT`. |
| 632 | "text": "A String", # Description of this announcement. |
| 633 | # The text must be a valid UTF-8 string containing no more |
| 634 | # than 30,000 characters. |
| 635 | "courseId": "A String", # Identifier of the course. |
| 636 | # |
| 637 | # Read-only. |
| 638 | "id": "A String", # Classroom-assigned identifier of this announcement, unique per course. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 639 | # |
| 640 | # Read-only. |
| 641 | }, |
| 642 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 643 | "nextPageToken": "A String", # Token identifying the next page of results to return. If empty, no further |
| 644 | # results are available. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 645 | }</pre> |
| 646 | </div> |
| 647 | |
| 648 | <div class="method"> |
| 649 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 650 | <pre>Retrieves the next page of results. |
| 651 | |
| 652 | Args: |
| 653 | previous_request: The request for the previous page. (required) |
| 654 | previous_response: The response from the request for the previous page. (required) |
| 655 | |
| 656 | Returns: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 657 | A request object that you can call 'execute()' on to request the next |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 658 | page. Returns None if there are no more items in the collection. |
| 659 | </pre> |
| 660 | </div> |
| 661 | |
| 662 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 663 | <code class="details" id="modifyAssignees">modifyAssignees(courseId, id, body=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 664 | <pre>Modifies assignee mode and options of an announcement. |
| 665 | |
| 666 | Only a teacher of the course that contains the announcement may |
| 667 | call this method. |
| 668 | |
| 669 | This method returns the following error codes: |
| 670 | |
| 671 | * `PERMISSION_DENIED` if the requesting user is not permitted to access the |
| 672 | requested course or course work or for access errors. |
| 673 | * `INVALID_ARGUMENT` if the request is malformed. |
| 674 | * `NOT_FOUND` if the requested course or course work does not exist. |
| 675 | |
| 676 | Args: |
| 677 | courseId: string, Identifier of the course. |
| 678 | This identifier can be either the Classroom-assigned identifier or an |
| 679 | alias. (required) |
| 680 | id: string, Identifier of the announcement. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 681 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 682 | The object takes the form of: |
| 683 | |
| 684 | { # Request to modify assignee mode and options of an announcement. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 685 | "modifyIndividualStudentsOptions": { # Contains fields to add or remove students from a course work or announcement # Set which students can view or cannot view the announcement. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 686 | # Must be specified only when `assigneeMode` is `INDIVIDUAL_STUDENTS`. |
| 687 | # where the `assigneeMode` is set to `INDIVIDUAL_STUDENTS`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 688 | "removeStudentIds": [ # IDs of students to be removed from having access to this |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 689 | # coursework/announcement. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 690 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 691 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 692 | "addStudentIds": [ # IDs of students to be added as having access to this |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 693 | # coursework/announcement. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 694 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 695 | ], |
| 696 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 697 | "assigneeMode": "A String", # Mode of the announcement describing whether it is accessible by all |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 698 | # students or specified individual students. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 699 | } |
| 700 | |
| 701 | x__xgafv: string, V1 error format. |
| 702 | Allowed values |
| 703 | 1 - v1 error format |
| 704 | 2 - v2 error format |
| 705 | |
| 706 | Returns: |
| 707 | An object of the form: |
| 708 | |
| 709 | { # Announcement created by a teacher for students of the course |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 710 | "materials": [ # Additional materials. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 711 | # |
| 712 | # Announcements must have no more than 20 material items. |
| 713 | { # Material attached to course work. |
| 714 | # |
| 715 | # When creating attachments, setting the `form` field is not supported. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 716 | "form": { # Google Forms item. # Google Forms material. |
| 717 | "title": "A String", # Title of the Form. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 718 | # |
| 719 | # Read-only. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 720 | "thumbnailUrl": "A String", # URL of a thumbnail image of the Form. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 721 | # |
| 722 | # Read-only. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 723 | "responseUrl": "A String", # URL of the form responses document. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 724 | # Only set if respsonses have been recorded and only when the |
| 725 | # requesting user is an editor of the form. |
| 726 | # |
| 727 | # Read-only. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 728 | "formUrl": "A String", # URL of the form. |
| 729 | }, |
| 730 | "link": { # URL item. # Link material. On creation, this is upgraded to a more appropriate type |
| 731 | # if possible, and this is reflected in the response. |
| 732 | "url": "A String", # URL to link to. |
| 733 | # This must be a valid UTF-8 string containing between 1 and 2024 characters. |
| 734 | "title": "A String", # Title of the target of the URL. |
| 735 | # |
| 736 | # Read-only. |
| 737 | "thumbnailUrl": "A String", # URL of a thumbnail image of the target URL. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 738 | # |
| 739 | # Read-only. |
| 740 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 741 | "youtubeVideo": { # YouTube video item. # YouTube video material. |
| 742 | "alternateLink": "A String", # URL that can be used to view the YouTube video. |
| 743 | # |
| 744 | # Read-only. |
| 745 | "thumbnailUrl": "A String", # URL of a thumbnail image of the YouTube video. |
| 746 | # |
| 747 | # Read-only. |
| 748 | "id": "A String", # YouTube API resource ID. |
| 749 | "title": "A String", # Title of the YouTube video. |
| 750 | # |
| 751 | # Read-only. |
| 752 | }, |
| 753 | "driveFile": { # Drive file that is used as material for course work. # Google Drive file material. |
| 754 | "driveFile": { # Representation of a Google Drive file. # Drive file details. |
| 755 | "title": "A String", # Title of the Drive item. |
| 756 | # |
| 757 | # Read-only. |
| 758 | "alternateLink": "A String", # URL that can be used to access the Drive item. |
| 759 | # |
| 760 | # Read-only. |
| 761 | "thumbnailUrl": "A String", # URL of a thumbnail image of the Drive item. |
| 762 | # |
| 763 | # Read-only. |
| 764 | "id": "A String", # Drive API resource ID. |
| 765 | }, |
| 766 | "shareMode": "A String", # Mechanism by which students access the Drive item. |
| 767 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 768 | }, |
| 769 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 770 | "updateTime": "A String", # Timestamp of the most recent change to this announcement. |
| 771 | # |
| 772 | # Read-only. |
| 773 | "assigneeMode": "A String", # Assignee mode of the announcement. |
| 774 | # If unspecified, the default value is `ALL_STUDENTS`. |
| 775 | "alternateLink": "A String", # Absolute link to this announcement in the Classroom web UI. |
| 776 | # This is only populated if `state` is `PUBLISHED`. |
| 777 | # |
| 778 | # Read-only. |
| 779 | "scheduledTime": "A String", # Optional timestamp when this announcement is scheduled to be published. |
| 780 | "creationTime": "A String", # Timestamp when this announcement was created. |
| 781 | # |
| 782 | # Read-only. |
| 783 | "individualStudentsOptions": { # Assignee details about a coursework/announcement. # Identifiers of students with access to the announcement. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 784 | # This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. |
| 785 | # If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 786 | # specified in this field can see the announcement. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 787 | # This field is set if and only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 788 | "studentIds": [ # Identifiers for the students that have access to the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 789 | # coursework/announcement. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 790 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 791 | ], |
| 792 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 793 | "creatorUserId": "A String", # Identifier for the user that created the announcement. |
| 794 | # |
| 795 | # Read-only. |
| 796 | "state": "A String", # Status of this announcement. |
| 797 | # If unspecified, the default state is `DRAFT`. |
| 798 | "text": "A String", # Description of this announcement. |
| 799 | # The text must be a valid UTF-8 string containing no more |
| 800 | # than 30,000 characters. |
| 801 | "courseId": "A String", # Identifier of the course. |
| 802 | # |
| 803 | # Read-only. |
| 804 | "id": "A String", # Classroom-assigned identifier of this announcement, unique per course. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 805 | # |
| 806 | # Read-only. |
| 807 | }</pre> |
| 808 | </div> |
| 809 | |
| 810 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 811 | <code class="details" id="patch">patch(courseId, id, body=None, updateMask=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 812 | <pre>Updates one or more fields of an announcement. |
| 813 | |
| 814 | This method returns the following error codes: |
| 815 | |
| 816 | * `PERMISSION_DENIED` if the requesting developer project did not create |
| 817 | the corresponding announcement or for access errors. |
| 818 | * `INVALID_ARGUMENT` if the request is malformed. |
| 819 | * `FAILED_PRECONDITION` if the requested announcement has already been |
| 820 | deleted. |
| 821 | * `NOT_FOUND` if the requested course or announcement does not exist |
| 822 | |
| 823 | Args: |
| 824 | courseId: string, Identifier of the course. |
| 825 | This identifier can be either the Classroom-assigned identifier or an |
| 826 | alias. (required) |
| 827 | id: string, Identifier of the announcement. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 828 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 829 | The object takes the form of: |
| 830 | |
| 831 | { # Announcement created by a teacher for students of the course |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 832 | "materials": [ # Additional materials. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 833 | # |
| 834 | # Announcements must have no more than 20 material items. |
| 835 | { # Material attached to course work. |
| 836 | # |
| 837 | # When creating attachments, setting the `form` field is not supported. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 838 | "form": { # Google Forms item. # Google Forms material. |
| 839 | "title": "A String", # Title of the Form. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 840 | # |
| 841 | # Read-only. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 842 | "thumbnailUrl": "A String", # URL of a thumbnail image of the Form. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 843 | # |
| 844 | # Read-only. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 845 | "responseUrl": "A String", # URL of the form responses document. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 846 | # Only set if respsonses have been recorded and only when the |
| 847 | # requesting user is an editor of the form. |
| 848 | # |
| 849 | # Read-only. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 850 | "formUrl": "A String", # URL of the form. |
| 851 | }, |
| 852 | "link": { # URL item. # Link material. On creation, this is upgraded to a more appropriate type |
| 853 | # if possible, and this is reflected in the response. |
| 854 | "url": "A String", # URL to link to. |
| 855 | # This must be a valid UTF-8 string containing between 1 and 2024 characters. |
| 856 | "title": "A String", # Title of the target of the URL. |
| 857 | # |
| 858 | # Read-only. |
| 859 | "thumbnailUrl": "A String", # URL of a thumbnail image of the target URL. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 860 | # |
| 861 | # Read-only. |
| 862 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 863 | "youtubeVideo": { # YouTube video item. # YouTube video material. |
| 864 | "alternateLink": "A String", # URL that can be used to view the YouTube video. |
| 865 | # |
| 866 | # Read-only. |
| 867 | "thumbnailUrl": "A String", # URL of a thumbnail image of the YouTube video. |
| 868 | # |
| 869 | # Read-only. |
| 870 | "id": "A String", # YouTube API resource ID. |
| 871 | "title": "A String", # Title of the YouTube video. |
| 872 | # |
| 873 | # Read-only. |
| 874 | }, |
| 875 | "driveFile": { # Drive file that is used as material for course work. # Google Drive file material. |
| 876 | "driveFile": { # Representation of a Google Drive file. # Drive file details. |
| 877 | "title": "A String", # Title of the Drive item. |
| 878 | # |
| 879 | # Read-only. |
| 880 | "alternateLink": "A String", # URL that can be used to access the Drive item. |
| 881 | # |
| 882 | # Read-only. |
| 883 | "thumbnailUrl": "A String", # URL of a thumbnail image of the Drive item. |
| 884 | # |
| 885 | # Read-only. |
| 886 | "id": "A String", # Drive API resource ID. |
| 887 | }, |
| 888 | "shareMode": "A String", # Mechanism by which students access the Drive item. |
| 889 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 890 | }, |
| 891 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 892 | "updateTime": "A String", # Timestamp of the most recent change to this announcement. |
| 893 | # |
| 894 | # Read-only. |
| 895 | "assigneeMode": "A String", # Assignee mode of the announcement. |
| 896 | # If unspecified, the default value is `ALL_STUDENTS`. |
| 897 | "alternateLink": "A String", # Absolute link to this announcement in the Classroom web UI. |
| 898 | # This is only populated if `state` is `PUBLISHED`. |
| 899 | # |
| 900 | # Read-only. |
| 901 | "scheduledTime": "A String", # Optional timestamp when this announcement is scheduled to be published. |
| 902 | "creationTime": "A String", # Timestamp when this announcement was created. |
| 903 | # |
| 904 | # Read-only. |
| 905 | "individualStudentsOptions": { # Assignee details about a coursework/announcement. # Identifiers of students with access to the announcement. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 906 | # This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. |
| 907 | # If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 908 | # specified in this field can see the announcement. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 909 | # This field is set if and only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 910 | "studentIds": [ # Identifiers for the students that have access to the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 911 | # coursework/announcement. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 912 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 913 | ], |
| 914 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 915 | "creatorUserId": "A String", # Identifier for the user that created the announcement. |
| 916 | # |
| 917 | # Read-only. |
| 918 | "state": "A String", # Status of this announcement. |
| 919 | # If unspecified, the default state is `DRAFT`. |
| 920 | "text": "A String", # Description of this announcement. |
| 921 | # The text must be a valid UTF-8 string containing no more |
| 922 | # than 30,000 characters. |
| 923 | "courseId": "A String", # Identifier of the course. |
| 924 | # |
| 925 | # Read-only. |
| 926 | "id": "A String", # Classroom-assigned identifier of this announcement, unique per course. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 927 | # |
| 928 | # Read-only. |
| 929 | } |
| 930 | |
| 931 | updateMask: string, Mask that identifies which fields on the announcement to update. |
| 932 | This field is required to do an update. The update fails if invalid |
| 933 | fields are specified. If a field supports empty values, it can be cleared |
| 934 | by specifying it in the update mask and not in the Announcement object. If |
| 935 | a field that does not support empty values is included in the update mask |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 936 | and not set in the Announcement object, an `INVALID_ARGUMENT` error is |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 937 | returned. |
| 938 | |
| 939 | The following fields may be specified by teachers: |
| 940 | |
| 941 | * `text` |
| 942 | * `state` |
| 943 | * `scheduled_time` |
| 944 | x__xgafv: string, V1 error format. |
| 945 | Allowed values |
| 946 | 1 - v1 error format |
| 947 | 2 - v2 error format |
| 948 | |
| 949 | Returns: |
| 950 | An object of the form: |
| 951 | |
| 952 | { # Announcement created by a teacher for students of the course |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 953 | "materials": [ # Additional materials. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 954 | # |
| 955 | # Announcements must have no more than 20 material items. |
| 956 | { # Material attached to course work. |
| 957 | # |
| 958 | # When creating attachments, setting the `form` field is not supported. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 959 | "form": { # Google Forms item. # Google Forms material. |
| 960 | "title": "A String", # Title of the Form. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 961 | # |
| 962 | # Read-only. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 963 | "thumbnailUrl": "A String", # URL of a thumbnail image of the Form. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 964 | # |
| 965 | # Read-only. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 966 | "responseUrl": "A String", # URL of the form responses document. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 967 | # Only set if respsonses have been recorded and only when the |
| 968 | # requesting user is an editor of the form. |
| 969 | # |
| 970 | # Read-only. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 971 | "formUrl": "A String", # URL of the form. |
| 972 | }, |
| 973 | "link": { # URL item. # Link material. On creation, this is upgraded to a more appropriate type |
| 974 | # if possible, and this is reflected in the response. |
| 975 | "url": "A String", # URL to link to. |
| 976 | # This must be a valid UTF-8 string containing between 1 and 2024 characters. |
| 977 | "title": "A String", # Title of the target of the URL. |
| 978 | # |
| 979 | # Read-only. |
| 980 | "thumbnailUrl": "A String", # URL of a thumbnail image of the target URL. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 981 | # |
| 982 | # Read-only. |
| 983 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 984 | "youtubeVideo": { # YouTube video item. # YouTube video material. |
| 985 | "alternateLink": "A String", # URL that can be used to view the YouTube video. |
| 986 | # |
| 987 | # Read-only. |
| 988 | "thumbnailUrl": "A String", # URL of a thumbnail image of the YouTube video. |
| 989 | # |
| 990 | # Read-only. |
| 991 | "id": "A String", # YouTube API resource ID. |
| 992 | "title": "A String", # Title of the YouTube video. |
| 993 | # |
| 994 | # Read-only. |
| 995 | }, |
| 996 | "driveFile": { # Drive file that is used as material for course work. # Google Drive file material. |
| 997 | "driveFile": { # Representation of a Google Drive file. # Drive file details. |
| 998 | "title": "A String", # Title of the Drive item. |
| 999 | # |
| 1000 | # Read-only. |
| 1001 | "alternateLink": "A String", # URL that can be used to access the Drive item. |
| 1002 | # |
| 1003 | # Read-only. |
| 1004 | "thumbnailUrl": "A String", # URL of a thumbnail image of the Drive item. |
| 1005 | # |
| 1006 | # Read-only. |
| 1007 | "id": "A String", # Drive API resource ID. |
| 1008 | }, |
| 1009 | "shareMode": "A String", # Mechanism by which students access the Drive item. |
| 1010 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1011 | }, |
| 1012 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1013 | "updateTime": "A String", # Timestamp of the most recent change to this announcement. |
| 1014 | # |
| 1015 | # Read-only. |
| 1016 | "assigneeMode": "A String", # Assignee mode of the announcement. |
| 1017 | # If unspecified, the default value is `ALL_STUDENTS`. |
| 1018 | "alternateLink": "A String", # Absolute link to this announcement in the Classroom web UI. |
| 1019 | # This is only populated if `state` is `PUBLISHED`. |
| 1020 | # |
| 1021 | # Read-only. |
| 1022 | "scheduledTime": "A String", # Optional timestamp when this announcement is scheduled to be published. |
| 1023 | "creationTime": "A String", # Timestamp when this announcement was created. |
| 1024 | # |
| 1025 | # Read-only. |
| 1026 | "individualStudentsOptions": { # Assignee details about a coursework/announcement. # Identifiers of students with access to the announcement. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1027 | # This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. |
| 1028 | # If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1029 | # specified in this field can see the announcement. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1030 | # This field is set if and only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1031 | "studentIds": [ # Identifiers for the students that have access to the |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1032 | # coursework/announcement. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1033 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1034 | ], |
| 1035 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1036 | "creatorUserId": "A String", # Identifier for the user that created the announcement. |
| 1037 | # |
| 1038 | # Read-only. |
| 1039 | "state": "A String", # Status of this announcement. |
| 1040 | # If unspecified, the default state is `DRAFT`. |
| 1041 | "text": "A String", # Description of this announcement. |
| 1042 | # The text must be a valid UTF-8 string containing no more |
| 1043 | # than 30,000 characters. |
| 1044 | "courseId": "A String", # Identifier of the course. |
| 1045 | # |
| 1046 | # Read-only. |
| 1047 | "id": "A String", # Classroom-assigned identifier of this announcement, unique per course. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1048 | # |
| 1049 | # Read-only. |
| 1050 | }</pre> |
| 1051 | </div> |
| 1052 | |
| 1053 | </body></html> |