blob: 5aa48b258ba1c62033f22a3189d4c01a982cdd89 [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -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.registrations.html">registrations</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#create">create(body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Creates a `Registration`, causing Classroom to start sending notifications</p>
80<p class="toc_element">
81 <code><a href="#delete">delete(registrationId, x__xgafv=None)</a></code></p>
82<p class="firstline">Deletes a `Registration`, causing Classroom to stop sending notifications</p>
83<h3>Method Details</h3>
84<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -070085 <code class="details" id="create">create(body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070086 <pre>Creates a `Registration`, causing Classroom to start sending notifications
87from the provided `feed` to the destination provided in `cloudPubSubTopic`.
88
89Returns the created `Registration`. Currently, this will be the same as
90the argument, but with server-assigned fields such as `expiry_time` and
91`id` filled in.
92
93Note that any value specified for the `expiry_time` or `id` fields will be
94ignored.
95
96While Classroom may validate the `cloudPubSubTopic` and return errors on a
Bu Sun Kim65020912020-05-20 12:08:20 -070097best effort basis, it is the caller&#x27;s responsibility to ensure that it
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070098exists and that Classroom has permission to publish to it.
99
100This method may return the following error codes:
101
102* `PERMISSION_DENIED` if:
103 * the authenticated user does not have permission to receive
104 notifications from the requested field; or
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700105 * the current user has not granted access to the current Cloud project
106 with the appropriate scope for the requested feed. Note that
107 domain-wide delegation of authority is not currently supported for
108 this purpose. If the request has the appropriate scope, but no grant
109 exists, a Request Errors is returned.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700110 * another access error is encountered.
111* `INVALID_ARGUMENT` if:
112 * no `cloudPubsubTopic` is specified, or the specified
113 `cloudPubsubTopic` is not valid; or
114 * no `feed` is specified, or the specified `feed` is not valid.
115* `NOT_FOUND` if:
116 * the specified `feed` cannot be located, or the requesting user does
117 not have permission to determine whether or not it exists; or
118 * the specified `cloudPubsubTopic` cannot be located, or Classroom has
119 not been granted permission to publish to it.
120
121Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700122 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700123 The object takes the form of:
124
125{ # An instruction to Classroom to send notifications from the `feed` to the
126 # provided destination.
Bu Sun Kim65020912020-05-20 12:08:20 -0700127 &quot;cloudPubsubTopic&quot;: { # A reference to a Cloud Pub/Sub topic. # The Cloud Pub/Sub topic that notifications are to be sent to.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700128 #
129 # To register for notifications, the owner of the topic must grant
130 # `classroom-notifications@system.gserviceaccount.com` the
131 # `projects.topics.publish` permission.
Bu Sun Kim65020912020-05-20 12:08:20 -0700132 &quot;topicName&quot;: &quot;A String&quot;, # The `name` field of a Cloud Pub/Sub
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700133 # [Topic](https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics#Topic).
134 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700135 &quot;registrationId&quot;: &quot;A String&quot;, # A server-generated unique identifier for this `Registration`.
136 #
137 # Read-only.
Bu Sun Kim65020912020-05-20 12:08:20 -0700138 &quot;expiryTime&quot;: &quot;A String&quot;, # The time until which the `Registration` is effective.
139 #
140 # This is a read-only field assigned by the server.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700141 &quot;feed&quot;: { # A class of notifications that an application can register to receive. # Specification for the class of notifications that Classroom should deliver
142 # to the destination.
143 # For example: &quot;all roster changes for a domain&quot;.
144 &quot;courseWorkChangesInfo&quot;: { # Information about a `Feed` with a `feed_type` of `COURSE_WORK_CHANGES`. # Information about a `Feed` with a `feed_type` of `COURSE_WORK_CHANGES`.
145 # This field must be specified if `feed_type` is `COURSE_WORK_CHANGES`.
146 &quot;courseId&quot;: &quot;A String&quot;, # The `course_id` of the course to subscribe to work changes for.
147 },
148 &quot;feedType&quot;: &quot;A String&quot;, # The type of feed.
149 &quot;courseRosterChangesInfo&quot;: { # Information about a `Feed` with a `feed_type` of `COURSE_ROSTER_CHANGES`. # Information about a `Feed` with a `feed_type` of `COURSE_ROSTER_CHANGES`.
150 # This field must be specified if `feed_type` is `COURSE_ROSTER_CHANGES`.
151 &quot;courseId&quot;: &quot;A String&quot;, # The `course_id` of the course to subscribe to roster changes for.
152 },
153 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700154 }
155
156 x__xgafv: string, V1 error format.
157 Allowed values
158 1 - v1 error format
159 2 - v2 error format
160
161Returns:
162 An object of the form:
163
164 { # An instruction to Classroom to send notifications from the `feed` to the
165 # provided destination.
Bu Sun Kim65020912020-05-20 12:08:20 -0700166 &quot;cloudPubsubTopic&quot;: { # A reference to a Cloud Pub/Sub topic. # The Cloud Pub/Sub topic that notifications are to be sent to.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700167 #
168 # To register for notifications, the owner of the topic must grant
169 # `classroom-notifications@system.gserviceaccount.com` the
170 # `projects.topics.publish` permission.
Bu Sun Kim65020912020-05-20 12:08:20 -0700171 &quot;topicName&quot;: &quot;A String&quot;, # The `name` field of a Cloud Pub/Sub
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700172 # [Topic](https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics#Topic).
173 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700174 &quot;registrationId&quot;: &quot;A String&quot;, # A server-generated unique identifier for this `Registration`.
175 #
176 # Read-only.
Bu Sun Kim65020912020-05-20 12:08:20 -0700177 &quot;expiryTime&quot;: &quot;A String&quot;, # The time until which the `Registration` is effective.
178 #
179 # This is a read-only field assigned by the server.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700180 &quot;feed&quot;: { # A class of notifications that an application can register to receive. # Specification for the class of notifications that Classroom should deliver
181 # to the destination.
182 # For example: &quot;all roster changes for a domain&quot;.
183 &quot;courseWorkChangesInfo&quot;: { # Information about a `Feed` with a `feed_type` of `COURSE_WORK_CHANGES`. # Information about a `Feed` with a `feed_type` of `COURSE_WORK_CHANGES`.
184 # This field must be specified if `feed_type` is `COURSE_WORK_CHANGES`.
185 &quot;courseId&quot;: &quot;A String&quot;, # The `course_id` of the course to subscribe to work changes for.
186 },
187 &quot;feedType&quot;: &quot;A String&quot;, # The type of feed.
188 &quot;courseRosterChangesInfo&quot;: { # Information about a `Feed` with a `feed_type` of `COURSE_ROSTER_CHANGES`. # Information about a `Feed` with a `feed_type` of `COURSE_ROSTER_CHANGES`.
189 # This field must be specified if `feed_type` is `COURSE_ROSTER_CHANGES`.
190 &quot;courseId&quot;: &quot;A String&quot;, # The `course_id` of the course to subscribe to roster changes for.
191 },
192 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700193 }</pre>
194</div>
195
196<div class="method">
197 <code class="details" id="delete">delete(registrationId, x__xgafv=None)</code>
198 <pre>Deletes a `Registration`, causing Classroom to stop sending notifications
199for that `Registration`.
200
201Args:
202 registrationId: string, The `registration_id` of the `Registration` to be deleted. (required)
203 x__xgafv: string, V1 error format.
204 Allowed values
205 1 - v1 error format
206 2 - v2 error format
207
208Returns:
209 An object of the form:
210
211 { # A generic empty message that you can re-use to avoid defining duplicated
212 # empty messages in your APIs. A typical example is to use it as the request
213 # or the response type of an API method. For instance:
214 #
215 # service Foo {
216 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
217 # }
218 #
219 # The JSON representation for `Empty` is empty JSON object `{}`.
220 }</pre>
221</div>
222
223</body></html>