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.registrations.html">registrations</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="#create">create(body, x__xgafv=None)</a></code></p>
79<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">
85    <code class="details" id="create">create(body, x__xgafv=None)</code>
86  <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
97best effort basis, it is the caller's responsibility to ensure that it
98exists 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
105    * the credential provided does not include the appropriate scope for
106      the requested feed.
107    * another access error is encountered.
108* `INVALID_ARGUMENT` if:
109    * no `cloudPubsubTopic` is specified, or the specified
110      `cloudPubsubTopic` is not valid; or
111    * no `feed` is specified, or the specified `feed` is not valid.
112* `NOT_FOUND` if:
113    * the specified `feed` cannot be located, or the requesting user does
114      not have permission to determine whether or not it exists; or
115    * the specified `cloudPubsubTopic` cannot be located, or Classroom has
116      not been granted permission to publish to it.
117
118Args:
119  body: object, The request body. (required)
120    The object takes the form of:
121
122{ # An instruction to Classroom to send notifications from the `feed` to the
123      # provided destination.
124    "feed": { # A class of notifications that an application can register to receive. # Specification for the class of notifications that Classroom should deliver
125        # to the destination.
126        # For example: "all roster changes for a domain".
127      "feedType": "A String", # The type of feed.
128      "courseWorkChangesInfo": { # Information about a `Feed` with a `feed_type` of `COURSE_WORK_CHANGES`. # Information about a `Feed` with a `feed_type` of `COURSE_WORK_CHANGES`.
129          # This field must be specified if `feed_type` is `COURSE_WORK_CHANGES`.
130        "courseId": "A String", # The `course_id` of the course to subscribe to work changes for.
131      },
132      "courseRosterChangesInfo": { # Information about a `Feed` with a `feed_type` of `COURSE_ROSTER_CHANGES`. # Information about a `Feed` with a `feed_type` of `COURSE_ROSTER_CHANGES`.
133          # This field must be specified if `feed_type` is `COURSE_ROSTER_CHANGES`.
134        "courseId": "A String", # The `course_id` of the course to subscribe to roster changes for.
135      },
136    },
137    "registrationId": "A String", # A server-generated unique identifier for this `Registration`.
138        #
139        # Read-only.
140    "expiryTime": "A String", # The time until which the `Registration` is effective.
141        #
142        # This is a read-only field assigned by the server.
143    "cloudPubsubTopic": { # A reference to a Cloud Pub/Sub topic. # The Cloud Pub/Sub topic that notifications are to be sent to.
144        #
145        # To register for notifications, the owner of the topic must grant
146        # `classroom-notifications@system.gserviceaccount.com` the
147        #  `projects.topics.publish` permission.
148      "topicName": "A String", # The `name` field of a Cloud Pub/Sub
149          # [Topic](https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics#Topic).
150    },
151  }
152
153  x__xgafv: string, V1 error format.
154    Allowed values
155      1 - v1 error format
156      2 - v2 error format
157
158Returns:
159  An object of the form:
160
161    { # An instruction to Classroom to send notifications from the `feed` to the
162        # provided destination.
163      "feed": { # A class of notifications that an application can register to receive. # Specification for the class of notifications that Classroom should deliver
164          # to the destination.
165          # For example: "all roster changes for a domain".
166        "feedType": "A String", # The type of feed.
167        "courseWorkChangesInfo": { # Information about a `Feed` with a `feed_type` of `COURSE_WORK_CHANGES`. # Information about a `Feed` with a `feed_type` of `COURSE_WORK_CHANGES`.
168            # This field must be specified if `feed_type` is `COURSE_WORK_CHANGES`.
169          "courseId": "A String", # The `course_id` of the course to subscribe to work changes for.
170        },
171        "courseRosterChangesInfo": { # Information about a `Feed` with a `feed_type` of `COURSE_ROSTER_CHANGES`. # Information about a `Feed` with a `feed_type` of `COURSE_ROSTER_CHANGES`.
172            # This field must be specified if `feed_type` is `COURSE_ROSTER_CHANGES`.
173          "courseId": "A String", # The `course_id` of the course to subscribe to roster changes for.
174        },
175      },
176      "registrationId": "A String", # A server-generated unique identifier for this `Registration`.
177          #
178          # Read-only.
179      "expiryTime": "A String", # The time until which the `Registration` is effective.
180          #
181          # This is a read-only field assigned by the server.
182      "cloudPubsubTopic": { # A reference to a Cloud Pub/Sub topic. # The Cloud Pub/Sub topic that notifications are to be sent to.
183          #
184          # To register for notifications, the owner of the topic must grant
185          # `classroom-notifications@system.gserviceaccount.com` the
186          #  `projects.topics.publish` permission.
187        "topicName": "A String", # The `name` field of a Cloud Pub/Sub
188            # [Topic](https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics#Topic).
189      },
190    }</pre>
191</div>
192
193<div class="method">
194    <code class="details" id="delete">delete(registrationId, x__xgafv=None)</code>
195  <pre>Deletes a `Registration`, causing Classroom to stop sending notifications
196for that `Registration`.
197
198Args:
199  registrationId: string, The `registration_id` of the `Registration` to be deleted. (required)
200  x__xgafv: string, V1 error format.
201    Allowed values
202      1 - v1 error format
203      2 - v2 error format
204
205Returns:
206  An object of the form:
207
208    { # A generic empty message that you can re-use to avoid defining duplicated
209      # empty messages in your APIs. A typical example is to use it as the request
210      # or the response type of an API method. For instance:
211      #
212      #     service Foo {
213      #       rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
214      #     }
215      #
216      # The JSON representation for `Empty` is empty JSON object `{}`.
217  }</pre>
218</div>
219
220</body></html>