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="#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 topic. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, create a topic in the requested course, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist.</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 topic. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not allowed to delete the requested topic or for access errors. * `FAILED_PRECONDITION` if the requested topic has already been deleted. * `NOT_FOUND` if no course or topic 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 topic. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or topic, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or topic does not exist.</p> 89<p class="toc_element"> 90 <code><a href="#list">list(courseId, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p> 91<p class="firstline">Returns the list of topics that the requester is permitted to view. 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 topic. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding topic or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or topic 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 topic. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course, create a topic in the requested course, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course does not exist. 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{ # Topic created by a teacher for the course 114 "courseId": "A String", # Identifier of the course. Read-only. 115 "name": "A String", # The name of the topic, generated by the user. Leading and trailing whitespaces, if any, are trimmed. Also, multiple consecutive whitespaces are collapsed into one inside the name. The result must be a non-empty string. Topic names are case sensitive, and must be no longer than 100 characters. 116 "topicId": "A String", # Unique identifier for the topic. Read-only. 117 "updateTime": "A String", # The time the topic was last updated by the system. Read-only. 118} 119 120 x__xgafv: string, V1 error format. 121 Allowed values 122 1 - v1 error format 123 2 - v2 error format 124 125Returns: 126 An object of the form: 127 128 { # Topic created by a teacher for the course 129 "courseId": "A String", # Identifier of the course. Read-only. 130 "name": "A String", # The name of the topic, generated by the user. Leading and trailing whitespaces, if any, are trimmed. Also, multiple consecutive whitespaces are collapsed into one inside the name. The result must be a non-empty string. Topic names are case sensitive, and must be no longer than 100 characters. 131 "topicId": "A String", # Unique identifier for the topic. Read-only. 132 "updateTime": "A String", # The time the topic was last updated by the system. Read-only. 133}</pre> 134</div> 135 136<div class="method"> 137 <code class="details" id="delete">delete(courseId, id, x__xgafv=None)</code> 138 <pre>Deletes a topic. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not allowed to delete the requested topic or for access errors. * `FAILED_PRECONDITION` if the requested topic has already been deleted. * `NOT_FOUND` if no course or topic exists with the requested ID. 139 140Args: 141 courseId: string, Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. (required) 142 id: string, Identifier of the topic to delete. (required) 143 x__xgafv: string, V1 error format. 144 Allowed values 145 1 - v1 error format 146 2 - v2 error format 147 148Returns: 149 An object of the form: 150 151 { # 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 `{}`. 152}</pre> 153</div> 154 155<div class="method"> 156 <code class="details" id="get">get(courseId, id, x__xgafv=None)</code> 157 <pre>Returns a topic. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to access the requested course or topic, or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or topic does not exist. 158 159Args: 160 courseId: string, Identifier of the course. (required) 161 id: string, Identifier of the topic. (required) 162 x__xgafv: string, V1 error format. 163 Allowed values 164 1 - v1 error format 165 2 - v2 error format 166 167Returns: 168 An object of the form: 169 170 { # Topic created by a teacher for the course 171 "courseId": "A String", # Identifier of the course. Read-only. 172 "name": "A String", # The name of the topic, generated by the user. Leading and trailing whitespaces, if any, are trimmed. Also, multiple consecutive whitespaces are collapsed into one inside the name. The result must be a non-empty string. Topic names are case sensitive, and must be no longer than 100 characters. 173 "topicId": "A String", # Unique identifier for the topic. Read-only. 174 "updateTime": "A String", # The time the topic was last updated by the system. Read-only. 175}</pre> 176</div> 177 178<div class="method"> 179 <code class="details" id="list">list(courseId, pageSize=None, pageToken=None, x__xgafv=None)</code> 180 <pre>Returns the list of topics that the requester is permitted to view. 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. 181 182Args: 183 courseId: string, Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. (required) 184 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. 185 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. 186 x__xgafv: string, V1 error format. 187 Allowed values 188 1 - v1 error format 189 2 - v2 error format 190 191Returns: 192 An object of the form: 193 194 { # Response when listing topics. 195 "nextPageToken": "A String", # Token identifying the next page of results to return. If empty, no further results are available. 196 "topic": [ # Topic items that match the request. 197 { # Topic created by a teacher for the course 198 "courseId": "A String", # Identifier of the course. Read-only. 199 "name": "A String", # The name of the topic, generated by the user. Leading and trailing whitespaces, if any, are trimmed. Also, multiple consecutive whitespaces are collapsed into one inside the name. The result must be a non-empty string. Topic names are case sensitive, and must be no longer than 100 characters. 200 "topicId": "A String", # Unique identifier for the topic. Read-only. 201 "updateTime": "A String", # The time the topic was last updated by the system. Read-only. 202 }, 203 ], 204}</pre> 205</div> 206 207<div class="method"> 208 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 209 <pre>Retrieves the next page of results. 210 211Args: 212 previous_request: The request for the previous page. (required) 213 previous_response: The response from the request for the previous page. (required) 214 215Returns: 216 A request object that you can call 'execute()' on to request the next 217 page. Returns None if there are no more items in the collection. 218 </pre> 219</div> 220 221<div class="method"> 222 <code class="details" id="patch">patch(courseId, id, body=None, updateMask=None, x__xgafv=None)</code> 223 <pre>Updates one or more fields of a topic. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding topic or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the requested course or topic does not exist 224 225Args: 226 courseId: string, Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias. (required) 227 id: string, Identifier of the topic. (required) 228 body: object, The request body. 229 The object takes the form of: 230 231{ # Topic created by a teacher for the course 232 "courseId": "A String", # Identifier of the course. Read-only. 233 "name": "A String", # The name of the topic, generated by the user. Leading and trailing whitespaces, if any, are trimmed. Also, multiple consecutive whitespaces are collapsed into one inside the name. The result must be a non-empty string. Topic names are case sensitive, and must be no longer than 100 characters. 234 "topicId": "A String", # Unique identifier for the topic. Read-only. 235 "updateTime": "A String", # The time the topic was last updated by the system. Read-only. 236} 237 238 updateMask: string, Mask that identifies which fields on the topic 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 Topic object. If a field that does not support empty values is included in the update mask and not set in the Topic object, an `INVALID_ARGUMENT` error is returned. The following fields may be specified: * `name` 239 x__xgafv: string, V1 error format. 240 Allowed values 241 1 - v1 error format 242 2 - v2 error format 243 244Returns: 245 An object of the form: 246 247 { # Topic created by a teacher for the course 248 "courseId": "A String", # Identifier of the course. Read-only. 249 "name": "A String", # The name of the topic, generated by the user. Leading and trailing whitespaces, if any, are trimmed. Also, multiple consecutive whitespaces are collapsed into one inside the name. The result must be a non-empty string. Topic names are case sensitive, and must be no longer than 100 characters. 250 "topicId": "A String", # Unique identifier for the topic. Read-only. 251 "updateTime": "A String", # The time the topic was last updated by the system. Read-only. 252}</pre> 253</div> 254 255</body></html>