blob: a862bed2635dee8d9a4d997d2726c7ca3f451380 [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> . <a href="classroom_v1.courses.teachers.html">teachers</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 teacher of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create teachers in this course. * `NOT_FOUND` if the requested course ID does not exist. * `ALREADY_EXISTS` if the user is already a teacher or student in the course.</p>
80<p class="toc_element">
81 <code><a href="#delete">delete(courseId, userId, x__xgafv=None)</a></code></p>
82<p class="firstline">Deletes a teacher of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to delete teachers of this course. * `NOT_FOUND` if no teacher of this course has the requested ID or if the course does not exist. * `FAILED_PRECONDITION` if the requested ID belongs to the primary teacher of this course.</p>
83<p class="toc_element">
84 <code><a href="#get">get(courseId, userId, x__xgafv=None)</a></code></p>
85<p class="firstline">Returns a teacher of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to view teachers of this course. * `NOT_FOUND` if no teacher of this course has the requested ID or if the course does not exist.</p>
86<p class="toc_element">
87 <code><a href="#list">list(courseId, pageSize=None, x__xgafv=None, pageToken=None)</a></code></p>
88<p class="firstline">Returns a list of teachers of this course that the requester is permitted to view. Fails with `NOT_FOUND` if the course does not exist.</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<h3>Method Details</h3>
93<div class="method">
94 <code class="details" id="create">create(courseId, body, x__xgafv=None)</code>
95 <pre>Creates a teacher of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create teachers in this course. * `NOT_FOUND` if the requested course ID does not exist. * `ALREADY_EXISTS` if the user is already a teacher or student in the course.
96
97Args:
98 courseId: string, Unique identifier of the course. This may either be the Classroom-assigned identifier or an alias. (required)
99 body: object, The request body. (required)
100 The object takes the form of:
101
102{ # Teacher of a course.
103 "courseId": "A String", # Unique identifier of the course. Read-only
104 "profile": { # Global information for a user. # Global user information for the teacher. Read-only
105 "permissions": [ # Global permissions of the user. Read-only
106 { # Global user permission description.
107 "permission": "A String", # Permission value.
108 },
109 ],
110 "photoUrl": "A String", # Url of user's profile photo. Read-only
111 "emailAddress": "A String", # E-mail address of the user. Read-only
112 "id": "A String", # Unique identifier of the user. Read-only
113 "name": { # Details of the user's name. # Name of the user. Read-only
114 "fullName": "A String", # The user's full name formed by concatenating the first and last name values. Read-only
115 "givenName": "A String", # The user's first name. Read-only
116 "familyName": "A String", # The user's last name. Read-only
117 },
118 },
119 "userId": "A String", # The identifier of the user. When specified as a parameter of request, this field may be set to an alias that identifies the teacher. The following are supported: * the e-mail address of the user * the string literal `"me"`, indicating the requesting user
120 }
121
122 x__xgafv: string, V1 error format.
123
124Returns:
125 An object of the form:
126
127 { # Teacher of a course.
128 "courseId": "A String", # Unique identifier of the course. Read-only
129 "profile": { # Global information for a user. # Global user information for the teacher. Read-only
130 "permissions": [ # Global permissions of the user. Read-only
131 { # Global user permission description.
132 "permission": "A String", # Permission value.
133 },
134 ],
135 "photoUrl": "A String", # Url of user's profile photo. Read-only
136 "emailAddress": "A String", # E-mail address of the user. Read-only
137 "id": "A String", # Unique identifier of the user. Read-only
138 "name": { # Details of the user's name. # Name of the user. Read-only
139 "fullName": "A String", # The user's full name formed by concatenating the first and last name values. Read-only
140 "givenName": "A String", # The user's first name. Read-only
141 "familyName": "A String", # The user's last name. Read-only
142 },
143 },
144 "userId": "A String", # The identifier of the user. When specified as a parameter of request, this field may be set to an alias that identifies the teacher. The following are supported: * the e-mail address of the user * the string literal `"me"`, indicating the requesting user
145 }</pre>
146</div>
147
148<div class="method">
149 <code class="details" id="delete">delete(courseId, userId, x__xgafv=None)</code>
150 <pre>Deletes a teacher of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to delete teachers of this course. * `NOT_FOUND` if no teacher of this course has the requested ID or if the course does not exist. * `FAILED_PRECONDITION` if the requested ID belongs to the primary teacher of this course.
151
152Args:
153 courseId: string, Unique identifier of the course. This may either be the Classroom-assigned identifier or an alias. (required)
154 userId: string, Identifier of the teacher to delete, or an alias the identifies the user. the following aliases are supported: * the e-mail address of the user * the string literal `"me"`, indicating that the requesting user (required)
155 x__xgafv: string, V1 error format.
156
157Returns:
158 An object of the form:
159
160 { # 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 `{}`.
161 }</pre>
162</div>
163
164<div class="method">
165 <code class="details" id="get">get(courseId, userId, x__xgafv=None)</code>
166 <pre>Returns a teacher of a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to view teachers of this course. * `NOT_FOUND` if no teacher of this course has the requested ID or if the course does not exist.
167
168Args:
169 courseId: string, Unique identifier of the course. This may either be the Classroom-assigned identifier or an alias. (required)
170 userId: string, Identifier of the teacher to return, or an alias the identifies the user. the following aliases are supported: * the e-mail address of the user * the string literal `"me"`, indicating that the requesting user (required)
171 x__xgafv: string, V1 error format.
172
173Returns:
174 An object of the form:
175
176 { # Teacher of a course.
177 "courseId": "A String", # Unique identifier of the course. Read-only
178 "profile": { # Global information for a user. # Global user information for the teacher. Read-only
179 "permissions": [ # Global permissions of the user. Read-only
180 { # Global user permission description.
181 "permission": "A String", # Permission value.
182 },
183 ],
184 "photoUrl": "A String", # Url of user's profile photo. Read-only
185 "emailAddress": "A String", # E-mail address of the user. Read-only
186 "id": "A String", # Unique identifier of the user. Read-only
187 "name": { # Details of the user's name. # Name of the user. Read-only
188 "fullName": "A String", # The user's full name formed by concatenating the first and last name values. Read-only
189 "givenName": "A String", # The user's first name. Read-only
190 "familyName": "A String", # The user's last name. Read-only
191 },
192 },
193 "userId": "A String", # The identifier of the user. When specified as a parameter of request, this field may be set to an alias that identifies the teacher. The following are supported: * the e-mail address of the user * the string literal `"me"`, indicating the requesting user
194 }</pre>
195</div>
196
197<div class="method">
198 <code class="details" id="list">list(courseId, pageSize=None, x__xgafv=None, pageToken=None)</code>
199 <pre>Returns a list of teachers of this course that the requester is permitted to view. Fails with `NOT_FOUND` if the course does not exist.
200
201Args:
202 courseId: string, Unique identifier of the course. This may either be the Classroom-assigned identifier or an alias. (required)
203 pageSize: integer, Maximum number of items to return. Zero means no maximum. The server may return fewer than the specified number of results.
204 x__xgafv: string, V1 error format.
205 pageToken: string, [nextPageToken][google.classroom.v1.ListTeachersResponse.next_page_token] value returned from a previous [list][google.classroom.v1.Users.ListTeachers] call, indicating that the subsequent page of results should be returned. The [list][google.classroom.v1.Users.ListTeachers] request must be identical to the one which resulted in this token.
206
207Returns:
208 An object of the form:
209
210 { # Response when listing teachers.
211 "nextPageToken": "A String", # Token identifying the next page of results to return. If empty, no further results are available.
212 "teachers": [ # The teachers who match the list request.
213 { # Teacher of a course.
214 "courseId": "A String", # Unique identifier of the course. Read-only
215 "profile": { # Global information for a user. # Global user information for the teacher. Read-only
216 "permissions": [ # Global permissions of the user. Read-only
217 { # Global user permission description.
218 "permission": "A String", # Permission value.
219 },
220 ],
221 "photoUrl": "A String", # Url of user's profile photo. Read-only
222 "emailAddress": "A String", # E-mail address of the user. Read-only
223 "id": "A String", # Unique identifier of the user. Read-only
224 "name": { # Details of the user's name. # Name of the user. Read-only
225 "fullName": "A String", # The user's full name formed by concatenating the first and last name values. Read-only
226 "givenName": "A String", # The user's first name. Read-only
227 "familyName": "A String", # The user's last name. Read-only
228 },
229 },
230 "userId": "A String", # The identifier of the user. When specified as a parameter of request, this field may be set to an alias that identifies the teacher. The following are supported: * the e-mail address of the user * the string literal `"me"`, indicating the requesting user
231 },
232 ],
233 }</pre>
234</div>
235
236<div class="method">
237 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
238 <pre>Retrieves the next page of results.
239
240Args:
241 previous_request: The request for the previous page. (required)
242 previous_response: The response from the request for the previous page. (required)
243
244Returns:
245 A request object that you can call 'execute()' on to request the next
246 page. Returns None if there are no more items in the collection.
247 </pre>
248</div>
249
250</body></html>