blob: 0c0451fe0b36d2e0abae162dbcc3e219693aa022 [file] [log] [blame]
Takashi Matsuo06694102015-09-11 13:55:40 -07001<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></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="classroom_v1.courses.aliases.html">aliases()</a></code>
79</p>
80<p class="firstline">Returns the aliases Resource.</p>
81
82<p class="toc_element">
83 <code><a href="classroom_v1.courses.students.html">students()</a></code>
84</p>
85<p class="firstline">Returns the students Resource.</p>
86
87<p class="toc_element">
88 <code><a href="classroom_v1.courses.teachers.html">teachers()</a></code>
89</p>
90<p class="firstline">Returns the teachers Resource.</p>
91
92<p class="toc_element">
93 <code><a href="#create">create(body, x__xgafv=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080094<p class="firstline">Creates a course. The user specified in `ownerId` is the owner of the created course and added as a teacher. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create courses or for access errors. * `NOT_FOUND` if the primary teacher is not a valid user. * `FAILED_PRECONDITION` if the course owner's account is disabled or for the following request errors: * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if an alias was specified in the `id` and already exists.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070095<p class="toc_element">
96 <code><a href="#delete">delete(id, x__xgafv=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080097<p class="firstline">Deletes a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to delete the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070098<p class="toc_element">
99 <code><a href="#get">get(id, x__xgafv=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800100<p class="firstline">Returns a course. 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. * `NOT_FOUND` if no course exists with the requested ID.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700101<p class="toc_element">
102 <code><a href="#list">list(studentId=None, pageSize=None, teacherId=None, pageToken=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800103<p class="firstline">Returns a list of courses that the requesting user is permitted to view, restricted to those that match the request. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the query argument is malformed. * `NOT_FOUND` if any users specified in the query arguments do not exist.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700104<p class="toc_element">
105 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
106<p class="firstline">Retrieves the next page of results.</p>
107<p class="toc_element">
108 <code><a href="#patch">patch(id, body, updateMask=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800109<p class="firstline">Updates one or more fields in a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to modify the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID. * `INVALID_ARGUMENT` if invalid fields are specified in the update mask or if no update mask is supplied. * `FAILED_PRECONDITION` for the following request errors: * CourseNotModifiable</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700110<p class="toc_element">
111 <code><a href="#update">update(id, body, x__xgafv=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800112<p class="firstline">Updates a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to modify the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID. * `FAILED_PRECONDITION` for the following request errors: * CourseNotModifiable</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700113<h3>Method Details</h3>
114<div class="method">
115 <code class="details" id="create">create(body, x__xgafv=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800116 <pre>Creates a course. The user specified in `ownerId` is the owner of the created course and added as a teacher. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create courses or for access errors. * `NOT_FOUND` if the primary teacher is not a valid user. * `FAILED_PRECONDITION` if the course owner's account is disabled or for the following request errors: * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if an alias was specified in the `id` and already exists.
Takashi Matsuo06694102015-09-11 13:55:40 -0700117
118Args:
119 body: object, The request body. (required)
120 The object takes the form of:
121
122{ # A Course in Classroom.
123 "updateTime": "A String", # Time of the most recent update to this course. Specifying this field in a course update mask will result in an error. Read-only.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800124 "description": "A String", # Optional description. For example, "We'll be learning about the structure of living creatures from a combination of textbooks, guest lectures, and lab work. Expect to be excited!" If set, this field must be a valid UTF-8 string and no longer than 30,000 characters.
Takashi Matsuo06694102015-09-11 13:55:40 -0700125 "alternateLink": "A String", # Absolute link to this course in the Classroom web UI. Read-only.
126 "enrollmentCode": "A String", # Enrollment code to use when joining this course. Specifying this field in a course update mask will result in an error. Read-only.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800127 "section": "A String", # Section of the course. For example, "Period 2". If set, this field must be a valid UTF-8 string and no longer than 2800 characters.
Takashi Matsuo06694102015-09-11 13:55:40 -0700128 "creationTime": "A String", # Creation time of the course. Specifying this field in a course update mask will result in an error. Read-only.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800129 "name": "A String", # Name of the course. For example, "10th Grade Biology". The name is required. It must be between 1 and 750 characters and a valid UTF-8 string.
130 "courseState": "A String", # State of the course. If unspecified, the default state is `PROVISIONED`.
131 "ownerId": "A String", # The identifier of the owner of a course. When specified as a parameter of a create course request, this field is required. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user This must be set in a create request. Specifying this field in a course update mask will result in an `INVALID_ARGUMENT` error.
132 "id": "A String", # Identifier for this course assigned by Classroom. When creating a course, you may optionally set this identifier to an alias string in the request to create a corresponding alias. The `id` is still assigned by Classroom and cannot be updated after the course is created. Specifying this field in a course update mask will result in an error.
133 "descriptionHeading": "A String", # Optional heading for the description. For example, "Welcome to 10th Grade Biology." If set, this field must be a valid UTF-8 string and no longer than 3600 characters.
134 "room": "A String", # Optional room location. For example, "301". If set, this field must be a valid UTF-8 string and no longer than 650 characters.
Takashi Matsuo06694102015-09-11 13:55:40 -0700135}
136
137 x__xgafv: string, V1 error format.
138
139Returns:
140 An object of the form:
141
142 { # A Course in Classroom.
143 "updateTime": "A String", # Time of the most recent update to this course. Specifying this field in a course update mask will result in an error. Read-only.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800144 "description": "A String", # Optional description. For example, "We'll be learning about the structure of living creatures from a combination of textbooks, guest lectures, and lab work. Expect to be excited!" If set, this field must be a valid UTF-8 string and no longer than 30,000 characters.
Takashi Matsuo06694102015-09-11 13:55:40 -0700145 "alternateLink": "A String", # Absolute link to this course in the Classroom web UI. Read-only.
146 "enrollmentCode": "A String", # Enrollment code to use when joining this course. Specifying this field in a course update mask will result in an error. Read-only.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800147 "section": "A String", # Section of the course. For example, "Period 2". If set, this field must be a valid UTF-8 string and no longer than 2800 characters.
Takashi Matsuo06694102015-09-11 13:55:40 -0700148 "creationTime": "A String", # Creation time of the course. Specifying this field in a course update mask will result in an error. Read-only.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800149 "name": "A String", # Name of the course. For example, "10th Grade Biology". The name is required. It must be between 1 and 750 characters and a valid UTF-8 string.
150 "courseState": "A String", # State of the course. If unspecified, the default state is `PROVISIONED`.
151 "ownerId": "A String", # The identifier of the owner of a course. When specified as a parameter of a create course request, this field is required. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user This must be set in a create request. Specifying this field in a course update mask will result in an `INVALID_ARGUMENT` error.
152 "id": "A String", # Identifier for this course assigned by Classroom. When creating a course, you may optionally set this identifier to an alias string in the request to create a corresponding alias. The `id` is still assigned by Classroom and cannot be updated after the course is created. Specifying this field in a course update mask will result in an error.
153 "descriptionHeading": "A String", # Optional heading for the description. For example, "Welcome to 10th Grade Biology." If set, this field must be a valid UTF-8 string and no longer than 3600 characters.
154 "room": "A String", # Optional room location. For example, "301". If set, this field must be a valid UTF-8 string and no longer than 650 characters.
Takashi Matsuo06694102015-09-11 13:55:40 -0700155 }</pre>
156</div>
157
158<div class="method">
159 <code class="details" id="delete">delete(id, x__xgafv=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800160 <pre>Deletes a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to delete the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID.
Takashi Matsuo06694102015-09-11 13:55:40 -0700161
162Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800163 id: string, Identifier of the course to delete. This identifier can be either the Classroom-assigned identifier or an alias. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700164 x__xgafv: string, V1 error format.
165
166Returns:
167 An object of the form:
168
169 { # 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 `{}`.
170 }</pre>
171</div>
172
173<div class="method">
174 <code class="details" id="get">get(id, x__xgafv=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800175 <pre>Returns a course. 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. * `NOT_FOUND` if no course exists with the requested ID.
Takashi Matsuo06694102015-09-11 13:55:40 -0700176
177Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800178 id: string, Identifier of the course to return. This identifier can be either the Classroom-assigned identifier or an alias. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700179 x__xgafv: string, V1 error format.
180
181Returns:
182 An object of the form:
183
184 { # A Course in Classroom.
185 "updateTime": "A String", # Time of the most recent update to this course. Specifying this field in a course update mask will result in an error. Read-only.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800186 "description": "A String", # Optional description. For example, "We'll be learning about the structure of living creatures from a combination of textbooks, guest lectures, and lab work. Expect to be excited!" If set, this field must be a valid UTF-8 string and no longer than 30,000 characters.
Takashi Matsuo06694102015-09-11 13:55:40 -0700187 "alternateLink": "A String", # Absolute link to this course in the Classroom web UI. Read-only.
188 "enrollmentCode": "A String", # Enrollment code to use when joining this course. Specifying this field in a course update mask will result in an error. Read-only.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800189 "section": "A String", # Section of the course. For example, "Period 2". If set, this field must be a valid UTF-8 string and no longer than 2800 characters.
Takashi Matsuo06694102015-09-11 13:55:40 -0700190 "creationTime": "A String", # Creation time of the course. Specifying this field in a course update mask will result in an error. Read-only.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800191 "name": "A String", # Name of the course. For example, "10th Grade Biology". The name is required. It must be between 1 and 750 characters and a valid UTF-8 string.
192 "courseState": "A String", # State of the course. If unspecified, the default state is `PROVISIONED`.
193 "ownerId": "A String", # The identifier of the owner of a course. When specified as a parameter of a create course request, this field is required. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user This must be set in a create request. Specifying this field in a course update mask will result in an `INVALID_ARGUMENT` error.
194 "id": "A String", # Identifier for this course assigned by Classroom. When creating a course, you may optionally set this identifier to an alias string in the request to create a corresponding alias. The `id` is still assigned by Classroom and cannot be updated after the course is created. Specifying this field in a course update mask will result in an error.
195 "descriptionHeading": "A String", # Optional heading for the description. For example, "Welcome to 10th Grade Biology." If set, this field must be a valid UTF-8 string and no longer than 3600 characters.
196 "room": "A String", # Optional room location. For example, "301". If set, this field must be a valid UTF-8 string and no longer than 650 characters.
Takashi Matsuo06694102015-09-11 13:55:40 -0700197 }</pre>
198</div>
199
200<div class="method">
201 <code class="details" id="list">list(studentId=None, pageSize=None, teacherId=None, pageToken=None, x__xgafv=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800202 <pre>Returns a list of courses that the requesting user is permitted to view, restricted to those that match the request. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the query argument is malformed. * `NOT_FOUND` if any users specified in the query arguments do not exist.
Takashi Matsuo06694102015-09-11 13:55:40 -0700203
204Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800205 studentId: string, Restricts returned courses to those having a student with the specified identifier. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user
Takashi Matsuo06694102015-09-11 13:55:40 -0700206 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.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800207 teacherId: string, Restricts returned courses to those having a teacher with the specified identifier. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user
208 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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700209 x__xgafv: string, V1 error format.
210
211Returns:
212 An object of the form:
213
214 { # Response when listing courses.
215 "nextPageToken": "A String", # Token identifying the next page of results to return. If empty, no further results are available.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800216 "courses": [ # Courses that match the list request.
Takashi Matsuo06694102015-09-11 13:55:40 -0700217 { # A Course in Classroom.
218 "updateTime": "A String", # Time of the most recent update to this course. Specifying this field in a course update mask will result in an error. Read-only.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800219 "description": "A String", # Optional description. For example, "We'll be learning about the structure of living creatures from a combination of textbooks, guest lectures, and lab work. Expect to be excited!" If set, this field must be a valid UTF-8 string and no longer than 30,000 characters.
Takashi Matsuo06694102015-09-11 13:55:40 -0700220 "alternateLink": "A String", # Absolute link to this course in the Classroom web UI. Read-only.
221 "enrollmentCode": "A String", # Enrollment code to use when joining this course. Specifying this field in a course update mask will result in an error. Read-only.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800222 "section": "A String", # Section of the course. For example, "Period 2". If set, this field must be a valid UTF-8 string and no longer than 2800 characters.
Takashi Matsuo06694102015-09-11 13:55:40 -0700223 "creationTime": "A String", # Creation time of the course. Specifying this field in a course update mask will result in an error. Read-only.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800224 "name": "A String", # Name of the course. For example, "10th Grade Biology". The name is required. It must be between 1 and 750 characters and a valid UTF-8 string.
225 "courseState": "A String", # State of the course. If unspecified, the default state is `PROVISIONED`.
226 "ownerId": "A String", # The identifier of the owner of a course. When specified as a parameter of a create course request, this field is required. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user This must be set in a create request. Specifying this field in a course update mask will result in an `INVALID_ARGUMENT` error.
227 "id": "A String", # Identifier for this course assigned by Classroom. When creating a course, you may optionally set this identifier to an alias string in the request to create a corresponding alias. The `id` is still assigned by Classroom and cannot be updated after the course is created. Specifying this field in a course update mask will result in an error.
228 "descriptionHeading": "A String", # Optional heading for the description. For example, "Welcome to 10th Grade Biology." If set, this field must be a valid UTF-8 string and no longer than 3600 characters.
229 "room": "A String", # Optional room location. For example, "301". If set, this field must be a valid UTF-8 string and no longer than 650 characters.
Takashi Matsuo06694102015-09-11 13:55:40 -0700230 },
231 ],
232 }</pre>
233</div>
234
235<div class="method">
236 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
237 <pre>Retrieves the next page of results.
238
239Args:
240 previous_request: The request for the previous page. (required)
241 previous_response: The response from the request for the previous page. (required)
242
243Returns:
244 A request object that you can call 'execute()' on to request the next
245 page. Returns None if there are no more items in the collection.
246 </pre>
247</div>
248
249<div class="method">
250 <code class="details" id="patch">patch(id, body, updateMask=None, x__xgafv=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800251 <pre>Updates one or more fields in a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to modify the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID. * `INVALID_ARGUMENT` if invalid fields are specified in the update mask or if no update mask is supplied. * `FAILED_PRECONDITION` for the following request errors: * CourseNotModifiable
Takashi Matsuo06694102015-09-11 13:55:40 -0700252
253Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800254 id: string, Identifier of the course to update. This identifier can be either the Classroom-assigned identifier or an alias. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700255 body: object, The request body. (required)
256 The object takes the form of:
257
258{ # A Course in Classroom.
259 "updateTime": "A String", # Time of the most recent update to this course. Specifying this field in a course update mask will result in an error. Read-only.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800260 "description": "A String", # Optional description. For example, "We'll be learning about the structure of living creatures from a combination of textbooks, guest lectures, and lab work. Expect to be excited!" If set, this field must be a valid UTF-8 string and no longer than 30,000 characters.
Takashi Matsuo06694102015-09-11 13:55:40 -0700261 "alternateLink": "A String", # Absolute link to this course in the Classroom web UI. Read-only.
262 "enrollmentCode": "A String", # Enrollment code to use when joining this course. Specifying this field in a course update mask will result in an error. Read-only.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800263 "section": "A String", # Section of the course. For example, "Period 2". If set, this field must be a valid UTF-8 string and no longer than 2800 characters.
Takashi Matsuo06694102015-09-11 13:55:40 -0700264 "creationTime": "A String", # Creation time of the course. Specifying this field in a course update mask will result in an error. Read-only.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800265 "name": "A String", # Name of the course. For example, "10th Grade Biology". The name is required. It must be between 1 and 750 characters and a valid UTF-8 string.
266 "courseState": "A String", # State of the course. If unspecified, the default state is `PROVISIONED`.
267 "ownerId": "A String", # The identifier of the owner of a course. When specified as a parameter of a create course request, this field is required. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user This must be set in a create request. Specifying this field in a course update mask will result in an `INVALID_ARGUMENT` error.
268 "id": "A String", # Identifier for this course assigned by Classroom. When creating a course, you may optionally set this identifier to an alias string in the request to create a corresponding alias. The `id` is still assigned by Classroom and cannot be updated after the course is created. Specifying this field in a course update mask will result in an error.
269 "descriptionHeading": "A String", # Optional heading for the description. For example, "Welcome to 10th Grade Biology." If set, this field must be a valid UTF-8 string and no longer than 3600 characters.
270 "room": "A String", # Optional room location. For example, "301". If set, this field must be a valid UTF-8 string and no longer than 650 characters.
Takashi Matsuo06694102015-09-11 13:55:40 -0700271}
272
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800273 updateMask: string, Mask that identifies which fields on the course to update. This field is required to do an update. The update will fail if invalid fields are specified. The following fields are valid: * `name` * `section` * `descriptionHeading` * `description` * `room` * `courseState` When set in a query parameter, this field should be specified as `updateMask=,,...`
Takashi Matsuo06694102015-09-11 13:55:40 -0700274 x__xgafv: string, V1 error format.
275
276Returns:
277 An object of the form:
278
279 { # A Course in Classroom.
280 "updateTime": "A String", # Time of the most recent update to this course. Specifying this field in a course update mask will result in an error. Read-only.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800281 "description": "A String", # Optional description. For example, "We'll be learning about the structure of living creatures from a combination of textbooks, guest lectures, and lab work. Expect to be excited!" If set, this field must be a valid UTF-8 string and no longer than 30,000 characters.
Takashi Matsuo06694102015-09-11 13:55:40 -0700282 "alternateLink": "A String", # Absolute link to this course in the Classroom web UI. Read-only.
283 "enrollmentCode": "A String", # Enrollment code to use when joining this course. Specifying this field in a course update mask will result in an error. Read-only.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800284 "section": "A String", # Section of the course. For example, "Period 2". If set, this field must be a valid UTF-8 string and no longer than 2800 characters.
Takashi Matsuo06694102015-09-11 13:55:40 -0700285 "creationTime": "A String", # Creation time of the course. Specifying this field in a course update mask will result in an error. Read-only.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800286 "name": "A String", # Name of the course. For example, "10th Grade Biology". The name is required. It must be between 1 and 750 characters and a valid UTF-8 string.
287 "courseState": "A String", # State of the course. If unspecified, the default state is `PROVISIONED`.
288 "ownerId": "A String", # The identifier of the owner of a course. When specified as a parameter of a create course request, this field is required. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user This must be set in a create request. Specifying this field in a course update mask will result in an `INVALID_ARGUMENT` error.
289 "id": "A String", # Identifier for this course assigned by Classroom. When creating a course, you may optionally set this identifier to an alias string in the request to create a corresponding alias. The `id` is still assigned by Classroom and cannot be updated after the course is created. Specifying this field in a course update mask will result in an error.
290 "descriptionHeading": "A String", # Optional heading for the description. For example, "Welcome to 10th Grade Biology." If set, this field must be a valid UTF-8 string and no longer than 3600 characters.
291 "room": "A String", # Optional room location. For example, "301". If set, this field must be a valid UTF-8 string and no longer than 650 characters.
Takashi Matsuo06694102015-09-11 13:55:40 -0700292 }</pre>
293</div>
294
295<div class="method">
296 <code class="details" id="update">update(id, body, x__xgafv=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800297 <pre>Updates a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to modify the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID. * `FAILED_PRECONDITION` for the following request errors: * CourseNotModifiable
Takashi Matsuo06694102015-09-11 13:55:40 -0700298
299Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800300 id: string, Identifier of the course to update. This identifier can be either the Classroom-assigned identifier or an alias. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700301 body: object, The request body. (required)
302 The object takes the form of:
303
304{ # A Course in Classroom.
305 "updateTime": "A String", # Time of the most recent update to this course. Specifying this field in a course update mask will result in an error. Read-only.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800306 "description": "A String", # Optional description. For example, "We'll be learning about the structure of living creatures from a combination of textbooks, guest lectures, and lab work. Expect to be excited!" If set, this field must be a valid UTF-8 string and no longer than 30,000 characters.
Takashi Matsuo06694102015-09-11 13:55:40 -0700307 "alternateLink": "A String", # Absolute link to this course in the Classroom web UI. Read-only.
308 "enrollmentCode": "A String", # Enrollment code to use when joining this course. Specifying this field in a course update mask will result in an error. Read-only.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800309 "section": "A String", # Section of the course. For example, "Period 2". If set, this field must be a valid UTF-8 string and no longer than 2800 characters.
Takashi Matsuo06694102015-09-11 13:55:40 -0700310 "creationTime": "A String", # Creation time of the course. Specifying this field in a course update mask will result in an error. Read-only.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800311 "name": "A String", # Name of the course. For example, "10th Grade Biology". The name is required. It must be between 1 and 750 characters and a valid UTF-8 string.
312 "courseState": "A String", # State of the course. If unspecified, the default state is `PROVISIONED`.
313 "ownerId": "A String", # The identifier of the owner of a course. When specified as a parameter of a create course request, this field is required. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user This must be set in a create request. Specifying this field in a course update mask will result in an `INVALID_ARGUMENT` error.
314 "id": "A String", # Identifier for this course assigned by Classroom. When creating a course, you may optionally set this identifier to an alias string in the request to create a corresponding alias. The `id` is still assigned by Classroom and cannot be updated after the course is created. Specifying this field in a course update mask will result in an error.
315 "descriptionHeading": "A String", # Optional heading for the description. For example, "Welcome to 10th Grade Biology." If set, this field must be a valid UTF-8 string and no longer than 3600 characters.
316 "room": "A String", # Optional room location. For example, "301". If set, this field must be a valid UTF-8 string and no longer than 650 characters.
Takashi Matsuo06694102015-09-11 13:55:40 -0700317}
318
319 x__xgafv: string, V1 error format.
320
321Returns:
322 An object of the form:
323
324 { # A Course in Classroom.
325 "updateTime": "A String", # Time of the most recent update to this course. Specifying this field in a course update mask will result in an error. Read-only.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800326 "description": "A String", # Optional description. For example, "We'll be learning about the structure of living creatures from a combination of textbooks, guest lectures, and lab work. Expect to be excited!" If set, this field must be a valid UTF-8 string and no longer than 30,000 characters.
Takashi Matsuo06694102015-09-11 13:55:40 -0700327 "alternateLink": "A String", # Absolute link to this course in the Classroom web UI. Read-only.
328 "enrollmentCode": "A String", # Enrollment code to use when joining this course. Specifying this field in a course update mask will result in an error. Read-only.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800329 "section": "A String", # Section of the course. For example, "Period 2". If set, this field must be a valid UTF-8 string and no longer than 2800 characters.
Takashi Matsuo06694102015-09-11 13:55:40 -0700330 "creationTime": "A String", # Creation time of the course. Specifying this field in a course update mask will result in an error. Read-only.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800331 "name": "A String", # Name of the course. For example, "10th Grade Biology". The name is required. It must be between 1 and 750 characters and a valid UTF-8 string.
332 "courseState": "A String", # State of the course. If unspecified, the default state is `PROVISIONED`.
333 "ownerId": "A String", # The identifier of the owner of a course. When specified as a parameter of a create course request, this field is required. The identifier can be one of the following: * the numeric identifier for the user * the email address of the user * the string literal `"me"`, indicating the requesting user This must be set in a create request. Specifying this field in a course update mask will result in an `INVALID_ARGUMENT` error.
334 "id": "A String", # Identifier for this course assigned by Classroom. When creating a course, you may optionally set this identifier to an alias string in the request to create a corresponding alias. The `id` is still assigned by Classroom and cannot be updated after the course is created. Specifying this field in a course update mask will result in an error.
335 "descriptionHeading": "A String", # Optional heading for the description. For example, "Welcome to 10th Grade Biology." If set, this field must be a valid UTF-8 string and no longer than 3600 characters.
336 "room": "A String", # Optional room location. For example, "301". If set, this field must be a valid UTF-8 string and no longer than 650 characters.
Takashi Matsuo06694102015-09-11 13:55:40 -0700337 }</pre>
338</div>
339
340</body></html>