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.topics.html">topics</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#create">create(courseId, body, x__xgafv=None)</a></code></p> 79<p class="firstline">Creates a topic.</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 a topic.</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 a topic.</p> 86<p class="toc_element"> 87 <code><a href="#list">list(courseId, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p> 88<p class="firstline">Returns the list of topics 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"> 93 <code><a href="#patch">patch(courseId, id, body, updateMask=None, x__xgafv=None)</a></code></p> 94<p class="firstline">Updates one or more fields of a topic.</p> 95<h3>Method Details</h3> 96<div class="method"> 97 <code class="details" id="create">create(courseId, body, x__xgafv=None)</code> 98 <pre>Creates a topic. 99 100This method returns the following error codes: 101 102* `PERMISSION_DENIED` if the requesting user is not permitted to access the 103requested course, create a topic in the requested course, 104or for access errors. 105* `INVALID_ARGUMENT` if the request is malformed. 106* `NOT_FOUND` if the requested course does not exist. 107 108Args: 109 courseId: string, Identifier of the course. 110This identifier can be either the Classroom-assigned identifier or an 111alias. (required) 112 body: object, The request body. (required) 113 The object takes the form of: 114 115{ # Topic created by a teacher for the course 116 "courseId": "A String", # Identifier of the course. 117 # 118 # Read-only. 119 "topicId": "A String", # Unique identifier for the topic. 120 # 121 # Read-only. 122 "updateTime": "A String", # The time the topic was last updated by the system. 123 # 124 # Read-only. 125 "name": "A String", # The name of the topic, generated by the user. 126 # Leading and trailing whitespaces, if any, will be trimmed. Also, multiple 127 # consecutive whitespaces will be collapsed into one inside the name. The 128 # result must be a non-empty string. Topic names are case sensitive, and must 129 # be no longer than 100 characters. 130 } 131 132 x__xgafv: string, V1 error format. 133 Allowed values 134 1 - v1 error format 135 2 - v2 error format 136 137Returns: 138 An object of the form: 139 140 { # Topic created by a teacher for the course 141 "courseId": "A String", # Identifier of the course. 142 # 143 # Read-only. 144 "topicId": "A String", # Unique identifier for the topic. 145 # 146 # Read-only. 147 "updateTime": "A String", # The time the topic was last updated by the system. 148 # 149 # Read-only. 150 "name": "A String", # The name of the topic, generated by the user. 151 # Leading and trailing whitespaces, if any, will be trimmed. Also, multiple 152 # consecutive whitespaces will be collapsed into one inside the name. The 153 # result must be a non-empty string. Topic names are case sensitive, and must 154 # be no longer than 100 characters. 155 }</pre> 156</div> 157 158<div class="method"> 159 <code class="details" id="delete">delete(courseId, id, x__xgafv=None)</code> 160 <pre>Deletes a topic. 161 162This method returns the following error codes: 163 164* `PERMISSION_DENIED` if the requesting user is not allowed to delete the 165requested topic or for access errors. 166* `FAILED_PRECONDITION` if the requested topic has already been 167deleted. 168* `NOT_FOUND` if no course or topic exists with the requested ID. 169 170Args: 171 courseId: string, Identifier of the course. 172This identifier can be either the Classroom-assigned identifier or an 173alias. (required) 174 id: string, Identifier of the topic to delete. (required) 175 x__xgafv: string, V1 error format. 176 Allowed values 177 1 - v1 error format 178 2 - v2 error format 179 180Returns: 181 An object of the form: 182 183 { # A generic empty message that you can re-use to avoid defining duplicated 184 # empty messages in your APIs. A typical example is to use it as the request 185 # or the response type of an API method. For instance: 186 # 187 # service Foo { 188 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); 189 # } 190 # 191 # The JSON representation for `Empty` is empty JSON object `{}`. 192 }</pre> 193</div> 194 195<div class="method"> 196 <code class="details" id="get">get(courseId, id, x__xgafv=None)</code> 197 <pre>Returns a topic. 198 199This method returns the following error codes: 200 201* `PERMISSION_DENIED` if the requesting user is not permitted to access the 202requested course or topic, or for access errors. 203* `INVALID_ARGUMENT` if the request is malformed. 204* `NOT_FOUND` if the requested course or topic does not exist. 205 206Args: 207 courseId: string, Identifier of the course. (required) 208 id: string, Identifier of the topic. (required) 209 x__xgafv: string, V1 error format. 210 Allowed values 211 1 - v1 error format 212 2 - v2 error format 213 214Returns: 215 An object of the form: 216 217 { # Topic created by a teacher for the course 218 "courseId": "A String", # Identifier of the course. 219 # 220 # Read-only. 221 "topicId": "A String", # Unique identifier for the topic. 222 # 223 # Read-only. 224 "updateTime": "A String", # The time the topic was last updated by the system. 225 # 226 # Read-only. 227 "name": "A String", # The name of the topic, generated by the user. 228 # Leading and trailing whitespaces, if any, will be trimmed. Also, multiple 229 # consecutive whitespaces will be collapsed into one inside the name. The 230 # result must be a non-empty string. Topic names are case sensitive, and must 231 # be no longer than 100 characters. 232 }</pre> 233</div> 234 235<div class="method"> 236 <code class="details" id="list">list(courseId, pageSize=None, pageToken=None, x__xgafv=None)</code> 237 <pre>Returns the list of topics that the requester is permitted to view. 238 239This method returns the following error codes: 240 241* `PERMISSION_DENIED` if the requesting user is not permitted to access 242the requested course or for access errors. 243* `INVALID_ARGUMENT` if the request is malformed. 244* `NOT_FOUND` if the requested course does not exist. 245 246Args: 247 courseId: string, Identifier of the course. 248This identifier can be either the Classroom-assigned identifier or an 249alias. (required) 250 pageSize: integer, Maximum number of items to return. Zero or unspecified indicates that the 251server may assign a maximum. 252 253The server may return fewer than the specified number of results. 254 pageToken: string, nextPageToken 255value returned from a previous 256list call, 257indicating that the subsequent page of results should be returned. 258 259The list request 260must be otherwise identical to the one that resulted in this token. 261 x__xgafv: string, V1 error format. 262 Allowed values 263 1 - v1 error format 264 2 - v2 error format 265 266Returns: 267 An object of the form: 268 269 { # Response when listing topics. 270 "nextPageToken": "A String", # Token identifying the next page of results to return. If empty, no further 271 # results are available. 272 "topic": [ # Topic items that match the request. 273 { # Topic created by a teacher for the course 274 "courseId": "A String", # Identifier of the course. 275 # 276 # Read-only. 277 "topicId": "A String", # Unique identifier for the topic. 278 # 279 # Read-only. 280 "updateTime": "A String", # The time the topic was last updated by the system. 281 # 282 # Read-only. 283 "name": "A String", # The name of the topic, generated by the user. 284 # Leading and trailing whitespaces, if any, will be trimmed. Also, multiple 285 # consecutive whitespaces will be collapsed into one inside the name. The 286 # result must be a non-empty string. Topic names are case sensitive, and must 287 # be no longer than 100 characters. 288 }, 289 ], 290 }</pre> 291</div> 292 293<div class="method"> 294 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 295 <pre>Retrieves the next page of results. 296 297Args: 298 previous_request: The request for the previous page. (required) 299 previous_response: The response from the request for the previous page. (required) 300 301Returns: 302 A request object that you can call 'execute()' on to request the next 303 page. Returns None if there are no more items in the collection. 304 </pre> 305</div> 306 307<div class="method"> 308 <code class="details" id="patch">patch(courseId, id, body, updateMask=None, x__xgafv=None)</code> 309 <pre>Updates one or more fields of a topic. 310 311This method returns the following error codes: 312 313* `PERMISSION_DENIED` if the requesting developer project did not create 314the corresponding topic or for access errors. 315* `INVALID_ARGUMENT` if the request is malformed. 316* `NOT_FOUND` if the requested course or topic does not exist 317 318Args: 319 courseId: string, Identifier of the course. 320This identifier can be either the Classroom-assigned identifier or an 321alias. (required) 322 id: string, Identifier of the topic. (required) 323 body: object, The request body. (required) 324 The object takes the form of: 325 326{ # Topic created by a teacher for the course 327 "courseId": "A String", # Identifier of the course. 328 # 329 # Read-only. 330 "topicId": "A String", # Unique identifier for the topic. 331 # 332 # Read-only. 333 "updateTime": "A String", # The time the topic was last updated by the system. 334 # 335 # Read-only. 336 "name": "A String", # The name of the topic, generated by the user. 337 # Leading and trailing whitespaces, if any, will be trimmed. Also, multiple 338 # consecutive whitespaces will be collapsed into one inside the name. The 339 # result must be a non-empty string. Topic names are case sensitive, and must 340 # be no longer than 100 characters. 341 } 342 343 updateMask: string, Mask that identifies which fields on the topic to update. 344This field is required to do an update. The update fails if invalid 345fields are specified. If a field supports empty values, it can be cleared 346by specifying it in the update mask and not in the Topic object. If a 347field that does not support empty values is included in the update mask and 348not set in the Topic object, an `INVALID_ARGUMENT` error will be 349returned. 350 351The following fields may be specified: 352 353* `name` 354 x__xgafv: string, V1 error format. 355 Allowed values 356 1 - v1 error format 357 2 - v2 error format 358 359Returns: 360 An object of the form: 361 362 { # Topic created by a teacher for the course 363 "courseId": "A String", # Identifier of the course. 364 # 365 # Read-only. 366 "topicId": "A String", # Unique identifier for the topic. 367 # 368 # Read-only. 369 "updateTime": "A String", # The time the topic was last updated by the system. 370 # 371 # Read-only. 372 "name": "A String", # The name of the topic, generated by the user. 373 # Leading and trailing whitespaces, if any, will be trimmed. Also, multiple 374 # consecutive whitespaces will be collapsed into one inside the name. The 375 # result must be a non-empty string. Topic names are case sensitive, and must 376 # be no longer than 100 characters. 377 }</pre> 378</div> 379 380</body></html>