google-api-client 0.10.1 → 0.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/api_names.yaml +395 -0
- data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
- data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +254 -254
- data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +65 -65
- data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +220 -220
- data/generated/google/apis/admin_directory_v1.rb +1 -1
- data/generated/google/apis/admin_directory_v1/classes.rb +106 -0
- data/generated/google/apis/admin_directory_v1/representations.rb +37 -0
- data/generated/google/apis/admin_reports_v1.rb +3 -3
- data/generated/google/apis/admin_reports_v1/service.rb +6 -6
- data/generated/google/apis/adsense_v1_4.rb +1 -1
- data/generated/google/apis/adsensehost_v4_1.rb +1 -1
- data/generated/google/apis/analytics_v3.rb +1 -1
- data/generated/google/apis/analytics_v3/service.rb +39 -0
- data/generated/google/apis/analyticsreporting_v4/classes.rb +920 -920
- data/generated/google/apis/analyticsreporting_v4/representations.rb +197 -197
- data/generated/google/apis/analyticsreporting_v4/service.rb +4 -4
- data/generated/google/apis/androidenterprise_v1.rb +1 -1
- data/generated/google/apis/androidenterprise_v1/classes.rb +8 -13
- data/generated/google/apis/androidenterprise_v1/service.rb +3 -3
- data/generated/google/apis/appengine_v1beta5.rb +1 -1
- data/generated/google/apis/appengine_v1beta5/classes.rb +115 -5
- data/generated/google/apis/appengine_v1beta5/representations.rb +37 -0
- data/generated/google/apis/appengine_v1beta5/service.rb +12 -9
- data/generated/google/apis/appstate_v1.rb +1 -1
- data/generated/google/apis/bigquery_v2.rb +1 -1
- data/generated/google/apis/bigquery_v2/classes.rb +32 -37
- data/generated/google/apis/bigquery_v2/service.rb +10 -2
- data/generated/google/apis/calendar_v3.rb +1 -1
- data/generated/google/apis/calendar_v3/classes.rb +205 -0
- data/generated/google/apis/calendar_v3/representations.rb +97 -0
- data/generated/google/apis/classroom_v1.rb +22 -25
- data/generated/google/apis/classroom_v1/classes.rb +998 -907
- data/generated/google/apis/classroom_v1/representations.rb +240 -240
- data/generated/google/apis/classroom_v1/service.rb +1269 -1061
- data/generated/google/apis/cloudbuild_v1.rb +1 -1
- data/generated/google/apis/cloudbuild_v1/classes.rb +164 -163
- data/generated/google/apis/cloudbuild_v1/representations.rb +31 -31
- data/generated/google/apis/cloudbuild_v1/service.rb +114 -114
- data/generated/google/apis/clouddebugger_v2.rb +1 -1
- data/generated/google/apis/clouddebugger_v2/classes.rb +687 -687
- data/generated/google/apis/clouddebugger_v2/representations.rb +147 -147
- data/generated/google/apis/clouddebugger_v2/service.rb +132 -132
- data/generated/google/apis/cloudkms_v1.rb +1 -1
- data/generated/google/apis/cloudkms_v1/classes.rb +231 -248
- data/generated/google/apis/cloudkms_v1/representations.rb +74 -74
- data/generated/google/apis/cloudkms_v1/service.rb +228 -228
- data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1/classes.rb +738 -128
- data/generated/google/apis/cloudresourcemanager_v1/representations.rb +245 -23
- data/generated/google/apis/cloudresourcemanager_v1/service.rb +1293 -249
- data/generated/google/apis/cloudresourcemanager_v1beta1.rb +4 -4
- data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +982 -372
- data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +293 -71
- data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +626 -277
- data/generated/google/apis/cloudtrace_v1.rb +1 -1
- data/generated/google/apis/cloudtrace_v1/classes.rb +19 -19
- data/generated/google/apis/cloudtrace_v1/representations.rb +2 -2
- data/generated/google/apis/cloudtrace_v1/service.rb +30 -30
- data/generated/google/apis/compute_beta.rb +1 -1
- data/generated/google/apis/compute_beta/classes.rb +116 -0
- data/generated/google/apis/compute_beta/representations.rb +48 -0
- data/generated/google/apis/compute_beta/service.rb +46 -1
- data/generated/google/apis/compute_v1.rb +1 -1
- data/generated/google/apis/dataflow_v1b3.rb +1 -1
- data/generated/google/apis/dataflow_v1b3/classes.rb +3276 -3320
- data/generated/google/apis/dataflow_v1b3/representations.rb +779 -781
- data/generated/google/apis/dataflow_v1b3/service.rb +225 -225
- data/generated/google/apis/dataproc_v1.rb +1 -1
- data/generated/google/apis/dataproc_v1/classes.rb +1221 -1207
- data/generated/google/apis/dataproc_v1/representations.rb +255 -253
- data/generated/google/apis/dataproc_v1/service.rb +100 -100
- data/generated/google/apis/deploymentmanager_v2.rb +1 -1
- data/generated/google/apis/deploymentmanager_v2/classes.rb +5 -5
- data/generated/google/apis/dns_v1.rb +1 -1
- data/generated/google/apis/dns_v2beta1.rb +1 -1
- data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
- data/generated/google/apis/drive_v2.rb +1 -1
- data/generated/google/apis/drive_v2/classes.rb +3 -1
- data/generated/google/apis/drive_v3.rb +1 -1
- data/generated/google/apis/drive_v3/classes.rb +3 -1
- data/generated/google/apis/fusiontables_v2.rb +1 -1
- data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
- data/generated/google/apis/games_management_v1management.rb +1 -1
- data/generated/google/apis/games_v1.rb +1 -1
- data/generated/google/apis/genomics_v1.rb +7 -7
- data/generated/google/apis/genomics_v1/classes.rb +959 -959
- data/generated/google/apis/genomics_v1/representations.rb +238 -238
- data/generated/google/apis/genomics_v1/service.rb +996 -996
- data/generated/google/apis/iam_v1.rb +1 -1
- data/generated/google/apis/iam_v1/classes.rb +440 -440
- data/generated/google/apis/iam_v1/representations.rb +94 -94
- data/generated/google/apis/iam_v1/service.rb +170 -173
- data/generated/google/apis/identitytoolkit_v3.rb +1 -1
- data/generated/google/apis/identitytoolkit_v3/classes.rb +55 -0
- data/generated/google/apis/identitytoolkit_v3/representations.rb +8 -0
- data/generated/google/apis/kgsearch_v1/service.rb +4 -4
- data/generated/google/apis/language_v1beta1.rb +1 -1
- data/generated/google/apis/language_v1beta1/classes.rb +427 -427
- data/generated/google/apis/language_v1beta1/representations.rb +113 -113
- data/generated/google/apis/language_v1beta1/service.rb +25 -24
- data/generated/google/apis/licensing_v1.rb +2 -2
- data/generated/google/apis/licensing_v1/classes.rb +14 -2
- data/generated/google/apis/licensing_v1/representations.rb +2 -0
- data/generated/google/apis/licensing_v1/service.rb +1 -1
- data/generated/google/apis/logging_v2beta1.rb +1 -1
- data/generated/google/apis/logging_v2beta1/classes.rb +864 -864
- data/generated/google/apis/logging_v2beta1/representations.rb +168 -168
- data/generated/google/apis/logging_v2beta1/service.rb +261 -261
- data/generated/google/apis/manufacturers_v1.rb +1 -1
- data/generated/google/apis/manufacturers_v1/classes.rb +452 -105
- data/generated/google/apis/manufacturers_v1/representations.rb +138 -18
- data/generated/google/apis/manufacturers_v1/service.rb +11 -11
- data/generated/google/apis/mirror_v1.rb +1 -1
- data/generated/google/apis/monitoring_v3.rb +7 -7
- data/generated/google/apis/monitoring_v3/classes.rb +668 -670
- data/generated/google/apis/monitoring_v3/representations.rb +140 -140
- data/generated/google/apis/monitoring_v3/service.rb +208 -208
- data/generated/google/apis/partners_v2.rb +1 -1
- data/generated/google/apis/partners_v2/classes.rb +505 -505
- data/generated/google/apis/partners_v2/representations.rb +118 -118
- data/generated/google/apis/partners_v2/service.rb +275 -275
- data/generated/google/apis/people_v1.rb +1 -1
- data/generated/google/apis/people_v1/classes.rb +1037 -1031
- data/generated/google/apis/people_v1/representations.rb +247 -246
- data/generated/google/apis/people_v1/service.rb +20 -20
- data/generated/google/apis/plus_domains_v1.rb +1 -1
- data/generated/google/apis/plus_v1.rb +1 -1
- data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
- data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +392 -392
- data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +93 -93
- data/generated/google/apis/proximitybeacon_v1beta1/service.rb +381 -381
- data/generated/google/apis/pubsub_v1.rb +4 -4
- data/generated/google/apis/pubsub_v1/classes.rb +131 -132
- data/generated/google/apis/pubsub_v1/representations.rb +35 -35
- data/generated/google/apis/pubsub_v1/service.rb +399 -408
- data/generated/google/apis/reseller_v1.rb +1 -1
- data/generated/google/apis/reseller_v1/classes.rb +9 -0
- data/generated/google/apis/reseller_v1/representations.rb +1 -0
- data/generated/google/apis/script_v1.rb +9 -9
- data/generated/google/apis/script_v1/classes.rb +110 -110
- data/generated/google/apis/script_v1/representations.rb +26 -26
- data/generated/google/apis/sheets_v4.rb +4 -4
- data/generated/google/apis/sheets_v4/classes.rb +4329 -4329
- data/generated/google/apis/sheets_v4/representations.rb +856 -856
- data/generated/google/apis/sheets_v4/service.rb +106 -106
- data/generated/google/apis/slides_v1.rb +4 -4
- data/generated/google/apis/slides_v1/classes.rb +2923 -2841
- data/generated/google/apis/slides_v1/representations.rb +722 -691
- data/generated/google/apis/slides_v1/service.rb +58 -15
- data/generated/google/apis/speech_v1beta1.rb +1 -1
- data/generated/google/apis/speech_v1beta1/classes.rb +191 -191
- data/generated/google/apis/speech_v1beta1/representations.rb +57 -57
- data/generated/google/apis/speech_v1beta1/service.rb +70 -70
- data/generated/google/apis/storage_v1.rb +1 -1
- data/generated/google/apis/storage_v1/classes.rb +151 -0
- data/generated/google/apis/storage_v1/representations.rb +45 -0
- data/generated/google/apis/storage_v1/service.rb +248 -0
- data/generated/google/apis/vision_v1.rb +1 -1
- data/generated/google/apis/vision_v1/classes.rb +1227 -1221
- data/generated/google/apis/vision_v1/representations.rb +217 -215
- data/generated/google/apis/webmasters_v3.rb +1 -1
- data/generated/google/apis/youtube_analytics_v1.rb +1 -1
- data/generated/google/apis/youtube_partner_v1.rb +1 -1
- data/generated/google/apis/youtube_partner_v1/classes.rb +78 -0
- data/generated/google/apis/youtube_partner_v1/representations.rb +34 -0
- data/generated/google/apis/youtube_partner_v1/service.rb +40 -0
- data/generated/google/apis/youtubereporting_v1.rb +4 -4
- data/generated/google/apis/youtubereporting_v1/classes.rb +65 -65
- data/generated/google/apis/youtubereporting_v1/representations.rb +18 -18
- data/generated/google/apis/youtubereporting_v1/service.rb +111 -111
- data/lib/google/apis/version.rb +1 -1
- metadata +2 -2
|
@@ -46,172 +46,187 @@ module Google
|
|
|
46
46
|
super('https://classroom.googleapis.com/', '')
|
|
47
47
|
end
|
|
48
48
|
|
|
49
|
-
# Creates
|
|
50
|
-
#
|
|
51
|
-
#
|
|
52
|
-
#
|
|
53
|
-
#
|
|
54
|
-
#
|
|
55
|
-
#
|
|
56
|
-
#
|
|
57
|
-
#
|
|
58
|
-
#
|
|
49
|
+
# Creates an invitation. Only one invitation for a user and course may exist
|
|
50
|
+
# at a time. Delete and re-create an invitation to make changes.
|
|
51
|
+
# This method returns the following error codes:
|
|
52
|
+
# * `PERMISSION_DENIED` if the requesting user is not permitted to create
|
|
53
|
+
# invitations for this course or for access errors.
|
|
54
|
+
# * `NOT_FOUND` if the course or the user does not exist.
|
|
55
|
+
# * `FAILED_PRECONDITION` if the requested user's account is disabled or if
|
|
56
|
+
# the user already has this role or a role with greater permissions.
|
|
57
|
+
# * `ALREADY_EXISTS` if an invitation for the specified user and course
|
|
58
|
+
# already exists.
|
|
59
|
+
# @param [Google::Apis::ClassroomV1::Invitation] invitation_object
|
|
59
60
|
# @param [String] quota_user
|
|
60
61
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
61
62
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
63
|
+
# @param [String] fields
|
|
64
|
+
# Selector specifying which fields to include in a partial response.
|
|
62
65
|
# @param [Google::Apis::RequestOptions] options
|
|
63
66
|
# Request-specific options
|
|
64
67
|
#
|
|
65
68
|
# @yield [result, err] Result & error if block supplied
|
|
66
|
-
# @yieldparam result [Google::Apis::ClassroomV1::
|
|
69
|
+
# @yieldparam result [Google::Apis::ClassroomV1::Invitation] parsed result object
|
|
67
70
|
# @yieldparam err [StandardError] error object if request failed
|
|
68
71
|
#
|
|
69
|
-
# @return [Google::Apis::ClassroomV1::
|
|
72
|
+
# @return [Google::Apis::ClassroomV1::Invitation]
|
|
70
73
|
#
|
|
71
74
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
72
75
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
73
76
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
74
|
-
def
|
|
75
|
-
command = make_simple_command(:post, 'v1/
|
|
76
|
-
command.request_representation = Google::Apis::ClassroomV1::
|
|
77
|
-
command.request_object =
|
|
78
|
-
command.response_representation = Google::Apis::ClassroomV1::
|
|
79
|
-
command.response_class = Google::Apis::ClassroomV1::
|
|
80
|
-
command.query['fields'] = fields unless fields.nil?
|
|
77
|
+
def create_invitation(invitation_object = nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
78
|
+
command = make_simple_command(:post, 'v1/invitations', options)
|
|
79
|
+
command.request_representation = Google::Apis::ClassroomV1::Invitation::Representation
|
|
80
|
+
command.request_object = invitation_object
|
|
81
|
+
command.response_representation = Google::Apis::ClassroomV1::Invitation::Representation
|
|
82
|
+
command.response_class = Google::Apis::ClassroomV1::Invitation
|
|
81
83
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
84
|
+
command.query['fields'] = fields unless fields.nil?
|
|
82
85
|
execute_or_queue_command(command, &block)
|
|
83
86
|
end
|
|
84
87
|
|
|
85
|
-
# Returns
|
|
86
|
-
#
|
|
87
|
-
#
|
|
88
|
-
#
|
|
88
|
+
# Returns an invitation.
|
|
89
|
+
# This method returns the following error codes:
|
|
90
|
+
# * `PERMISSION_DENIED` if the requesting user is not permitted to view the
|
|
91
|
+
# requested invitation or for access errors.
|
|
92
|
+
# * `NOT_FOUND` if no invitation exists with the requested ID.
|
|
89
93
|
# @param [String] id
|
|
90
|
-
# Identifier of the
|
|
91
|
-
# Classroom-assigned identifier or an alias.
|
|
92
|
-
# @param [String] fields
|
|
93
|
-
# Selector specifying which fields to include in a partial response.
|
|
94
|
+
# Identifier of the invitation to return.
|
|
94
95
|
# @param [String] quota_user
|
|
95
96
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
96
97
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
98
|
+
# @param [String] fields
|
|
99
|
+
# Selector specifying which fields to include in a partial response.
|
|
97
100
|
# @param [Google::Apis::RequestOptions] options
|
|
98
101
|
# Request-specific options
|
|
99
102
|
#
|
|
100
103
|
# @yield [result, err] Result & error if block supplied
|
|
101
|
-
# @yieldparam result [Google::Apis::ClassroomV1::
|
|
104
|
+
# @yieldparam result [Google::Apis::ClassroomV1::Invitation] parsed result object
|
|
102
105
|
# @yieldparam err [StandardError] error object if request failed
|
|
103
106
|
#
|
|
104
|
-
# @return [Google::Apis::ClassroomV1::
|
|
107
|
+
# @return [Google::Apis::ClassroomV1::Invitation]
|
|
105
108
|
#
|
|
106
109
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
107
110
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
108
111
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
109
|
-
def
|
|
110
|
-
command = make_simple_command(:get, 'v1/
|
|
111
|
-
command.response_representation = Google::Apis::ClassroomV1::
|
|
112
|
-
command.response_class = Google::Apis::ClassroomV1::
|
|
112
|
+
def get_invitation(id, quota_user: nil, fields: nil, options: nil, &block)
|
|
113
|
+
command = make_simple_command(:get, 'v1/invitations/{id}', options)
|
|
114
|
+
command.response_representation = Google::Apis::ClassroomV1::Invitation::Representation
|
|
115
|
+
command.response_class = Google::Apis::ClassroomV1::Invitation
|
|
113
116
|
command.params['id'] = id unless id.nil?
|
|
114
|
-
command.query['fields'] = fields unless fields.nil?
|
|
115
117
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
118
|
+
command.query['fields'] = fields unless fields.nil?
|
|
116
119
|
execute_or_queue_command(command, &block)
|
|
117
120
|
end
|
|
118
121
|
|
|
119
|
-
#
|
|
120
|
-
#
|
|
121
|
-
#
|
|
122
|
-
#
|
|
123
|
-
#
|
|
124
|
-
#
|
|
125
|
-
#
|
|
126
|
-
#
|
|
127
|
-
#
|
|
128
|
-
# @param [
|
|
129
|
-
#
|
|
122
|
+
# Returns a list of invitations that the requesting user is permitted to
|
|
123
|
+
# view, restricted to those that match the list request.
|
|
124
|
+
# *Note:* At least one of `user_id` or `course_id` must be supplied. Both
|
|
125
|
+
# fields can be supplied.
|
|
126
|
+
# This method returns the following error codes:
|
|
127
|
+
# * `PERMISSION_DENIED` for access errors.
|
|
128
|
+
# @param [String] course_id
|
|
129
|
+
# Restricts returned invitations to those for a course with the specified
|
|
130
|
+
# identifier.
|
|
131
|
+
# @param [Fixnum] page_size
|
|
132
|
+
# Maximum number of items to return. Zero means no maximum.
|
|
133
|
+
# The server may return fewer than the specified number of results.
|
|
134
|
+
# @param [String] user_id
|
|
135
|
+
# Restricts returned invitations to those for a specific user. The identifier
|
|
136
|
+
# can be one of the following:
|
|
137
|
+
# * the numeric identifier for the user
|
|
138
|
+
# * the email address of the user
|
|
139
|
+
# * the string literal `"me"`, indicating the requesting user
|
|
140
|
+
# @param [String] page_token
|
|
141
|
+
# nextPageToken
|
|
142
|
+
# value returned from a previous
|
|
143
|
+
# list call, indicating
|
|
144
|
+
# that the subsequent page of results should be returned.
|
|
145
|
+
# The list request must be
|
|
146
|
+
# otherwise identical to the one that resulted in this token.
|
|
130
147
|
# @param [String] quota_user
|
|
131
148
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
132
149
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
150
|
+
# @param [String] fields
|
|
151
|
+
# Selector specifying which fields to include in a partial response.
|
|
133
152
|
# @param [Google::Apis::RequestOptions] options
|
|
134
153
|
# Request-specific options
|
|
135
154
|
#
|
|
136
155
|
# @yield [result, err] Result & error if block supplied
|
|
137
|
-
# @yieldparam result [Google::Apis::ClassroomV1::
|
|
156
|
+
# @yieldparam result [Google::Apis::ClassroomV1::ListInvitationsResponse] parsed result object
|
|
138
157
|
# @yieldparam err [StandardError] error object if request failed
|
|
139
158
|
#
|
|
140
|
-
# @return [Google::Apis::ClassroomV1::
|
|
159
|
+
# @return [Google::Apis::ClassroomV1::ListInvitationsResponse]
|
|
141
160
|
#
|
|
142
161
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
143
162
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
144
163
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
145
|
-
def
|
|
146
|
-
command = make_simple_command(:
|
|
147
|
-
command.
|
|
148
|
-
command.
|
|
149
|
-
command.
|
|
150
|
-
command.
|
|
151
|
-
command.
|
|
152
|
-
command.query['
|
|
164
|
+
def list_invitations(course_id: nil, page_size: nil, user_id: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
165
|
+
command = make_simple_command(:get, 'v1/invitations', options)
|
|
166
|
+
command.response_representation = Google::Apis::ClassroomV1::ListInvitationsResponse::Representation
|
|
167
|
+
command.response_class = Google::Apis::ClassroomV1::ListInvitationsResponse
|
|
168
|
+
command.query['courseId'] = course_id unless course_id.nil?
|
|
169
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
|
170
|
+
command.query['userId'] = user_id unless user_id.nil?
|
|
171
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
153
172
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
173
|
+
command.query['fields'] = fields unless fields.nil?
|
|
154
174
|
execute_or_queue_command(command, &block)
|
|
155
175
|
end
|
|
156
176
|
|
|
157
|
-
#
|
|
158
|
-
#
|
|
159
|
-
#
|
|
160
|
-
#
|
|
161
|
-
#
|
|
162
|
-
# FAILED_PRECONDITION` for the following request errors: * CourseNotModifiable
|
|
177
|
+
# Deletes an invitation.
|
|
178
|
+
# This method returns the following error codes:
|
|
179
|
+
# * `PERMISSION_DENIED` if the requesting user is not permitted to delete the
|
|
180
|
+
# requested invitation or for access errors.
|
|
181
|
+
# * `NOT_FOUND` if no invitation exists with the requested ID.
|
|
163
182
|
# @param [String] id
|
|
164
|
-
# Identifier of the
|
|
165
|
-
# Classroom-assigned identifier or an alias.
|
|
166
|
-
# @param [Google::Apis::ClassroomV1::Course] course_object
|
|
167
|
-
# @param [String] update_mask
|
|
168
|
-
# Mask that identifies which fields on the course to update. This field is
|
|
169
|
-
# required to do an update. The update will fail if invalid fields are specified.
|
|
170
|
-
# The following fields are valid: * `name` * `section` * `descriptionHeading` *
|
|
171
|
-
# `description` * `room` * `courseState` When set in a query parameter, this
|
|
172
|
-
# field should be specified as `updateMask=,,...`
|
|
173
|
-
# @param [String] fields
|
|
174
|
-
# Selector specifying which fields to include in a partial response.
|
|
183
|
+
# Identifier of the invitation to delete.
|
|
175
184
|
# @param [String] quota_user
|
|
176
185
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
177
186
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
187
|
+
# @param [String] fields
|
|
188
|
+
# Selector specifying which fields to include in a partial response.
|
|
178
189
|
# @param [Google::Apis::RequestOptions] options
|
|
179
190
|
# Request-specific options
|
|
180
191
|
#
|
|
181
192
|
# @yield [result, err] Result & error if block supplied
|
|
182
|
-
# @yieldparam result [Google::Apis::ClassroomV1::
|
|
193
|
+
# @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object
|
|
183
194
|
# @yieldparam err [StandardError] error object if request failed
|
|
184
195
|
#
|
|
185
|
-
# @return [Google::Apis::ClassroomV1::
|
|
196
|
+
# @return [Google::Apis::ClassroomV1::Empty]
|
|
186
197
|
#
|
|
187
198
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
188
199
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
189
200
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
190
|
-
def
|
|
191
|
-
command = make_simple_command(:
|
|
192
|
-
command.
|
|
193
|
-
command.
|
|
194
|
-
command.response_representation = Google::Apis::ClassroomV1::Course::Representation
|
|
195
|
-
command.response_class = Google::Apis::ClassroomV1::Course
|
|
201
|
+
def delete_invitation(id, quota_user: nil, fields: nil, options: nil, &block)
|
|
202
|
+
command = make_simple_command(:delete, 'v1/invitations/{id}', options)
|
|
203
|
+
command.response_representation = Google::Apis::ClassroomV1::Empty::Representation
|
|
204
|
+
command.response_class = Google::Apis::ClassroomV1::Empty
|
|
196
205
|
command.params['id'] = id unless id.nil?
|
|
197
|
-
command.query['updateMask'] = update_mask unless update_mask.nil?
|
|
198
|
-
command.query['fields'] = fields unless fields.nil?
|
|
199
206
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
207
|
+
command.query['fields'] = fields unless fields.nil?
|
|
200
208
|
execute_or_queue_command(command, &block)
|
|
201
209
|
end
|
|
202
210
|
|
|
203
|
-
#
|
|
204
|
-
#
|
|
205
|
-
#
|
|
206
|
-
# the
|
|
211
|
+
# Accepts an invitation, removing it and adding the invited user to the
|
|
212
|
+
# teachers or students (as appropriate) of the specified course. Only the
|
|
213
|
+
# invited user may accept an invitation.
|
|
214
|
+
# This method returns the following error codes:
|
|
215
|
+
# * `PERMISSION_DENIED` if the requesting user is not permitted to accept the
|
|
216
|
+
# requested invitation or for access errors.
|
|
217
|
+
# * `FAILED_PRECONDITION` for the following request errors:
|
|
218
|
+
# * CourseMemberLimitReached
|
|
219
|
+
# * CourseNotModifiable
|
|
220
|
+
# * CourseTeacherLimitReached
|
|
221
|
+
# * UserGroupsMembershipLimitReached
|
|
222
|
+
# * `NOT_FOUND` if no invitation exists with the requested ID.
|
|
207
223
|
# @param [String] id
|
|
208
|
-
# Identifier of the
|
|
209
|
-
# Classroom-assigned identifier or an alias.
|
|
210
|
-
# @param [String] fields
|
|
211
|
-
# Selector specifying which fields to include in a partial response.
|
|
224
|
+
# Identifier of the invitation to accept.
|
|
212
225
|
# @param [String] quota_user
|
|
213
226
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
214
227
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
228
|
+
# @param [String] fields
|
|
229
|
+
# Selector specifying which fields to include in a partial response.
|
|
215
230
|
# @param [Google::Apis::RequestOptions] options
|
|
216
231
|
# Request-specific options
|
|
217
232
|
#
|
|
@@ -224,46 +239,53 @@ module Google
|
|
|
224
239
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
225
240
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
226
241
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
227
|
-
def
|
|
228
|
-
command = make_simple_command(:
|
|
242
|
+
def accept_invitation(id, quota_user: nil, fields: nil, options: nil, &block)
|
|
243
|
+
command = make_simple_command(:post, 'v1/invitations/{id}:accept', options)
|
|
229
244
|
command.response_representation = Google::Apis::ClassroomV1::Empty::Representation
|
|
230
245
|
command.response_class = Google::Apis::ClassroomV1::Empty
|
|
231
246
|
command.params['id'] = id unless id.nil?
|
|
232
|
-
command.query['fields'] = fields unless fields.nil?
|
|
233
247
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
248
|
+
command.query['fields'] = fields unless fields.nil?
|
|
234
249
|
execute_or_queue_command(command, &block)
|
|
235
250
|
end
|
|
236
251
|
|
|
237
252
|
# Returns a list of courses that the requesting user is permitted to view,
|
|
238
|
-
# restricted to those that match the request.
|
|
239
|
-
#
|
|
240
|
-
#
|
|
241
|
-
# query
|
|
242
|
-
#
|
|
243
|
-
# Restricts returned courses to those having a student with the specified
|
|
244
|
-
# identifier. The identifier can be one of the following: * the numeric
|
|
245
|
-
# identifier for the user * the email address of the user * the string literal `"
|
|
246
|
-
# me"`, indicating the requesting user
|
|
247
|
-
# @param [String] teacher_id
|
|
248
|
-
# Restricts returned courses to those having a teacher with the specified
|
|
249
|
-
# identifier. The identifier can be one of the following: * the numeric
|
|
250
|
-
# identifier for the user * the email address of the user * the string literal `"
|
|
251
|
-
# me"`, indicating the requesting user
|
|
253
|
+
# restricted to those that match the request.
|
|
254
|
+
# This method returns the following error codes:
|
|
255
|
+
# * `PERMISSION_DENIED` for access errors.
|
|
256
|
+
# * `INVALID_ARGUMENT` if the query argument is malformed.
|
|
257
|
+
# * `NOT_FOUND` if any users specified in the query arguments do not exist.
|
|
252
258
|
# @param [Array<String>, String] course_states
|
|
253
259
|
# Restricts returned courses to those in one of the specified states
|
|
260
|
+
# The default value is ACTIVE, ARCHIVED, PROVISIONED, DECLINED.
|
|
254
261
|
# @param [Fixnum] page_size
|
|
255
262
|
# Maximum number of items to return. Zero or unspecified indicates that the
|
|
256
|
-
# server may assign a maximum.
|
|
257
|
-
# number of results.
|
|
263
|
+
# server may assign a maximum.
|
|
264
|
+
# The server may return fewer than the specified number of results.
|
|
265
|
+
# @param [String] teacher_id
|
|
266
|
+
# Restricts returned courses to those having a teacher with the specified
|
|
267
|
+
# identifier. The identifier can be one of the following:
|
|
268
|
+
# * the numeric identifier for the user
|
|
269
|
+
# * the email address of the user
|
|
270
|
+
# * the string literal `"me"`, indicating the requesting user
|
|
271
|
+
# @param [String] student_id
|
|
272
|
+
# Restricts returned courses to those having a student with the specified
|
|
273
|
+
# identifier. The identifier can be one of the following:
|
|
274
|
+
# * the numeric identifier for the user
|
|
275
|
+
# * the email address of the user
|
|
276
|
+
# * the string literal `"me"`, indicating the requesting user
|
|
258
277
|
# @param [String] page_token
|
|
259
|
-
# nextPageToken
|
|
260
|
-
#
|
|
278
|
+
# nextPageToken
|
|
279
|
+
# value returned from a previous
|
|
280
|
+
# list call,
|
|
281
|
+
# indicating that the subsequent page of results should be returned.
|
|
282
|
+
# The list request must be
|
|
261
283
|
# otherwise identical to the one that resulted in this token.
|
|
262
|
-
# @param [String] fields
|
|
263
|
-
# Selector specifying which fields to include in a partial response.
|
|
264
284
|
# @param [String] quota_user
|
|
265
285
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
266
286
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
287
|
+
# @param [String] fields
|
|
288
|
+
# Selector specifying which fields to include in a partial response.
|
|
267
289
|
# @param [Google::Apis::RequestOptions] options
|
|
268
290
|
# Request-specific options
|
|
269
291
|
#
|
|
@@ -276,276 +298,345 @@ module Google
|
|
|
276
298
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
277
299
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
278
300
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
279
|
-
def list_courses(
|
|
301
|
+
def list_courses(course_states: nil, page_size: nil, teacher_id: nil, student_id: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
280
302
|
command = make_simple_command(:get, 'v1/courses', options)
|
|
281
303
|
command.response_representation = Google::Apis::ClassroomV1::ListCoursesResponse::Representation
|
|
282
304
|
command.response_class = Google::Apis::ClassroomV1::ListCoursesResponse
|
|
283
|
-
command.query['studentId'] = student_id unless student_id.nil?
|
|
284
|
-
command.query['teacherId'] = teacher_id unless teacher_id.nil?
|
|
285
305
|
command.query['courseStates'] = course_states unless course_states.nil?
|
|
286
306
|
command.query['pageSize'] = page_size unless page_size.nil?
|
|
307
|
+
command.query['teacherId'] = teacher_id unless teacher_id.nil?
|
|
308
|
+
command.query['studentId'] = student_id unless student_id.nil?
|
|
287
309
|
command.query['pageToken'] = page_token unless page_token.nil?
|
|
288
|
-
command.query['fields'] = fields unless fields.nil?
|
|
289
310
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
311
|
+
command.query['fields'] = fields unless fields.nil?
|
|
290
312
|
execute_or_queue_command(command, &block)
|
|
291
313
|
end
|
|
292
314
|
|
|
293
|
-
#
|
|
294
|
-
#
|
|
295
|
-
#
|
|
296
|
-
#
|
|
297
|
-
#
|
|
298
|
-
#
|
|
299
|
-
#
|
|
300
|
-
#
|
|
301
|
-
#
|
|
302
|
-
# Selector specifying which fields to include in a partial response.
|
|
315
|
+
# Returns a course.
|
|
316
|
+
# This method returns the following error codes:
|
|
317
|
+
# * `PERMISSION_DENIED` if the requesting user is not permitted to access the
|
|
318
|
+
# requested course or for access errors.
|
|
319
|
+
# * `NOT_FOUND` if no course exists with the requested ID.
|
|
320
|
+
# @param [String] id
|
|
321
|
+
# Identifier of the course to return.
|
|
322
|
+
# This identifier can be either the Classroom-assigned identifier or an
|
|
323
|
+
# alias.
|
|
303
324
|
# @param [String] quota_user
|
|
304
325
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
305
326
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
327
|
+
# @param [String] fields
|
|
328
|
+
# Selector specifying which fields to include in a partial response.
|
|
306
329
|
# @param [Google::Apis::RequestOptions] options
|
|
307
330
|
# Request-specific options
|
|
308
331
|
#
|
|
309
332
|
# @yield [result, err] Result & error if block supplied
|
|
310
|
-
# @yieldparam result [Google::Apis::ClassroomV1::
|
|
333
|
+
# @yieldparam result [Google::Apis::ClassroomV1::Course] parsed result object
|
|
311
334
|
# @yieldparam err [StandardError] error object if request failed
|
|
312
335
|
#
|
|
313
|
-
# @return [Google::Apis::ClassroomV1::
|
|
336
|
+
# @return [Google::Apis::ClassroomV1::Course]
|
|
314
337
|
#
|
|
315
338
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
316
339
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
317
340
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
318
|
-
def
|
|
319
|
-
command = make_simple_command(:
|
|
320
|
-
command.
|
|
321
|
-
command.
|
|
322
|
-
command.
|
|
323
|
-
command.response_class = Google::Apis::ClassroomV1::CourseAlias
|
|
324
|
-
command.params['courseId'] = course_id unless course_id.nil?
|
|
325
|
-
command.query['fields'] = fields unless fields.nil?
|
|
341
|
+
def get_course(id, quota_user: nil, fields: nil, options: nil, &block)
|
|
342
|
+
command = make_simple_command(:get, 'v1/courses/{id}', options)
|
|
343
|
+
command.response_representation = Google::Apis::ClassroomV1::Course::Representation
|
|
344
|
+
command.response_class = Google::Apis::ClassroomV1::Course
|
|
345
|
+
command.params['id'] = id unless id.nil?
|
|
326
346
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
347
|
+
command.query['fields'] = fields unless fields.nil?
|
|
327
348
|
execute_or_queue_command(command, &block)
|
|
328
349
|
end
|
|
329
350
|
|
|
330
|
-
#
|
|
331
|
-
#
|
|
332
|
-
#
|
|
333
|
-
#
|
|
334
|
-
#
|
|
335
|
-
#
|
|
336
|
-
#
|
|
337
|
-
#
|
|
338
|
-
#
|
|
339
|
-
#
|
|
351
|
+
# Creates a course.
|
|
352
|
+
# The user specified in `ownerId` is the owner of the created course
|
|
353
|
+
# and added as a teacher.
|
|
354
|
+
# This method returns the following error codes:
|
|
355
|
+
# * `PERMISSION_DENIED` if the requesting user is not permitted to create
|
|
356
|
+
# courses or for access errors.
|
|
357
|
+
# * `NOT_FOUND` if the primary teacher is not a valid user.
|
|
358
|
+
# * `FAILED_PRECONDITION` if the course owner's account is disabled or for
|
|
359
|
+
# the following request errors:
|
|
360
|
+
# * UserGroupsMembershipLimitReached
|
|
361
|
+
# * `ALREADY_EXISTS` if an alias was specified in the `id` and
|
|
362
|
+
# already exists.
|
|
363
|
+
# @param [Google::Apis::ClassroomV1::Course] course_object
|
|
340
364
|
# @param [String] quota_user
|
|
341
365
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
342
366
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
367
|
+
# @param [String] fields
|
|
368
|
+
# Selector specifying which fields to include in a partial response.
|
|
343
369
|
# @param [Google::Apis::RequestOptions] options
|
|
344
370
|
# Request-specific options
|
|
345
371
|
#
|
|
346
372
|
# @yield [result, err] Result & error if block supplied
|
|
347
|
-
# @yieldparam result [Google::Apis::ClassroomV1::
|
|
373
|
+
# @yieldparam result [Google::Apis::ClassroomV1::Course] parsed result object
|
|
348
374
|
# @yieldparam err [StandardError] error object if request failed
|
|
349
375
|
#
|
|
350
|
-
# @return [Google::Apis::ClassroomV1::
|
|
376
|
+
# @return [Google::Apis::ClassroomV1::Course]
|
|
351
377
|
#
|
|
352
378
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
353
379
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
354
380
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
355
|
-
def
|
|
356
|
-
command = make_simple_command(:
|
|
357
|
-
command.
|
|
358
|
-
command.
|
|
359
|
-
command.
|
|
360
|
-
command.
|
|
361
|
-
command.query['fields'] = fields unless fields.nil?
|
|
381
|
+
def create_course(course_object = nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
382
|
+
command = make_simple_command(:post, 'v1/courses', options)
|
|
383
|
+
command.request_representation = Google::Apis::ClassroomV1::Course::Representation
|
|
384
|
+
command.request_object = course_object
|
|
385
|
+
command.response_representation = Google::Apis::ClassroomV1::Course::Representation
|
|
386
|
+
command.response_class = Google::Apis::ClassroomV1::Course
|
|
362
387
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
388
|
+
command.query['fields'] = fields unless fields.nil?
|
|
363
389
|
execute_or_queue_command(command, &block)
|
|
364
390
|
end
|
|
365
391
|
|
|
366
|
-
#
|
|
367
|
-
#
|
|
368
|
-
#
|
|
369
|
-
#
|
|
370
|
-
#
|
|
371
|
-
#
|
|
372
|
-
#
|
|
373
|
-
# @param [
|
|
374
|
-
#
|
|
375
|
-
#
|
|
376
|
-
#
|
|
377
|
-
# @param [
|
|
378
|
-
# nextPageToken value returned from a previous list call, indicating that the
|
|
379
|
-
# subsequent page of results should be returned. The list request must be
|
|
380
|
-
# otherwise identical to the one that resulted in this token.
|
|
381
|
-
# @param [String] fields
|
|
382
|
-
# Selector specifying which fields to include in a partial response.
|
|
392
|
+
# Updates a course.
|
|
393
|
+
# This method returns the following error codes:
|
|
394
|
+
# * `PERMISSION_DENIED` if the requesting user is not permitted to modify the
|
|
395
|
+
# requested course or for access errors.
|
|
396
|
+
# * `NOT_FOUND` if no course exists with the requested ID.
|
|
397
|
+
# * `FAILED_PRECONDITION` for the following request errors:
|
|
398
|
+
# * CourseNotModifiable
|
|
399
|
+
# @param [String] id
|
|
400
|
+
# Identifier of the course to update.
|
|
401
|
+
# This identifier can be either the Classroom-assigned identifier or an
|
|
402
|
+
# alias.
|
|
403
|
+
# @param [Google::Apis::ClassroomV1::Course] course_object
|
|
383
404
|
# @param [String] quota_user
|
|
384
405
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
385
406
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
407
|
+
# @param [String] fields
|
|
408
|
+
# Selector specifying which fields to include in a partial response.
|
|
386
409
|
# @param [Google::Apis::RequestOptions] options
|
|
387
410
|
# Request-specific options
|
|
388
411
|
#
|
|
389
412
|
# @yield [result, err] Result & error if block supplied
|
|
390
|
-
# @yieldparam result [Google::Apis::ClassroomV1::
|
|
413
|
+
# @yieldparam result [Google::Apis::ClassroomV1::Course] parsed result object
|
|
391
414
|
# @yieldparam err [StandardError] error object if request failed
|
|
392
415
|
#
|
|
393
|
-
# @return [Google::Apis::ClassroomV1::
|
|
416
|
+
# @return [Google::Apis::ClassroomV1::Course]
|
|
394
417
|
#
|
|
395
418
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
396
419
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
397
420
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
398
|
-
def
|
|
399
|
-
command = make_simple_command(:
|
|
400
|
-
command.
|
|
401
|
-
command.
|
|
402
|
-
command.
|
|
403
|
-
command.
|
|
404
|
-
command.
|
|
405
|
-
command.query['fields'] = fields unless fields.nil?
|
|
421
|
+
def update_course(id, course_object = nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
422
|
+
command = make_simple_command(:put, 'v1/courses/{id}', options)
|
|
423
|
+
command.request_representation = Google::Apis::ClassroomV1::Course::Representation
|
|
424
|
+
command.request_object = course_object
|
|
425
|
+
command.response_representation = Google::Apis::ClassroomV1::Course::Representation
|
|
426
|
+
command.response_class = Google::Apis::ClassroomV1::Course
|
|
427
|
+
command.params['id'] = id unless id.nil?
|
|
406
428
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
429
|
+
command.query['fields'] = fields unless fields.nil?
|
|
407
430
|
execute_or_queue_command(command, &block)
|
|
408
431
|
end
|
|
409
432
|
|
|
410
|
-
#
|
|
411
|
-
#
|
|
412
|
-
#
|
|
413
|
-
# course
|
|
414
|
-
#
|
|
415
|
-
#
|
|
416
|
-
#
|
|
417
|
-
#
|
|
418
|
-
#
|
|
419
|
-
#
|
|
420
|
-
#
|
|
421
|
-
#
|
|
422
|
-
#
|
|
423
|
-
#
|
|
433
|
+
# Updates one or more fields in a course.
|
|
434
|
+
# This method returns the following error codes:
|
|
435
|
+
# * `PERMISSION_DENIED` if the requesting user is not permitted to modify the
|
|
436
|
+
# requested course or for access errors.
|
|
437
|
+
# * `NOT_FOUND` if no course exists with the requested ID.
|
|
438
|
+
# * `INVALID_ARGUMENT` if invalid fields are specified in the update mask or
|
|
439
|
+
# if no update mask is supplied.
|
|
440
|
+
# * `FAILED_PRECONDITION` for the following request errors:
|
|
441
|
+
# * CourseNotModifiable
|
|
442
|
+
# @param [String] id
|
|
443
|
+
# Identifier of the course to update.
|
|
444
|
+
# This identifier can be either the Classroom-assigned identifier or an
|
|
445
|
+
# alias.
|
|
446
|
+
# @param [Google::Apis::ClassroomV1::Course] course_object
|
|
447
|
+
# @param [String] update_mask
|
|
448
|
+
# Mask that identifies which fields on the course to update.
|
|
449
|
+
# This field is required to do an update. The update will fail if invalid
|
|
450
|
+
# fields are specified. The following fields are valid:
|
|
451
|
+
# * `name`
|
|
452
|
+
# * `section`
|
|
453
|
+
# * `descriptionHeading`
|
|
454
|
+
# * `description`
|
|
455
|
+
# * `room`
|
|
456
|
+
# * `courseState`
|
|
457
|
+
# When set in a query parameter, this field should be specified as
|
|
458
|
+
# `updateMask=<field1>,<field2>,...`
|
|
424
459
|
# @param [String] quota_user
|
|
425
460
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
426
461
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
462
|
+
# @param [String] fields
|
|
463
|
+
# Selector specifying which fields to include in a partial response.
|
|
427
464
|
# @param [Google::Apis::RequestOptions] options
|
|
428
465
|
# Request-specific options
|
|
429
466
|
#
|
|
430
467
|
# @yield [result, err] Result & error if block supplied
|
|
431
|
-
# @yieldparam result [Google::Apis::ClassroomV1::
|
|
468
|
+
# @yieldparam result [Google::Apis::ClassroomV1::Course] parsed result object
|
|
432
469
|
# @yieldparam err [StandardError] error object if request failed
|
|
433
470
|
#
|
|
434
|
-
# @return [Google::Apis::ClassroomV1::
|
|
471
|
+
# @return [Google::Apis::ClassroomV1::Course]
|
|
435
472
|
#
|
|
436
473
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
437
474
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
438
475
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
439
|
-
def
|
|
440
|
-
command = make_simple_command(:
|
|
441
|
-
command.request_representation = Google::Apis::ClassroomV1::
|
|
442
|
-
command.request_object =
|
|
443
|
-
command.response_representation = Google::Apis::ClassroomV1::
|
|
444
|
-
command.response_class = Google::Apis::ClassroomV1::
|
|
445
|
-
command.params['
|
|
446
|
-
command.query['
|
|
476
|
+
def patch_course(id, course_object = nil, update_mask: nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
477
|
+
command = make_simple_command(:patch, 'v1/courses/{id}', options)
|
|
478
|
+
command.request_representation = Google::Apis::ClassroomV1::Course::Representation
|
|
479
|
+
command.request_object = course_object
|
|
480
|
+
command.response_representation = Google::Apis::ClassroomV1::Course::Representation
|
|
481
|
+
command.response_class = Google::Apis::ClassroomV1::Course
|
|
482
|
+
command.params['id'] = id unless id.nil?
|
|
483
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
|
447
484
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
485
|
+
command.query['fields'] = fields unless fields.nil?
|
|
448
486
|
execute_or_queue_command(command, &block)
|
|
449
487
|
end
|
|
450
488
|
|
|
451
|
-
#
|
|
452
|
-
#
|
|
453
|
-
#
|
|
454
|
-
#
|
|
455
|
-
#
|
|
456
|
-
#
|
|
457
|
-
#
|
|
458
|
-
#
|
|
459
|
-
#
|
|
460
|
-
# following: * the numeric identifier for the user * the email address of the
|
|
461
|
-
# user * the string literal `"me"`, indicating the requesting user
|
|
462
|
-
# @param [String] fields
|
|
463
|
-
# Selector specifying which fields to include in a partial response.
|
|
489
|
+
# Deletes a course.
|
|
490
|
+
# This method returns the following error codes:
|
|
491
|
+
# * `PERMISSION_DENIED` if the requesting user is not permitted to delete the
|
|
492
|
+
# requested course or for access errors.
|
|
493
|
+
# * `NOT_FOUND` if no course exists with the requested ID.
|
|
494
|
+
# @param [String] id
|
|
495
|
+
# Identifier of the course to delete.
|
|
496
|
+
# This identifier can be either the Classroom-assigned identifier or an
|
|
497
|
+
# alias.
|
|
464
498
|
# @param [String] quota_user
|
|
465
499
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
466
500
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
501
|
+
# @param [String] fields
|
|
502
|
+
# Selector specifying which fields to include in a partial response.
|
|
467
503
|
# @param [Google::Apis::RequestOptions] options
|
|
468
504
|
# Request-specific options
|
|
469
505
|
#
|
|
470
506
|
# @yield [result, err] Result & error if block supplied
|
|
471
|
-
# @yieldparam result [Google::Apis::ClassroomV1::
|
|
507
|
+
# @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object
|
|
472
508
|
# @yieldparam err [StandardError] error object if request failed
|
|
473
509
|
#
|
|
474
|
-
# @return [Google::Apis::ClassroomV1::
|
|
510
|
+
# @return [Google::Apis::ClassroomV1::Empty]
|
|
475
511
|
#
|
|
476
512
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
477
513
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
478
514
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
479
|
-
def
|
|
480
|
-
command = make_simple_command(:
|
|
481
|
-
command.response_representation = Google::Apis::ClassroomV1::
|
|
482
|
-
command.response_class = Google::Apis::ClassroomV1::
|
|
483
|
-
command.params['
|
|
484
|
-
command.params['userId'] = user_id unless user_id.nil?
|
|
485
|
-
command.query['fields'] = fields unless fields.nil?
|
|
515
|
+
def delete_course(id, quota_user: nil, fields: nil, options: nil, &block)
|
|
516
|
+
command = make_simple_command(:delete, 'v1/courses/{id}', options)
|
|
517
|
+
command.response_representation = Google::Apis::ClassroomV1::Empty::Representation
|
|
518
|
+
command.response_class = Google::Apis::ClassroomV1::Empty
|
|
519
|
+
command.params['id'] = id unless id.nil?
|
|
486
520
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
521
|
+
command.query['fields'] = fields unless fields.nil?
|
|
487
522
|
execute_or_queue_command(command, &block)
|
|
488
523
|
end
|
|
489
524
|
|
|
490
|
-
#
|
|
491
|
-
#
|
|
492
|
-
#
|
|
493
|
-
# this course
|
|
494
|
-
#
|
|
495
|
-
#
|
|
525
|
+
# Creates a teacher of a course.
|
|
526
|
+
# This method returns the following error codes:
|
|
527
|
+
# * `PERMISSION_DENIED` if the requesting user is not permitted to create
|
|
528
|
+
# teachers in this course or for access errors.
|
|
529
|
+
# * `NOT_FOUND` if the requested course ID does not exist.
|
|
530
|
+
# * `FAILED_PRECONDITION` if the requested user's account is disabled,
|
|
531
|
+
# for the following request errors:
|
|
532
|
+
# * CourseMemberLimitReached
|
|
533
|
+
# * CourseNotModifiable
|
|
534
|
+
# * CourseTeacherLimitReached
|
|
535
|
+
# * UserGroupsMembershipLimitReached
|
|
536
|
+
# * `ALREADY_EXISTS` if the user is already a teacher or student in the
|
|
537
|
+
# course.
|
|
496
538
|
# @param [String] course_id
|
|
497
|
-
# Identifier of the course.
|
|
498
|
-
# identifier or an
|
|
499
|
-
#
|
|
500
|
-
#
|
|
501
|
-
# following: * the numeric identifier for the user * the email address of the
|
|
502
|
-
# user * the string literal `"me"`, indicating the requesting user
|
|
503
|
-
# @param [String] fields
|
|
504
|
-
# Selector specifying which fields to include in a partial response.
|
|
539
|
+
# Identifier of the course.
|
|
540
|
+
# This identifier can be either the Classroom-assigned identifier or an
|
|
541
|
+
# alias.
|
|
542
|
+
# @param [Google::Apis::ClassroomV1::Teacher] teacher_object
|
|
505
543
|
# @param [String] quota_user
|
|
506
544
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
507
545
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
546
|
+
# @param [String] fields
|
|
547
|
+
# Selector specifying which fields to include in a partial response.
|
|
508
548
|
# @param [Google::Apis::RequestOptions] options
|
|
509
549
|
# Request-specific options
|
|
510
550
|
#
|
|
511
551
|
# @yield [result, err] Result & error if block supplied
|
|
512
|
-
# @yieldparam result [Google::Apis::ClassroomV1::
|
|
552
|
+
# @yieldparam result [Google::Apis::ClassroomV1::Teacher] parsed result object
|
|
513
553
|
# @yieldparam err [StandardError] error object if request failed
|
|
514
554
|
#
|
|
515
|
-
# @return [Google::Apis::ClassroomV1::
|
|
555
|
+
# @return [Google::Apis::ClassroomV1::Teacher]
|
|
516
556
|
#
|
|
517
557
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
518
558
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
519
559
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
520
|
-
def
|
|
521
|
-
command = make_simple_command(:
|
|
522
|
-
command.
|
|
523
|
-
command.
|
|
560
|
+
def create_course_teacher(course_id, teacher_object = nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
561
|
+
command = make_simple_command(:post, 'v1/courses/{courseId}/teachers', options)
|
|
562
|
+
command.request_representation = Google::Apis::ClassroomV1::Teacher::Representation
|
|
563
|
+
command.request_object = teacher_object
|
|
564
|
+
command.response_representation = Google::Apis::ClassroomV1::Teacher::Representation
|
|
565
|
+
command.response_class = Google::Apis::ClassroomV1::Teacher
|
|
524
566
|
command.params['courseId'] = course_id unless course_id.nil?
|
|
525
|
-
command.
|
|
567
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
526
568
|
command.query['fields'] = fields unless fields.nil?
|
|
569
|
+
execute_or_queue_command(command, &block)
|
|
570
|
+
end
|
|
571
|
+
|
|
572
|
+
# Returns a teacher of a course.
|
|
573
|
+
# This method returns the following error codes:
|
|
574
|
+
# * `PERMISSION_DENIED` if the requesting user is not permitted to view
|
|
575
|
+
# teachers of this course or for access errors.
|
|
576
|
+
# * `NOT_FOUND` if no teacher of this course has the requested ID or if the
|
|
577
|
+
# course does not exist.
|
|
578
|
+
# @param [String] course_id
|
|
579
|
+
# Identifier of the course.
|
|
580
|
+
# This identifier can be either the Classroom-assigned identifier or an
|
|
581
|
+
# alias.
|
|
582
|
+
# @param [String] user_id
|
|
583
|
+
# Identifier of the teacher to return. The identifier can be one of the
|
|
584
|
+
# following:
|
|
585
|
+
# * the numeric identifier for the user
|
|
586
|
+
# * the email address of the user
|
|
587
|
+
# * the string literal `"me"`, indicating the requesting user
|
|
588
|
+
# @param [String] quota_user
|
|
589
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
590
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
591
|
+
# @param [String] fields
|
|
592
|
+
# Selector specifying which fields to include in a partial response.
|
|
593
|
+
# @param [Google::Apis::RequestOptions] options
|
|
594
|
+
# Request-specific options
|
|
595
|
+
#
|
|
596
|
+
# @yield [result, err] Result & error if block supplied
|
|
597
|
+
# @yieldparam result [Google::Apis::ClassroomV1::Teacher] parsed result object
|
|
598
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
599
|
+
#
|
|
600
|
+
# @return [Google::Apis::ClassroomV1::Teacher]
|
|
601
|
+
#
|
|
602
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
603
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
604
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
605
|
+
def get_course_teacher(course_id, user_id, quota_user: nil, fields: nil, options: nil, &block)
|
|
606
|
+
command = make_simple_command(:get, 'v1/courses/{courseId}/teachers/{userId}', options)
|
|
607
|
+
command.response_representation = Google::Apis::ClassroomV1::Teacher::Representation
|
|
608
|
+
command.response_class = Google::Apis::ClassroomV1::Teacher
|
|
609
|
+
command.params['courseId'] = course_id unless course_id.nil?
|
|
610
|
+
command.params['userId'] = user_id unless user_id.nil?
|
|
527
611
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
612
|
+
command.query['fields'] = fields unless fields.nil?
|
|
528
613
|
execute_or_queue_command(command, &block)
|
|
529
614
|
end
|
|
530
615
|
|
|
531
|
-
# Returns a list of teachers of this course that the requester
|
|
532
|
-
#
|
|
533
|
-
#
|
|
616
|
+
# Returns a list of teachers of this course that the requester
|
|
617
|
+
# is permitted to view.
|
|
618
|
+
# This method returns the following error codes:
|
|
619
|
+
# * `NOT_FOUND` if the course does not exist.
|
|
620
|
+
# * `PERMISSION_DENIED` for access errors.
|
|
534
621
|
# @param [String] course_id
|
|
535
|
-
# Identifier of the course.
|
|
536
|
-
# identifier or an
|
|
622
|
+
# Identifier of the course.
|
|
623
|
+
# This identifier can be either the Classroom-assigned identifier or an
|
|
624
|
+
# alias.
|
|
537
625
|
# @param [Fixnum] page_size
|
|
538
|
-
# Maximum number of items to return. Zero means no maximum.
|
|
539
|
-
# return fewer than the specified number of results.
|
|
626
|
+
# Maximum number of items to return. Zero means no maximum.
|
|
627
|
+
# The server may return fewer than the specified number of results.
|
|
540
628
|
# @param [String] page_token
|
|
541
|
-
# nextPageToken
|
|
542
|
-
#
|
|
629
|
+
# nextPageToken
|
|
630
|
+
# value returned from a previous
|
|
631
|
+
# list call, indicating that
|
|
632
|
+
# the subsequent page of results should be returned.
|
|
633
|
+
# The list request must be
|
|
543
634
|
# otherwise identical to the one that resulted in this token.
|
|
544
|
-
# @param [String] fields
|
|
545
|
-
# Selector specifying which fields to include in a partial response.
|
|
546
635
|
# @param [String] quota_user
|
|
547
636
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
548
637
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
638
|
+
# @param [String] fields
|
|
639
|
+
# Selector specifying which fields to include in a partial response.
|
|
549
640
|
# @param [Google::Apis::RequestOptions] options
|
|
550
641
|
# Request-specific options
|
|
551
642
|
#
|
|
@@ -558,119 +649,176 @@ module Google
|
|
|
558
649
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
559
650
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
560
651
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
561
|
-
def list_course_teachers(course_id, page_size: nil, page_token: nil,
|
|
652
|
+
def list_course_teachers(course_id, page_size: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
562
653
|
command = make_simple_command(:get, 'v1/courses/{courseId}/teachers', options)
|
|
563
654
|
command.response_representation = Google::Apis::ClassroomV1::ListTeachersResponse::Representation
|
|
564
655
|
command.response_class = Google::Apis::ClassroomV1::ListTeachersResponse
|
|
565
656
|
command.params['courseId'] = course_id unless course_id.nil?
|
|
566
657
|
command.query['pageSize'] = page_size unless page_size.nil?
|
|
567
658
|
command.query['pageToken'] = page_token unless page_token.nil?
|
|
568
|
-
command.query['fields'] = fields unless fields.nil?
|
|
569
659
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
660
|
+
command.query['fields'] = fields unless fields.nil?
|
|
570
661
|
execute_or_queue_command(command, &block)
|
|
571
662
|
end
|
|
572
663
|
|
|
573
|
-
#
|
|
574
|
-
#
|
|
575
|
-
#
|
|
576
|
-
#
|
|
577
|
-
#
|
|
578
|
-
#
|
|
579
|
-
#
|
|
580
|
-
#
|
|
664
|
+
# Deletes a teacher of a course.
|
|
665
|
+
# This method returns the following error codes:
|
|
666
|
+
# * `PERMISSION_DENIED` if the requesting user is not permitted to delete
|
|
667
|
+
# teachers of this course or for access errors.
|
|
668
|
+
# * `NOT_FOUND` if no teacher of this course has the requested ID or if the
|
|
669
|
+
# course does not exist.
|
|
670
|
+
# * `FAILED_PRECONDITION` if the requested ID belongs to the primary teacher
|
|
671
|
+
# of this course.
|
|
581
672
|
# @param [String] course_id
|
|
582
|
-
# Identifier of the course
|
|
583
|
-
# either the Classroom-assigned identifier or an
|
|
584
|
-
#
|
|
585
|
-
# @param [String]
|
|
586
|
-
#
|
|
587
|
-
#
|
|
588
|
-
#
|
|
589
|
-
#
|
|
590
|
-
#
|
|
673
|
+
# Identifier of the course.
|
|
674
|
+
# This identifier can be either the Classroom-assigned identifier or an
|
|
675
|
+
# alias.
|
|
676
|
+
# @param [String] user_id
|
|
677
|
+
# Identifier of the teacher to delete. The identifier can be one of the
|
|
678
|
+
# following:
|
|
679
|
+
# * the numeric identifier for the user
|
|
680
|
+
# * the email address of the user
|
|
681
|
+
# * the string literal `"me"`, indicating the requesting user
|
|
591
682
|
# @param [String] quota_user
|
|
592
683
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
593
684
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
685
|
+
# @param [String] fields
|
|
686
|
+
# Selector specifying which fields to include in a partial response.
|
|
594
687
|
# @param [Google::Apis::RequestOptions] options
|
|
595
688
|
# Request-specific options
|
|
596
689
|
#
|
|
597
690
|
# @yield [result, err] Result & error if block supplied
|
|
598
|
-
# @yieldparam result [Google::Apis::ClassroomV1::
|
|
691
|
+
# @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object
|
|
599
692
|
# @yieldparam err [StandardError] error object if request failed
|
|
600
693
|
#
|
|
601
|
-
# @return [Google::Apis::ClassroomV1::
|
|
694
|
+
# @return [Google::Apis::ClassroomV1::Empty]
|
|
602
695
|
#
|
|
603
696
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
604
697
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
605
698
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
606
|
-
def
|
|
607
|
-
command = make_simple_command(:
|
|
608
|
-
command.
|
|
609
|
-
command.
|
|
610
|
-
command.response_representation = Google::Apis::ClassroomV1::Student::Representation
|
|
611
|
-
command.response_class = Google::Apis::ClassroomV1::Student
|
|
699
|
+
def delete_course_teacher(course_id, user_id, quota_user: nil, fields: nil, options: nil, &block)
|
|
700
|
+
command = make_simple_command(:delete, 'v1/courses/{courseId}/teachers/{userId}', options)
|
|
701
|
+
command.response_representation = Google::Apis::ClassroomV1::Empty::Representation
|
|
702
|
+
command.response_class = Google::Apis::ClassroomV1::Empty
|
|
612
703
|
command.params['courseId'] = course_id unless course_id.nil?
|
|
613
|
-
command.
|
|
614
|
-
command.query['fields'] = fields unless fields.nil?
|
|
704
|
+
command.params['userId'] = user_id unless user_id.nil?
|
|
615
705
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
706
|
+
command.query['fields'] = fields unless fields.nil?
|
|
616
707
|
execute_or_queue_command(command, &block)
|
|
617
708
|
end
|
|
618
709
|
|
|
619
|
-
#
|
|
620
|
-
#
|
|
621
|
-
#
|
|
622
|
-
#
|
|
710
|
+
# Creates an alias for a course.
|
|
711
|
+
# This method returns the following error codes:
|
|
712
|
+
# * `PERMISSION_DENIED` if the requesting user is not permitted to create the
|
|
713
|
+
# alias or for access errors.
|
|
714
|
+
# * `NOT_FOUND` if the course does not exist.
|
|
715
|
+
# * `ALREADY_EXISTS` if the alias already exists.
|
|
716
|
+
# * `FAILED_PRECONDITION` if the alias requested does not make sense for the
|
|
717
|
+
# requesting user or course (for example, if a user not in a domain
|
|
718
|
+
# attempts to access a domain-scoped alias).
|
|
623
719
|
# @param [String] course_id
|
|
624
|
-
# Identifier of the course
|
|
625
|
-
# identifier or an
|
|
626
|
-
#
|
|
627
|
-
#
|
|
628
|
-
# following: * the numeric identifier for the user * the email address of the
|
|
629
|
-
# user * the string literal `"me"`, indicating the requesting user
|
|
630
|
-
# @param [String] fields
|
|
631
|
-
# Selector specifying which fields to include in a partial response.
|
|
720
|
+
# Identifier of the course to alias.
|
|
721
|
+
# This identifier can be either the Classroom-assigned identifier or an
|
|
722
|
+
# alias.
|
|
723
|
+
# @param [Google::Apis::ClassroomV1::CourseAlias] course_alias_object
|
|
632
724
|
# @param [String] quota_user
|
|
633
725
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
634
726
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
727
|
+
# @param [String] fields
|
|
728
|
+
# Selector specifying which fields to include in a partial response.
|
|
635
729
|
# @param [Google::Apis::RequestOptions] options
|
|
636
730
|
# Request-specific options
|
|
637
731
|
#
|
|
638
732
|
# @yield [result, err] Result & error if block supplied
|
|
639
|
-
# @yieldparam result [Google::Apis::ClassroomV1::
|
|
733
|
+
# @yieldparam result [Google::Apis::ClassroomV1::CourseAlias] parsed result object
|
|
640
734
|
# @yieldparam err [StandardError] error object if request failed
|
|
641
735
|
#
|
|
642
|
-
# @return [Google::Apis::ClassroomV1::
|
|
736
|
+
# @return [Google::Apis::ClassroomV1::CourseAlias]
|
|
643
737
|
#
|
|
644
738
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
645
739
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
646
740
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
647
|
-
def
|
|
648
|
-
command = make_simple_command(:
|
|
649
|
-
command.
|
|
650
|
-
command.
|
|
741
|
+
def create_course_alias(course_id, course_alias_object = nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
742
|
+
command = make_simple_command(:post, 'v1/courses/{courseId}/aliases', options)
|
|
743
|
+
command.request_representation = Google::Apis::ClassroomV1::CourseAlias::Representation
|
|
744
|
+
command.request_object = course_alias_object
|
|
745
|
+
command.response_representation = Google::Apis::ClassroomV1::CourseAlias::Representation
|
|
746
|
+
command.response_class = Google::Apis::ClassroomV1::CourseAlias
|
|
651
747
|
command.params['courseId'] = course_id unless course_id.nil?
|
|
652
|
-
command.params['userId'] = user_id unless user_id.nil?
|
|
653
|
-
command.query['fields'] = fields unless fields.nil?
|
|
654
748
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
749
|
+
command.query['fields'] = fields unless fields.nil?
|
|
655
750
|
execute_or_queue_command(command, &block)
|
|
656
751
|
end
|
|
657
752
|
|
|
658
|
-
#
|
|
659
|
-
#
|
|
660
|
-
#
|
|
661
|
-
#
|
|
753
|
+
# Returns a list of aliases for a course.
|
|
754
|
+
# This method returns the following error codes:
|
|
755
|
+
# * `PERMISSION_DENIED` if the requesting user is not permitted to access the
|
|
756
|
+
# course or for access errors.
|
|
757
|
+
# * `NOT_FOUND` if the course does not exist.
|
|
662
758
|
# @param [String] course_id
|
|
663
|
-
#
|
|
664
|
-
# identifier or an
|
|
665
|
-
#
|
|
666
|
-
#
|
|
667
|
-
#
|
|
668
|
-
#
|
|
759
|
+
# The identifier of the course.
|
|
760
|
+
# This identifier can be either the Classroom-assigned identifier or an
|
|
761
|
+
# alias.
|
|
762
|
+
# @param [Fixnum] page_size
|
|
763
|
+
# Maximum number of items to return. Zero or unspecified indicates that the
|
|
764
|
+
# server may assign a maximum.
|
|
765
|
+
# The server may return fewer than the specified number of results.
|
|
766
|
+
# @param [String] page_token
|
|
767
|
+
# nextPageToken
|
|
768
|
+
# value returned from a previous
|
|
769
|
+
# list call,
|
|
770
|
+
# indicating that the subsequent page of results should be returned.
|
|
771
|
+
# The list request
|
|
772
|
+
# must be otherwise identical to the one that resulted in this token.
|
|
773
|
+
# @param [String] quota_user
|
|
774
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
775
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
669
776
|
# @param [String] fields
|
|
670
777
|
# Selector specifying which fields to include in a partial response.
|
|
778
|
+
# @param [Google::Apis::RequestOptions] options
|
|
779
|
+
# Request-specific options
|
|
780
|
+
#
|
|
781
|
+
# @yield [result, err] Result & error if block supplied
|
|
782
|
+
# @yieldparam result [Google::Apis::ClassroomV1::ListCourseAliasesResponse] parsed result object
|
|
783
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
784
|
+
#
|
|
785
|
+
# @return [Google::Apis::ClassroomV1::ListCourseAliasesResponse]
|
|
786
|
+
#
|
|
787
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
788
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
789
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
790
|
+
def list_course_aliases(course_id, page_size: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
791
|
+
command = make_simple_command(:get, 'v1/courses/{courseId}/aliases', options)
|
|
792
|
+
command.response_representation = Google::Apis::ClassroomV1::ListCourseAliasesResponse::Representation
|
|
793
|
+
command.response_class = Google::Apis::ClassroomV1::ListCourseAliasesResponse
|
|
794
|
+
command.params['courseId'] = course_id unless course_id.nil?
|
|
795
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
|
796
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
797
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
798
|
+
command.query['fields'] = fields unless fields.nil?
|
|
799
|
+
execute_or_queue_command(command, &block)
|
|
800
|
+
end
|
|
801
|
+
|
|
802
|
+
# Deletes an alias of a course.
|
|
803
|
+
# This method returns the following error codes:
|
|
804
|
+
# * `PERMISSION_DENIED` if the requesting user is not permitted to remove the
|
|
805
|
+
# alias or for access errors.
|
|
806
|
+
# * `NOT_FOUND` if the alias does not exist.
|
|
807
|
+
# * `FAILED_PRECONDITION` if the alias requested does not make sense for the
|
|
808
|
+
# requesting user or course (for example, if a user not in a domain
|
|
809
|
+
# attempts to delete a domain-scoped alias).
|
|
810
|
+
# @param [String] course_id
|
|
811
|
+
# Identifier of the course whose alias should be deleted.
|
|
812
|
+
# This identifier can be either the Classroom-assigned identifier or an
|
|
813
|
+
# alias.
|
|
814
|
+
# @param [String] alias_
|
|
815
|
+
# Alias to delete.
|
|
816
|
+
# This may not be the Classroom-assigned identifier.
|
|
671
817
|
# @param [String] quota_user
|
|
672
818
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
673
819
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
820
|
+
# @param [String] fields
|
|
821
|
+
# Selector specifying which fields to include in a partial response.
|
|
674
822
|
# @param [Google::Apis::RequestOptions] options
|
|
675
823
|
# Request-specific options
|
|
676
824
|
#
|
|
@@ -683,179 +831,182 @@ module Google
|
|
|
683
831
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
684
832
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
685
833
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
686
|
-
def
|
|
687
|
-
command = make_simple_command(:delete, 'v1/courses/{courseId}/
|
|
834
|
+
def delete_course_alias(course_id, alias_, quota_user: nil, fields: nil, options: nil, &block)
|
|
835
|
+
command = make_simple_command(:delete, 'v1/courses/{courseId}/aliases/{alias}', options)
|
|
688
836
|
command.response_representation = Google::Apis::ClassroomV1::Empty::Representation
|
|
689
837
|
command.response_class = Google::Apis::ClassroomV1::Empty
|
|
690
838
|
command.params['courseId'] = course_id unless course_id.nil?
|
|
691
|
-
command.params['
|
|
692
|
-
command.query['fields'] = fields unless fields.nil?
|
|
839
|
+
command.params['alias'] = alias_ unless alias_.nil?
|
|
693
840
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
841
|
+
command.query['fields'] = fields unless fields.nil?
|
|
694
842
|
execute_or_queue_command(command, &block)
|
|
695
843
|
end
|
|
696
844
|
|
|
697
|
-
#
|
|
698
|
-
#
|
|
699
|
-
#
|
|
845
|
+
# Adds a user as a student of a course.
|
|
846
|
+
# This method returns the following error codes:
|
|
847
|
+
# * `PERMISSION_DENIED` if the requesting user is not permitted to create
|
|
848
|
+
# students in this course or for access errors.
|
|
849
|
+
# * `NOT_FOUND` if the requested course ID does not exist.
|
|
850
|
+
# * `FAILED_PRECONDITION` if the requested user's account is disabled,
|
|
851
|
+
# for the following request errors:
|
|
852
|
+
# * CourseMemberLimitReached
|
|
853
|
+
# * CourseNotModifiable
|
|
854
|
+
# * UserGroupsMembershipLimitReached
|
|
855
|
+
# * `ALREADY_EXISTS` if the user is already a student or teacher in the
|
|
856
|
+
# course.
|
|
700
857
|
# @param [String] course_id
|
|
701
|
-
# Identifier of the course
|
|
702
|
-
# identifier or an
|
|
703
|
-
#
|
|
704
|
-
#
|
|
705
|
-
#
|
|
706
|
-
#
|
|
707
|
-
#
|
|
708
|
-
#
|
|
709
|
-
#
|
|
710
|
-
# @param [String] fields
|
|
711
|
-
# Selector specifying which fields to include in a partial response.
|
|
858
|
+
# Identifier of the course to create the student in.
|
|
859
|
+
# This identifier can be either the Classroom-assigned identifier or an
|
|
860
|
+
# alias.
|
|
861
|
+
# @param [Google::Apis::ClassroomV1::Student] student_object
|
|
862
|
+
# @param [String] enrollment_code
|
|
863
|
+
# Enrollment code of the course to create the student in.
|
|
864
|
+
# This code is required if userId
|
|
865
|
+
# corresponds to the requesting user; it may be omitted if the requesting
|
|
866
|
+
# user has administrative permissions to create students for any user.
|
|
712
867
|
# @param [String] quota_user
|
|
713
868
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
714
869
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
870
|
+
# @param [String] fields
|
|
871
|
+
# Selector specifying which fields to include in a partial response.
|
|
715
872
|
# @param [Google::Apis::RequestOptions] options
|
|
716
873
|
# Request-specific options
|
|
717
874
|
#
|
|
718
875
|
# @yield [result, err] Result & error if block supplied
|
|
719
|
-
# @yieldparam result [Google::Apis::ClassroomV1::
|
|
876
|
+
# @yieldparam result [Google::Apis::ClassroomV1::Student] parsed result object
|
|
720
877
|
# @yieldparam err [StandardError] error object if request failed
|
|
721
878
|
#
|
|
722
|
-
# @return [Google::Apis::ClassroomV1::
|
|
879
|
+
# @return [Google::Apis::ClassroomV1::Student]
|
|
723
880
|
#
|
|
724
881
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
725
882
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
726
883
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
727
|
-
def
|
|
728
|
-
command = make_simple_command(:
|
|
729
|
-
command.
|
|
730
|
-
command.
|
|
884
|
+
def create_course_student(course_id, student_object = nil, enrollment_code: nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
885
|
+
command = make_simple_command(:post, 'v1/courses/{courseId}/students', options)
|
|
886
|
+
command.request_representation = Google::Apis::ClassroomV1::Student::Representation
|
|
887
|
+
command.request_object = student_object
|
|
888
|
+
command.response_representation = Google::Apis::ClassroomV1::Student::Representation
|
|
889
|
+
command.response_class = Google::Apis::ClassroomV1::Student
|
|
731
890
|
command.params['courseId'] = course_id unless course_id.nil?
|
|
732
|
-
command.query['
|
|
733
|
-
command.query['pageToken'] = page_token unless page_token.nil?
|
|
734
|
-
command.query['fields'] = fields unless fields.nil?
|
|
891
|
+
command.query['enrollmentCode'] = enrollment_code unless enrollment_code.nil?
|
|
735
892
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
893
|
+
command.query['fields'] = fields unless fields.nil?
|
|
736
894
|
execute_or_queue_command(command, &block)
|
|
737
895
|
end
|
|
738
896
|
|
|
739
|
-
#
|
|
740
|
-
#
|
|
741
|
-
#
|
|
742
|
-
#
|
|
743
|
-
#
|
|
744
|
-
#
|
|
745
|
-
# if the requesting user is not permitted to access the requested course, create
|
|
746
|
-
# course work in the requested course, share a Drive attachment, or for access
|
|
747
|
-
# errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if the
|
|
748
|
-
# requested course does not exist. * `FAILED_PRECONDITION` for the following
|
|
749
|
-
# request error: * AttachmentNotVisible
|
|
897
|
+
# Returns a student of a course.
|
|
898
|
+
# This method returns the following error codes:
|
|
899
|
+
# * `PERMISSION_DENIED` if the requesting user is not permitted to view
|
|
900
|
+
# students of this course or for access errors.
|
|
901
|
+
# * `NOT_FOUND` if no student of this course has the requested ID or if the
|
|
902
|
+
# course does not exist.
|
|
750
903
|
# @param [String] course_id
|
|
751
|
-
# Identifier of the course.
|
|
752
|
-
# identifier or an
|
|
753
|
-
#
|
|
754
|
-
# @param [String]
|
|
755
|
-
#
|
|
904
|
+
# Identifier of the course.
|
|
905
|
+
# This identifier can be either the Classroom-assigned identifier or an
|
|
906
|
+
# alias.
|
|
907
|
+
# @param [String] user_id
|
|
908
|
+
# Identifier of the student to return. The identifier can be one of the
|
|
909
|
+
# following:
|
|
910
|
+
# * the numeric identifier for the user
|
|
911
|
+
# * the email address of the user
|
|
912
|
+
# * the string literal `"me"`, indicating the requesting user
|
|
756
913
|
# @param [String] quota_user
|
|
757
914
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
758
915
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
916
|
+
# @param [String] fields
|
|
917
|
+
# Selector specifying which fields to include in a partial response.
|
|
759
918
|
# @param [Google::Apis::RequestOptions] options
|
|
760
919
|
# Request-specific options
|
|
761
920
|
#
|
|
762
921
|
# @yield [result, err] Result & error if block supplied
|
|
763
|
-
# @yieldparam result [Google::Apis::ClassroomV1::
|
|
922
|
+
# @yieldparam result [Google::Apis::ClassroomV1::Student] parsed result object
|
|
764
923
|
# @yieldparam err [StandardError] error object if request failed
|
|
765
924
|
#
|
|
766
|
-
# @return [Google::Apis::ClassroomV1::
|
|
925
|
+
# @return [Google::Apis::ClassroomV1::Student]
|
|
767
926
|
#
|
|
768
927
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
769
928
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
770
929
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
771
|
-
def
|
|
772
|
-
command = make_simple_command(:
|
|
773
|
-
command.
|
|
774
|
-
command.
|
|
775
|
-
command.response_representation = Google::Apis::ClassroomV1::CourseWork::Representation
|
|
776
|
-
command.response_class = Google::Apis::ClassroomV1::CourseWork
|
|
930
|
+
def get_course_student(course_id, user_id, quota_user: nil, fields: nil, options: nil, &block)
|
|
931
|
+
command = make_simple_command(:get, 'v1/courses/{courseId}/students/{userId}', options)
|
|
932
|
+
command.response_representation = Google::Apis::ClassroomV1::Student::Representation
|
|
933
|
+
command.response_class = Google::Apis::ClassroomV1::Student
|
|
777
934
|
command.params['courseId'] = course_id unless course_id.nil?
|
|
778
|
-
command.
|
|
935
|
+
command.params['userId'] = user_id unless user_id.nil?
|
|
779
936
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
937
|
+
command.query['fields'] = fields unless fields.nil?
|
|
780
938
|
execute_or_queue_command(command, &block)
|
|
781
939
|
end
|
|
782
940
|
|
|
783
|
-
#
|
|
784
|
-
#
|
|
785
|
-
# This
|
|
786
|
-
#
|
|
787
|
-
#
|
|
788
|
-
# * `PERMISSION_DENIED` if the requesting developer project did not create the
|
|
789
|
-
# corresponding course work, if the user is not permitted to make the requested
|
|
790
|
-
# modification to the student submission, or for access errors. * `
|
|
791
|
-
# INVALID_ARGUMENT` if the request is malformed. * `FAILED_PRECONDITION` if the
|
|
792
|
-
# requested course work has already been deleted. * `NOT_FOUND` if the requested
|
|
793
|
-
# course, course work, or student submission does not exist.
|
|
941
|
+
# Returns a list of students of this course that the requester
|
|
942
|
+
# is permitted to view.
|
|
943
|
+
# This method returns the following error codes:
|
|
944
|
+
# * `NOT_FOUND` if the course does not exist.
|
|
945
|
+
# * `PERMISSION_DENIED` for access errors.
|
|
794
946
|
# @param [String] course_id
|
|
795
|
-
# Identifier of the course.
|
|
796
|
-
# identifier or an
|
|
797
|
-
#
|
|
798
|
-
#
|
|
799
|
-
#
|
|
800
|
-
#
|
|
801
|
-
#
|
|
802
|
-
#
|
|
803
|
-
#
|
|
804
|
-
#
|
|
805
|
-
#
|
|
806
|
-
#
|
|
807
|
-
#
|
|
808
|
-
# due_time` * `max_points` * `submission_modification_mode`
|
|
809
|
-
# @param [String] fields
|
|
810
|
-
# Selector specifying which fields to include in a partial response.
|
|
947
|
+
# Identifier of the course.
|
|
948
|
+
# This identifier can be either the Classroom-assigned identifier or an
|
|
949
|
+
# alias.
|
|
950
|
+
# @param [Fixnum] page_size
|
|
951
|
+
# Maximum number of items to return. Zero means no maximum.
|
|
952
|
+
# The server may return fewer than the specified number of results.
|
|
953
|
+
# @param [String] page_token
|
|
954
|
+
# nextPageToken
|
|
955
|
+
# value returned from a previous
|
|
956
|
+
# list call, indicating that
|
|
957
|
+
# the subsequent page of results should be returned.
|
|
958
|
+
# The list request must be
|
|
959
|
+
# otherwise identical to the one that resulted in this token.
|
|
811
960
|
# @param [String] quota_user
|
|
812
961
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
813
962
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
963
|
+
# @param [String] fields
|
|
964
|
+
# Selector specifying which fields to include in a partial response.
|
|
814
965
|
# @param [Google::Apis::RequestOptions] options
|
|
815
966
|
# Request-specific options
|
|
816
967
|
#
|
|
817
968
|
# @yield [result, err] Result & error if block supplied
|
|
818
|
-
# @yieldparam result [Google::Apis::ClassroomV1::
|
|
969
|
+
# @yieldparam result [Google::Apis::ClassroomV1::ListStudentsResponse] parsed result object
|
|
819
970
|
# @yieldparam err [StandardError] error object if request failed
|
|
820
971
|
#
|
|
821
|
-
# @return [Google::Apis::ClassroomV1::
|
|
972
|
+
# @return [Google::Apis::ClassroomV1::ListStudentsResponse]
|
|
822
973
|
#
|
|
823
974
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
824
975
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
825
976
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
826
|
-
def
|
|
827
|
-
command = make_simple_command(:
|
|
828
|
-
command.
|
|
829
|
-
command.
|
|
830
|
-
command.response_representation = Google::Apis::ClassroomV1::CourseWork::Representation
|
|
831
|
-
command.response_class = Google::Apis::ClassroomV1::CourseWork
|
|
977
|
+
def list_course_students(course_id, page_size: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
978
|
+
command = make_simple_command(:get, 'v1/courses/{courseId}/students', options)
|
|
979
|
+
command.response_representation = Google::Apis::ClassroomV1::ListStudentsResponse::Representation
|
|
980
|
+
command.response_class = Google::Apis::ClassroomV1::ListStudentsResponse
|
|
832
981
|
command.params['courseId'] = course_id unless course_id.nil?
|
|
833
|
-
command.
|
|
834
|
-
command.query['
|
|
835
|
-
command.query['fields'] = fields unless fields.nil?
|
|
982
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
|
983
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
836
984
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
985
|
+
command.query['fields'] = fields unless fields.nil?
|
|
837
986
|
execute_or_queue_command(command, &block)
|
|
838
987
|
end
|
|
839
988
|
|
|
840
|
-
# Deletes a
|
|
841
|
-
#
|
|
842
|
-
#
|
|
843
|
-
#
|
|
844
|
-
#
|
|
845
|
-
#
|
|
846
|
-
# errors. * `FAILED_PRECONDITION` if the requested course work has already been
|
|
847
|
-
# deleted. * `NOT_FOUND` if no course exists with the requested ID.
|
|
989
|
+
# Deletes a student of a course.
|
|
990
|
+
# This method returns the following error codes:
|
|
991
|
+
# * `PERMISSION_DENIED` if the requesting user is not permitted to delete
|
|
992
|
+
# students of this course or for access errors.
|
|
993
|
+
# * `NOT_FOUND` if no student of this course has the requested ID or if the
|
|
994
|
+
# course does not exist.
|
|
848
995
|
# @param [String] course_id
|
|
849
|
-
# Identifier of the course.
|
|
850
|
-
# identifier or an
|
|
851
|
-
#
|
|
852
|
-
#
|
|
853
|
-
#
|
|
854
|
-
#
|
|
855
|
-
#
|
|
996
|
+
# Identifier of the course.
|
|
997
|
+
# This identifier can be either the Classroom-assigned identifier or an
|
|
998
|
+
# alias.
|
|
999
|
+
# @param [String] user_id
|
|
1000
|
+
# Identifier of the student to delete. The identifier can be one of the
|
|
1001
|
+
# following:
|
|
1002
|
+
# * the numeric identifier for the user
|
|
1003
|
+
# * the email address of the user
|
|
1004
|
+
# * the string literal `"me"`, indicating the requesting user
|
|
856
1005
|
# @param [String] quota_user
|
|
857
1006
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
858
1007
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1008
|
+
# @param [String] fields
|
|
1009
|
+
# Selector specifying which fields to include in a partial response.
|
|
859
1010
|
# @param [Google::Apis::RequestOptions] options
|
|
860
1011
|
# Request-specific options
|
|
861
1012
|
#
|
|
@@ -868,32 +1019,42 @@ module Google
|
|
|
868
1019
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
869
1020
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
870
1021
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
871
|
-
def
|
|
872
|
-
command = make_simple_command(:delete, 'v1/courses/{courseId}/
|
|
1022
|
+
def delete_course_student(course_id, user_id, quota_user: nil, fields: nil, options: nil, &block)
|
|
1023
|
+
command = make_simple_command(:delete, 'v1/courses/{courseId}/students/{userId}', options)
|
|
873
1024
|
command.response_representation = Google::Apis::ClassroomV1::Empty::Representation
|
|
874
1025
|
command.response_class = Google::Apis::ClassroomV1::Empty
|
|
875
1026
|
command.params['courseId'] = course_id unless course_id.nil?
|
|
876
|
-
command.params['
|
|
877
|
-
command.query['fields'] = fields unless fields.nil?
|
|
1027
|
+
command.params['userId'] = user_id unless user_id.nil?
|
|
878
1028
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1029
|
+
command.query['fields'] = fields unless fields.nil?
|
|
879
1030
|
execute_or_queue_command(command, &block)
|
|
880
1031
|
end
|
|
881
1032
|
|
|
882
|
-
#
|
|
883
|
-
#
|
|
884
|
-
#
|
|
885
|
-
#
|
|
886
|
-
#
|
|
1033
|
+
# Creates course work.
|
|
1034
|
+
# The resulting course work (and corresponding student submissions) are
|
|
1035
|
+
# associated with the Developer Console project of the
|
|
1036
|
+
# [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
|
|
1037
|
+
# make the request. Classroom API requests to modify course work and student
|
|
1038
|
+
# submissions must be made with an OAuth client ID from the associated
|
|
1039
|
+
# Developer Console project.
|
|
1040
|
+
# This method returns the following error codes:
|
|
1041
|
+
# * `PERMISSION_DENIED` if the requesting user is not permitted to access the
|
|
1042
|
+
# requested course, create course work in the requested course, share a
|
|
1043
|
+
# Drive attachment, or for access errors.
|
|
1044
|
+
# * `INVALID_ARGUMENT` if the request is malformed.
|
|
1045
|
+
# * `NOT_FOUND` if the requested course does not exist.
|
|
1046
|
+
# * `FAILED_PRECONDITION` for the following request error:
|
|
1047
|
+
# * AttachmentNotVisible
|
|
887
1048
|
# @param [String] course_id
|
|
888
|
-
# Identifier of the course.
|
|
889
|
-
# identifier or an
|
|
890
|
-
#
|
|
891
|
-
#
|
|
892
|
-
# @param [String] fields
|
|
893
|
-
# Selector specifying which fields to include in a partial response.
|
|
1049
|
+
# Identifier of the course.
|
|
1050
|
+
# This identifier can be either the Classroom-assigned identifier or an
|
|
1051
|
+
# alias.
|
|
1052
|
+
# @param [Google::Apis::ClassroomV1::CourseWork] course_work_object
|
|
894
1053
|
# @param [String] quota_user
|
|
895
1054
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
896
1055
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1056
|
+
# @param [String] fields
|
|
1057
|
+
# Selector specifying which fields to include in a partial response.
|
|
897
1058
|
# @param [Google::Apis::RequestOptions] options
|
|
898
1059
|
# Request-specific options
|
|
899
1060
|
#
|
|
@@ -906,143 +1067,266 @@ module Google
|
|
|
906
1067
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
907
1068
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
908
1069
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
909
|
-
def
|
|
910
|
-
command = make_simple_command(:
|
|
1070
|
+
def create_course_work(course_id, course_work_object = nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
1071
|
+
command = make_simple_command(:post, 'v1/courses/{courseId}/courseWork', options)
|
|
1072
|
+
command.request_representation = Google::Apis::ClassroomV1::CourseWork::Representation
|
|
1073
|
+
command.request_object = course_work_object
|
|
911
1074
|
command.response_representation = Google::Apis::ClassroomV1::CourseWork::Representation
|
|
912
1075
|
command.response_class = Google::Apis::ClassroomV1::CourseWork
|
|
913
1076
|
command.params['courseId'] = course_id unless course_id.nil?
|
|
914
|
-
command.params['id'] = id unless id.nil?
|
|
915
|
-
command.query['fields'] = fields unless fields.nil?
|
|
916
1077
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1078
|
+
command.query['fields'] = fields unless fields.nil?
|
|
917
1079
|
execute_or_queue_command(command, &block)
|
|
918
1080
|
end
|
|
919
1081
|
|
|
920
|
-
# Returns
|
|
921
|
-
#
|
|
922
|
-
#
|
|
923
|
-
#
|
|
924
|
-
#
|
|
925
|
-
#
|
|
1082
|
+
# Returns course work.
|
|
1083
|
+
# This method returns the following error codes:
|
|
1084
|
+
# * `PERMISSION_DENIED` if the requesting user is not permitted to access the
|
|
1085
|
+
# requested course or course work, or for access errors.
|
|
1086
|
+
# * `INVALID_ARGUMENT` if the request is malformed.
|
|
1087
|
+
# * `NOT_FOUND` if the requested course or course work does not exist.
|
|
926
1088
|
# @param [String] course_id
|
|
927
|
-
# Identifier of the course.
|
|
928
|
-
# identifier or an
|
|
929
|
-
#
|
|
930
|
-
#
|
|
931
|
-
#
|
|
932
|
-
# @param [String] order_by
|
|
933
|
-
# Optional sort ordering for results. A comma-separated list of fields with an
|
|
934
|
-
# optional sort direction keyword. Supported fields are `updateTime` and `
|
|
935
|
-
# dueDate`. Supported direction keywords are `asc` and `desc`. If not specified,
|
|
936
|
-
# `updateTime desc` is the default behavior. Examples: `dueDate asc,updateTime
|
|
937
|
-
# desc`, `updateTime,dueDate desc`
|
|
938
|
-
# @param [Fixnum] page_size
|
|
939
|
-
# Maximum number of items to return. Zero or unspecified indicates that the
|
|
940
|
-
# server may assign a maximum. The server may return fewer than the specified
|
|
941
|
-
# number of results.
|
|
942
|
-
# @param [String] page_token
|
|
943
|
-
# nextPageToken value returned from a previous list call, indicating that the
|
|
944
|
-
# subsequent page of results should be returned. The list request must be
|
|
945
|
-
# otherwise identical to the one that resulted in this token.
|
|
946
|
-
# @param [String] fields
|
|
947
|
-
# Selector specifying which fields to include in a partial response.
|
|
1089
|
+
# Identifier of the course.
|
|
1090
|
+
# This identifier can be either the Classroom-assigned identifier or an
|
|
1091
|
+
# alias.
|
|
1092
|
+
# @param [String] id
|
|
1093
|
+
# Identifier of the course work.
|
|
948
1094
|
# @param [String] quota_user
|
|
949
1095
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
950
1096
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1097
|
+
# @param [String] fields
|
|
1098
|
+
# Selector specifying which fields to include in a partial response.
|
|
951
1099
|
# @param [Google::Apis::RequestOptions] options
|
|
952
1100
|
# Request-specific options
|
|
953
1101
|
#
|
|
954
1102
|
# @yield [result, err] Result & error if block supplied
|
|
955
|
-
# @yieldparam result [Google::Apis::ClassroomV1::
|
|
1103
|
+
# @yieldparam result [Google::Apis::ClassroomV1::CourseWork] parsed result object
|
|
956
1104
|
# @yieldparam err [StandardError] error object if request failed
|
|
957
1105
|
#
|
|
958
|
-
# @return [Google::Apis::ClassroomV1::
|
|
1106
|
+
# @return [Google::Apis::ClassroomV1::CourseWork]
|
|
959
1107
|
#
|
|
960
1108
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
961
1109
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
962
1110
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
963
|
-
def
|
|
1111
|
+
def get_course_work(course_id, id, quota_user: nil, fields: nil, options: nil, &block)
|
|
1112
|
+
command = make_simple_command(:get, 'v1/courses/{courseId}/courseWork/{id}', options)
|
|
1113
|
+
command.response_representation = Google::Apis::ClassroomV1::CourseWork::Representation
|
|
1114
|
+
command.response_class = Google::Apis::ClassroomV1::CourseWork
|
|
1115
|
+
command.params['courseId'] = course_id unless course_id.nil?
|
|
1116
|
+
command.params['id'] = id unless id.nil?
|
|
1117
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1118
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1119
|
+
execute_or_queue_command(command, &block)
|
|
1120
|
+
end
|
|
1121
|
+
|
|
1122
|
+
# Returns a list of course work that the requester is permitted to view.
|
|
1123
|
+
# Course students may only view `PUBLISHED` course work. Course teachers
|
|
1124
|
+
# and domain administrators may view all course work.
|
|
1125
|
+
# This method returns the following error codes:
|
|
1126
|
+
# * `PERMISSION_DENIED` if the requesting user is not permitted to access
|
|
1127
|
+
# the requested course or for access errors.
|
|
1128
|
+
# * `INVALID_ARGUMENT` if the request is malformed.
|
|
1129
|
+
# * `NOT_FOUND` if the requested course does not exist.
|
|
1130
|
+
# @param [String] course_id
|
|
1131
|
+
# Identifier of the course.
|
|
1132
|
+
# This identifier can be either the Classroom-assigned identifier or an
|
|
1133
|
+
# alias.
|
|
1134
|
+
# @param [Array<String>, String] course_work_states
|
|
1135
|
+
# Restriction on the work status to return. Only courseWork that matches
|
|
1136
|
+
# is returned. If unspecified, items with a work status of `PUBLISHED`
|
|
1137
|
+
# is returned.
|
|
1138
|
+
# @param [Fixnum] page_size
|
|
1139
|
+
# Maximum number of items to return. Zero or unspecified indicates that the
|
|
1140
|
+
# server may assign a maximum.
|
|
1141
|
+
# The server may return fewer than the specified number of results.
|
|
1142
|
+
# @param [String] order_by
|
|
1143
|
+
# Optional sort ordering for results. A comma-separated list of fields with
|
|
1144
|
+
# an optional sort direction keyword. Supported fields are `updateTime`
|
|
1145
|
+
# and `dueDate`. Supported direction keywords are `asc` and `desc`.
|
|
1146
|
+
# If not specified, `updateTime desc` is the default behavior.
|
|
1147
|
+
# Examples: `dueDate asc,updateTime desc`, `updateTime,dueDate desc`
|
|
1148
|
+
# @param [String] page_token
|
|
1149
|
+
# nextPageToken
|
|
1150
|
+
# value returned from a previous
|
|
1151
|
+
# list call,
|
|
1152
|
+
# indicating that the subsequent page of results should be returned.
|
|
1153
|
+
# The list request
|
|
1154
|
+
# must be otherwise identical to the one that resulted in this token.
|
|
1155
|
+
# @param [String] quota_user
|
|
1156
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1157
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1158
|
+
# @param [String] fields
|
|
1159
|
+
# Selector specifying which fields to include in a partial response.
|
|
1160
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1161
|
+
# Request-specific options
|
|
1162
|
+
#
|
|
1163
|
+
# @yield [result, err] Result & error if block supplied
|
|
1164
|
+
# @yieldparam result [Google::Apis::ClassroomV1::ListCourseWorkResponse] parsed result object
|
|
1165
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1166
|
+
#
|
|
1167
|
+
# @return [Google::Apis::ClassroomV1::ListCourseWorkResponse]
|
|
1168
|
+
#
|
|
1169
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1170
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1171
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1172
|
+
def list_course_works(course_id, course_work_states: nil, page_size: nil, order_by: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
964
1173
|
command = make_simple_command(:get, 'v1/courses/{courseId}/courseWork', options)
|
|
965
1174
|
command.response_representation = Google::Apis::ClassroomV1::ListCourseWorkResponse::Representation
|
|
966
1175
|
command.response_class = Google::Apis::ClassroomV1::ListCourseWorkResponse
|
|
967
1176
|
command.params['courseId'] = course_id unless course_id.nil?
|
|
968
1177
|
command.query['courseWorkStates'] = course_work_states unless course_work_states.nil?
|
|
969
|
-
command.query['orderBy'] = order_by unless order_by.nil?
|
|
970
1178
|
command.query['pageSize'] = page_size unless page_size.nil?
|
|
1179
|
+
command.query['orderBy'] = order_by unless order_by.nil?
|
|
971
1180
|
command.query['pageToken'] = page_token unless page_token.nil?
|
|
972
|
-
command.query['fields'] = fields unless fields.nil?
|
|
973
1181
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1182
|
+
command.query['fields'] = fields unless fields.nil?
|
|
974
1183
|
execute_or_queue_command(command, &block)
|
|
975
1184
|
end
|
|
976
1185
|
|
|
977
|
-
#
|
|
978
|
-
#
|
|
979
|
-
#
|
|
980
|
-
#
|
|
981
|
-
#
|
|
1186
|
+
# Updates one or more fields of a course work.
|
|
1187
|
+
# See google.classroom.v1.CourseWork for details
|
|
1188
|
+
# of which fields may be updated and who may change them.
|
|
1189
|
+
# This request must be made by the Developer Console project of the
|
|
1190
|
+
# [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
|
|
1191
|
+
# create the corresponding course work item.
|
|
1192
|
+
# This method returns the following error codes:
|
|
1193
|
+
# * `PERMISSION_DENIED` if the requesting developer project did not create
|
|
1194
|
+
# the corresponding course work, if the user is not permitted to make the
|
|
1195
|
+
# requested modification to the student submission, or for
|
|
1196
|
+
# access errors.
|
|
1197
|
+
# * `INVALID_ARGUMENT` if the request is malformed.
|
|
1198
|
+
# * `FAILED_PRECONDITION` if the requested course work has already been
|
|
1199
|
+
# deleted.
|
|
1200
|
+
# * `NOT_FOUND` if the requested course, course work, or student submission
|
|
1201
|
+
# does not exist.
|
|
982
1202
|
# @param [String] course_id
|
|
983
|
-
# Identifier of the course.
|
|
984
|
-
# identifier or an
|
|
985
|
-
#
|
|
986
|
-
# Identifier of the course work.
|
|
1203
|
+
# Identifier of the course.
|
|
1204
|
+
# This identifier can be either the Classroom-assigned identifier or an
|
|
1205
|
+
# alias.
|
|
987
1206
|
# @param [String] id
|
|
988
|
-
# Identifier of the
|
|
1207
|
+
# Identifier of the course work.
|
|
1208
|
+
# @param [Google::Apis::ClassroomV1::CourseWork] course_work_object
|
|
1209
|
+
# @param [String] update_mask
|
|
1210
|
+
# Mask that identifies which fields on the course work to update.
|
|
1211
|
+
# This field is required to do an update. The update fails if invalid
|
|
1212
|
+
# fields are specified. If a field supports empty values, it can be cleared
|
|
1213
|
+
# by specifying it in the update mask and not in the CourseWork object. If a
|
|
1214
|
+
# field that does not support empty values is included in the update mask and
|
|
1215
|
+
# not set in the CourseWork object, an `INVALID_ARGUMENT` error will be
|
|
1216
|
+
# returned.
|
|
1217
|
+
# The following fields may be specified by teachers:
|
|
1218
|
+
# * `title`
|
|
1219
|
+
# * `description`
|
|
1220
|
+
# * `state`
|
|
1221
|
+
# * `due_date`
|
|
1222
|
+
# * `due_time`
|
|
1223
|
+
# * `max_points`
|
|
1224
|
+
# * `submission_modification_mode`
|
|
1225
|
+
# @param [String] quota_user
|
|
1226
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1227
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
989
1228
|
# @param [String] fields
|
|
990
1229
|
# Selector specifying which fields to include in a partial response.
|
|
1230
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1231
|
+
# Request-specific options
|
|
1232
|
+
#
|
|
1233
|
+
# @yield [result, err] Result & error if block supplied
|
|
1234
|
+
# @yieldparam result [Google::Apis::ClassroomV1::CourseWork] parsed result object
|
|
1235
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1236
|
+
#
|
|
1237
|
+
# @return [Google::Apis::ClassroomV1::CourseWork]
|
|
1238
|
+
#
|
|
1239
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1240
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1241
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1242
|
+
def patch_course_course_work(course_id, id, course_work_object = nil, update_mask: nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
1243
|
+
command = make_simple_command(:patch, 'v1/courses/{courseId}/courseWork/{id}', options)
|
|
1244
|
+
command.request_representation = Google::Apis::ClassroomV1::CourseWork::Representation
|
|
1245
|
+
command.request_object = course_work_object
|
|
1246
|
+
command.response_representation = Google::Apis::ClassroomV1::CourseWork::Representation
|
|
1247
|
+
command.response_class = Google::Apis::ClassroomV1::CourseWork
|
|
1248
|
+
command.params['courseId'] = course_id unless course_id.nil?
|
|
1249
|
+
command.params['id'] = id unless id.nil?
|
|
1250
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
|
1251
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1252
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1253
|
+
execute_or_queue_command(command, &block)
|
|
1254
|
+
end
|
|
1255
|
+
|
|
1256
|
+
# Deletes a course work.
|
|
1257
|
+
# This request must be made by the Developer Console project of the
|
|
1258
|
+
# [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
|
|
1259
|
+
# create the corresponding course work item.
|
|
1260
|
+
# This method returns the following error codes:
|
|
1261
|
+
# * `PERMISSION_DENIED` if the requesting developer project did not create
|
|
1262
|
+
# the corresponding course work, if the requesting user is not permitted
|
|
1263
|
+
# to delete the requested course or for access errors.
|
|
1264
|
+
# * `FAILED_PRECONDITION` if the requested course work has already been
|
|
1265
|
+
# deleted.
|
|
1266
|
+
# * `NOT_FOUND` if no course exists with the requested ID.
|
|
1267
|
+
# @param [String] course_id
|
|
1268
|
+
# Identifier of the course.
|
|
1269
|
+
# This identifier can be either the Classroom-assigned identifier or an
|
|
1270
|
+
# alias.
|
|
1271
|
+
# @param [String] id
|
|
1272
|
+
# Identifier of the course work to delete.
|
|
1273
|
+
# This identifier is a Classroom-assigned identifier.
|
|
991
1274
|
# @param [String] quota_user
|
|
992
1275
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
993
1276
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1277
|
+
# @param [String] fields
|
|
1278
|
+
# Selector specifying which fields to include in a partial response.
|
|
994
1279
|
# @param [Google::Apis::RequestOptions] options
|
|
995
1280
|
# Request-specific options
|
|
996
1281
|
#
|
|
997
1282
|
# @yield [result, err] Result & error if block supplied
|
|
998
|
-
# @yieldparam result [Google::Apis::ClassroomV1::
|
|
1283
|
+
# @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object
|
|
999
1284
|
# @yieldparam err [StandardError] error object if request failed
|
|
1000
1285
|
#
|
|
1001
|
-
# @return [Google::Apis::ClassroomV1::
|
|
1286
|
+
# @return [Google::Apis::ClassroomV1::Empty]
|
|
1002
1287
|
#
|
|
1003
1288
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1004
1289
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1005
1290
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1006
|
-
def
|
|
1007
|
-
command = make_simple_command(:
|
|
1008
|
-
command.response_representation = Google::Apis::ClassroomV1::
|
|
1009
|
-
command.response_class = Google::Apis::ClassroomV1::
|
|
1291
|
+
def delete_course_course_work(course_id, id, quota_user: nil, fields: nil, options: nil, &block)
|
|
1292
|
+
command = make_simple_command(:delete, 'v1/courses/{courseId}/courseWork/{id}', options)
|
|
1293
|
+
command.response_representation = Google::Apis::ClassroomV1::Empty::Representation
|
|
1294
|
+
command.response_class = Google::Apis::ClassroomV1::Empty
|
|
1010
1295
|
command.params['courseId'] = course_id unless course_id.nil?
|
|
1011
|
-
command.params['courseWorkId'] = course_work_id unless course_work_id.nil?
|
|
1012
1296
|
command.params['id'] = id unless id.nil?
|
|
1013
|
-
command.query['fields'] = fields unless fields.nil?
|
|
1014
1297
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1298
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1015
1299
|
execute_or_queue_command(command, &block)
|
|
1016
1300
|
end
|
|
1017
1301
|
|
|
1018
|
-
#
|
|
1019
|
-
#
|
|
1020
|
-
#
|
|
1302
|
+
# Modifies attachments of student submission.
|
|
1303
|
+
# Attachments may only be added to student submissions belonging to course
|
|
1304
|
+
# work objects with a `workType` of `ASSIGNMENT`.
|
|
1305
|
+
# This request must be made by the Developer Console project of the
|
|
1021
1306
|
# [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
|
|
1022
|
-
# create the corresponding course work item.
|
|
1023
|
-
#
|
|
1024
|
-
#
|
|
1025
|
-
# requested
|
|
1026
|
-
#
|
|
1027
|
-
#
|
|
1307
|
+
# create the corresponding course work item.
|
|
1308
|
+
# This method returns the following error codes:
|
|
1309
|
+
# * `PERMISSION_DENIED` if the requesting user is not permitted to access the
|
|
1310
|
+
# requested course or course work, if the user is not permitted to modify
|
|
1311
|
+
# attachments on the requested student submission, or for
|
|
1312
|
+
# access errors.
|
|
1313
|
+
# * `INVALID_ARGUMENT` if the request is malformed.
|
|
1314
|
+
# * `NOT_FOUND` if the requested course, course work, or student submission
|
|
1315
|
+
# does not exist.
|
|
1028
1316
|
# @param [String] course_id
|
|
1029
|
-
# Identifier of the course.
|
|
1030
|
-
# identifier or an
|
|
1317
|
+
# Identifier of the course.
|
|
1318
|
+
# This identifier can be either the Classroom-assigned identifier or an
|
|
1319
|
+
# alias.
|
|
1031
1320
|
# @param [String] course_work_id
|
|
1032
1321
|
# Identifier of the course work.
|
|
1033
1322
|
# @param [String] id
|
|
1034
1323
|
# Identifier of the student submission.
|
|
1035
|
-
# @param [Google::Apis::ClassroomV1::
|
|
1036
|
-
# @param [String] update_mask
|
|
1037
|
-
# Mask that identifies which fields on the student submission to update. This
|
|
1038
|
-
# field is required to do an update. The update fails if invalid fields are
|
|
1039
|
-
# specified. The following fields may be specified by teachers: * `draft_grade` *
|
|
1040
|
-
# `assigned_grade`
|
|
1041
|
-
# @param [String] fields
|
|
1042
|
-
# Selector specifying which fields to include in a partial response.
|
|
1324
|
+
# @param [Google::Apis::ClassroomV1::ModifyAttachmentsRequest] modify_attachments_request_object
|
|
1043
1325
|
# @param [String] quota_user
|
|
1044
1326
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
1045
1327
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1328
|
+
# @param [String] fields
|
|
1329
|
+
# Selector specifying which fields to include in a partial response.
|
|
1046
1330
|
# @param [Google::Apis::RequestOptions] options
|
|
1047
1331
|
# Request-specific options
|
|
1048
1332
|
#
|
|
@@ -1055,114 +1339,105 @@ module Google
|
|
|
1055
1339
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1056
1340
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1057
1341
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1058
|
-
def
|
|
1059
|
-
command = make_simple_command(:
|
|
1060
|
-
command.request_representation = Google::Apis::ClassroomV1::
|
|
1061
|
-
command.request_object =
|
|
1342
|
+
def modify_student_submission_attachments(course_id, course_work_id, id, modify_attachments_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
1343
|
+
command = make_simple_command(:post, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:modifyAttachments', options)
|
|
1344
|
+
command.request_representation = Google::Apis::ClassroomV1::ModifyAttachmentsRequest::Representation
|
|
1345
|
+
command.request_object = modify_attachments_request_object
|
|
1062
1346
|
command.response_representation = Google::Apis::ClassroomV1::StudentSubmission::Representation
|
|
1063
1347
|
command.response_class = Google::Apis::ClassroomV1::StudentSubmission
|
|
1064
1348
|
command.params['courseId'] = course_id unless course_id.nil?
|
|
1065
1349
|
command.params['courseWorkId'] = course_work_id unless course_work_id.nil?
|
|
1066
1350
|
command.params['id'] = id unless id.nil?
|
|
1067
|
-
command.query['updateMask'] = update_mask unless update_mask.nil?
|
|
1068
|
-
command.query['fields'] = fields unless fields.nil?
|
|
1069
1351
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1352
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1070
1353
|
execute_or_queue_command(command, &block)
|
|
1071
1354
|
end
|
|
1072
1355
|
|
|
1073
|
-
#
|
|
1074
|
-
#
|
|
1075
|
-
#
|
|
1076
|
-
#
|
|
1077
|
-
#
|
|
1078
|
-
#
|
|
1079
|
-
#
|
|
1080
|
-
#
|
|
1081
|
-
#
|
|
1356
|
+
# Reclaims a student submission on behalf of the student that owns it.
|
|
1357
|
+
# Reclaiming a student submission transfers ownership of attached Drive
|
|
1358
|
+
# files to the student and update the submission state.
|
|
1359
|
+
# Only the student that owns the requested student submission may call this
|
|
1360
|
+
# method, and only for a student submission that has been turned in.
|
|
1361
|
+
# This request must be made by the Developer Console project of the
|
|
1362
|
+
# [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
|
|
1363
|
+
# create the corresponding course work item.
|
|
1364
|
+
# This method returns the following error codes:
|
|
1365
|
+
# * `PERMISSION_DENIED` if the requesting user is not permitted to access the
|
|
1366
|
+
# requested course or course work, unsubmit the requested student submission,
|
|
1367
|
+
# or for access errors.
|
|
1368
|
+
# * `FAILED_PRECONDITION` if the student submission has not been turned in.
|
|
1369
|
+
# * `INVALID_ARGUMENT` if the request is malformed.
|
|
1370
|
+
# * `NOT_FOUND` if the requested course, course work, or student submission
|
|
1371
|
+
# does not exist.
|
|
1082
1372
|
# @param [String] course_id
|
|
1083
|
-
# Identifier of the course.
|
|
1084
|
-
# identifier or an
|
|
1373
|
+
# Identifier of the course.
|
|
1374
|
+
# This identifier can be either the Classroom-assigned identifier or an
|
|
1375
|
+
# alias.
|
|
1085
1376
|
# @param [String] course_work_id
|
|
1086
|
-
#
|
|
1087
|
-
#
|
|
1088
|
-
#
|
|
1089
|
-
# @param [
|
|
1090
|
-
# Optional argument to restrict returned student work to those owned by the
|
|
1091
|
-
# student with the specified identifier. The identifier can be one of the
|
|
1092
|
-
# following: * the numeric identifier for the user * the email address of the
|
|
1093
|
-
# user * the string literal `"me"`, indicating the requesting user
|
|
1094
|
-
# @param [Array<String>, String] states
|
|
1095
|
-
# Requested submission states. If specified, returned student submissions match
|
|
1096
|
-
# one of the specified submission states.
|
|
1097
|
-
# @param [String] late
|
|
1098
|
-
# Requested lateness value. If specified, returned student submissions are
|
|
1099
|
-
# restricted by the requested value. If unspecified, submissions are returned
|
|
1100
|
-
# regardless of `late` value.
|
|
1101
|
-
# @param [Fixnum] page_size
|
|
1102
|
-
# Maximum number of items to return. Zero or unspecified indicates that the
|
|
1103
|
-
# server may assign a maximum. The server may return fewer than the specified
|
|
1104
|
-
# number of results.
|
|
1105
|
-
# @param [String] page_token
|
|
1106
|
-
# nextPageToken value returned from a previous list call, indicating that the
|
|
1107
|
-
# subsequent page of results should be returned. The list request must be
|
|
1108
|
-
# otherwise identical to the one that resulted in this token.
|
|
1109
|
-
# @param [String] fields
|
|
1110
|
-
# Selector specifying which fields to include in a partial response.
|
|
1377
|
+
# Identifier of the course work.
|
|
1378
|
+
# @param [String] id
|
|
1379
|
+
# Identifier of the student submission.
|
|
1380
|
+
# @param [Google::Apis::ClassroomV1::ReclaimStudentSubmissionRequest] reclaim_student_submission_request_object
|
|
1111
1381
|
# @param [String] quota_user
|
|
1112
1382
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
1113
1383
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1384
|
+
# @param [String] fields
|
|
1385
|
+
# Selector specifying which fields to include in a partial response.
|
|
1114
1386
|
# @param [Google::Apis::RequestOptions] options
|
|
1115
1387
|
# Request-specific options
|
|
1116
1388
|
#
|
|
1117
1389
|
# @yield [result, err] Result & error if block supplied
|
|
1118
|
-
# @yieldparam result [Google::Apis::ClassroomV1::
|
|
1390
|
+
# @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object
|
|
1119
1391
|
# @yieldparam err [StandardError] error object if request failed
|
|
1120
1392
|
#
|
|
1121
|
-
# @return [Google::Apis::ClassroomV1::
|
|
1393
|
+
# @return [Google::Apis::ClassroomV1::Empty]
|
|
1122
1394
|
#
|
|
1123
1395
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1124
1396
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1125
1397
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1126
|
-
def
|
|
1127
|
-
command = make_simple_command(:
|
|
1128
|
-
command.
|
|
1129
|
-
command.
|
|
1398
|
+
def reclaim_student_submission(course_id, course_work_id, id, reclaim_student_submission_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
1399
|
+
command = make_simple_command(:post, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:reclaim', options)
|
|
1400
|
+
command.request_representation = Google::Apis::ClassroomV1::ReclaimStudentSubmissionRequest::Representation
|
|
1401
|
+
command.request_object = reclaim_student_submission_request_object
|
|
1402
|
+
command.response_representation = Google::Apis::ClassroomV1::Empty::Representation
|
|
1403
|
+
command.response_class = Google::Apis::ClassroomV1::Empty
|
|
1130
1404
|
command.params['courseId'] = course_id unless course_id.nil?
|
|
1131
1405
|
command.params['courseWorkId'] = course_work_id unless course_work_id.nil?
|
|
1132
|
-
command.
|
|
1133
|
-
command.query['states'] = states unless states.nil?
|
|
1134
|
-
command.query['late'] = late unless late.nil?
|
|
1135
|
-
command.query['pageSize'] = page_size unless page_size.nil?
|
|
1136
|
-
command.query['pageToken'] = page_token unless page_token.nil?
|
|
1137
|
-
command.query['fields'] = fields unless fields.nil?
|
|
1406
|
+
command.params['id'] = id unless id.nil?
|
|
1138
1407
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1408
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1139
1409
|
execute_or_queue_command(command, &block)
|
|
1140
1410
|
end
|
|
1141
1411
|
|
|
1142
|
-
# Turns in a student submission.
|
|
1143
|
-
#
|
|
1144
|
-
#
|
|
1145
|
-
#
|
|
1146
|
-
#
|
|
1147
|
-
#
|
|
1148
|
-
#
|
|
1149
|
-
#
|
|
1150
|
-
#
|
|
1151
|
-
# if the
|
|
1152
|
-
# work,
|
|
1412
|
+
# Turns in a student submission.
|
|
1413
|
+
# Turning in a student submission transfers ownership of attached Drive
|
|
1414
|
+
# files to the teacher and may also update the submission state.
|
|
1415
|
+
# This may only be called by the student that owns the specified student
|
|
1416
|
+
# submission.
|
|
1417
|
+
# This request must be made by the Developer Console project of the
|
|
1418
|
+
# [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
|
|
1419
|
+
# create the corresponding course work item.
|
|
1420
|
+
# This method returns the following error codes:
|
|
1421
|
+
# * `PERMISSION_DENIED` if the requesting user is not permitted to access the
|
|
1422
|
+
# requested course or course work, turn in the requested student submission,
|
|
1423
|
+
# or for access errors.
|
|
1424
|
+
# * `INVALID_ARGUMENT` if the request is malformed.
|
|
1425
|
+
# * `NOT_FOUND` if the requested course, course work, or student submission
|
|
1426
|
+
# does not exist.
|
|
1153
1427
|
# @param [String] course_id
|
|
1154
|
-
# Identifier of the course.
|
|
1155
|
-
# identifier or an
|
|
1428
|
+
# Identifier of the course.
|
|
1429
|
+
# This identifier can be either the Classroom-assigned identifier or an
|
|
1430
|
+
# alias.
|
|
1156
1431
|
# @param [String] course_work_id
|
|
1157
1432
|
# Identifier of the course work.
|
|
1158
1433
|
# @param [String] id
|
|
1159
1434
|
# Identifier of the student submission.
|
|
1160
1435
|
# @param [Google::Apis::ClassroomV1::TurnInStudentSubmissionRequest] turn_in_student_submission_request_object
|
|
1161
|
-
# @param [String] fields
|
|
1162
|
-
# Selector specifying which fields to include in a partial response.
|
|
1163
1436
|
# @param [String] quota_user
|
|
1164
1437
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
1165
1438
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1439
|
+
# @param [String] fields
|
|
1440
|
+
# Selector specifying which fields to include in a partial response.
|
|
1166
1441
|
# @param [Google::Apis::RequestOptions] options
|
|
1167
1442
|
# Request-specific options
|
|
1168
1443
|
#
|
|
@@ -1175,7 +1450,7 @@ module Google
|
|
|
1175
1450
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1176
1451
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1177
1452
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1178
|
-
def turn_in_student_submission(course_id, course_work_id, id, turn_in_student_submission_request_object = nil,
|
|
1453
|
+
def turn_in_student_submission(course_id, course_work_id, id, turn_in_student_submission_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
1179
1454
|
command = make_simple_command(:post, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:turnIn', options)
|
|
1180
1455
|
command.request_representation = Google::Apis::ClassroomV1::TurnInStudentSubmissionRequest::Representation
|
|
1181
1456
|
command.request_object = turn_in_student_submission_request_object
|
|
@@ -1184,89 +1459,163 @@ module Google
|
|
|
1184
1459
|
command.params['courseId'] = course_id unless course_id.nil?
|
|
1185
1460
|
command.params['courseWorkId'] = course_work_id unless course_work_id.nil?
|
|
1186
1461
|
command.params['id'] = id unless id.nil?
|
|
1462
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1187
1463
|
command.query['fields'] = fields unless fields.nil?
|
|
1464
|
+
execute_or_queue_command(command, &block)
|
|
1465
|
+
end
|
|
1466
|
+
|
|
1467
|
+
# Returns a list of student submissions that the requester is permitted to
|
|
1468
|
+
# view, factoring in the OAuth scopes of the request.
|
|
1469
|
+
# `-` may be specified as the `course_work_id` to include student
|
|
1470
|
+
# submissions for multiple course work items.
|
|
1471
|
+
# Course students may only view their own work. Course teachers
|
|
1472
|
+
# and domain administrators may view all student submissions.
|
|
1473
|
+
# This method returns the following error codes:
|
|
1474
|
+
# * `PERMISSION_DENIED` if the requesting user is not permitted to access the
|
|
1475
|
+
# requested course or course work, or for access errors.
|
|
1476
|
+
# * `INVALID_ARGUMENT` if the request is malformed.
|
|
1477
|
+
# * `NOT_FOUND` if the requested course does not exist.
|
|
1478
|
+
# @param [String] course_id
|
|
1479
|
+
# Identifier of the course.
|
|
1480
|
+
# This identifier can be either the Classroom-assigned identifier or an
|
|
1481
|
+
# alias.
|
|
1482
|
+
# @param [String] course_work_id
|
|
1483
|
+
# Identifer of the student work to request.
|
|
1484
|
+
# This may be set to the string literal `"-"` to request student work for
|
|
1485
|
+
# all course work in the specified course.
|
|
1486
|
+
# @param [Array<String>, String] states
|
|
1487
|
+
# Requested submission states. If specified, returned student submissions
|
|
1488
|
+
# match one of the specified submission states.
|
|
1489
|
+
# @param [String] user_id
|
|
1490
|
+
# Optional argument to restrict returned student work to those owned by the
|
|
1491
|
+
# student with the specified identifier. The identifier can be one of the
|
|
1492
|
+
# following:
|
|
1493
|
+
# * the numeric identifier for the user
|
|
1494
|
+
# * the email address of the user
|
|
1495
|
+
# * the string literal `"me"`, indicating the requesting user
|
|
1496
|
+
# @param [Fixnum] page_size
|
|
1497
|
+
# Maximum number of items to return. Zero or unspecified indicates that the
|
|
1498
|
+
# server may assign a maximum.
|
|
1499
|
+
# The server may return fewer than the specified number of results.
|
|
1500
|
+
# @param [String] late
|
|
1501
|
+
# Requested lateness value. If specified, returned student submissions are
|
|
1502
|
+
# restricted by the requested value.
|
|
1503
|
+
# If unspecified, submissions are returned regardless of `late` value.
|
|
1504
|
+
# @param [String] page_token
|
|
1505
|
+
# nextPageToken
|
|
1506
|
+
# value returned from a previous
|
|
1507
|
+
# list call,
|
|
1508
|
+
# indicating that the subsequent page of results should be returned.
|
|
1509
|
+
# The list request
|
|
1510
|
+
# must be otherwise identical to the one that resulted in this token.
|
|
1511
|
+
# @param [String] quota_user
|
|
1512
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1513
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1514
|
+
# @param [String] fields
|
|
1515
|
+
# Selector specifying which fields to include in a partial response.
|
|
1516
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1517
|
+
# Request-specific options
|
|
1518
|
+
#
|
|
1519
|
+
# @yield [result, err] Result & error if block supplied
|
|
1520
|
+
# @yieldparam result [Google::Apis::ClassroomV1::ListStudentSubmissionsResponse] parsed result object
|
|
1521
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1522
|
+
#
|
|
1523
|
+
# @return [Google::Apis::ClassroomV1::ListStudentSubmissionsResponse]
|
|
1524
|
+
#
|
|
1525
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1526
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1527
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1528
|
+
def list_student_submissions(course_id, course_work_id, states: nil, user_id: nil, page_size: nil, late: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
1529
|
+
command = make_simple_command(:get, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions', options)
|
|
1530
|
+
command.response_representation = Google::Apis::ClassroomV1::ListStudentSubmissionsResponse::Representation
|
|
1531
|
+
command.response_class = Google::Apis::ClassroomV1::ListStudentSubmissionsResponse
|
|
1532
|
+
command.params['courseId'] = course_id unless course_id.nil?
|
|
1533
|
+
command.params['courseWorkId'] = course_work_id unless course_work_id.nil?
|
|
1534
|
+
command.query['states'] = states unless states.nil?
|
|
1535
|
+
command.query['userId'] = user_id unless user_id.nil?
|
|
1536
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
|
1537
|
+
command.query['late'] = late unless late.nil?
|
|
1538
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
1188
1539
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1540
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1189
1541
|
execute_or_queue_command(command, &block)
|
|
1190
1542
|
end
|
|
1191
1543
|
|
|
1192
|
-
#
|
|
1193
|
-
#
|
|
1194
|
-
#
|
|
1195
|
-
#
|
|
1196
|
-
#
|
|
1197
|
-
#
|
|
1198
|
-
#
|
|
1199
|
-
# returns the following error codes: * `PERMISSION_DENIED` if the requesting
|
|
1200
|
-
# user is not permitted to access the requested course or course work, unsubmit
|
|
1201
|
-
# the requested student submission, or for access errors. * `FAILED_PRECONDITION`
|
|
1202
|
-
# if the student submission has not been turned in. * `INVALID_ARGUMENT` if the
|
|
1203
|
-
# request is malformed. * `NOT_FOUND` if the requested course, course work, or
|
|
1204
|
-
# student submission does not exist.
|
|
1544
|
+
# Returns a student submission.
|
|
1545
|
+
# * `PERMISSION_DENIED` if the requesting user is not permitted to access the
|
|
1546
|
+
# requested course, course work, or student submission or for
|
|
1547
|
+
# access errors.
|
|
1548
|
+
# * `INVALID_ARGUMENT` if the request is malformed.
|
|
1549
|
+
# * `NOT_FOUND` if the requested course, course work, or student submission
|
|
1550
|
+
# does not exist.
|
|
1205
1551
|
# @param [String] course_id
|
|
1206
|
-
# Identifier of the course.
|
|
1207
|
-
# identifier or an
|
|
1552
|
+
# Identifier of the course.
|
|
1553
|
+
# This identifier can be either the Classroom-assigned identifier or an
|
|
1554
|
+
# alias.
|
|
1208
1555
|
# @param [String] course_work_id
|
|
1209
1556
|
# Identifier of the course work.
|
|
1210
1557
|
# @param [String] id
|
|
1211
1558
|
# Identifier of the student submission.
|
|
1212
|
-
# @param [Google::Apis::ClassroomV1::ReclaimStudentSubmissionRequest] reclaim_student_submission_request_object
|
|
1213
|
-
# @param [String] fields
|
|
1214
|
-
# Selector specifying which fields to include in a partial response.
|
|
1215
1559
|
# @param [String] quota_user
|
|
1216
1560
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
1217
1561
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1562
|
+
# @param [String] fields
|
|
1563
|
+
# Selector specifying which fields to include in a partial response.
|
|
1218
1564
|
# @param [Google::Apis::RequestOptions] options
|
|
1219
1565
|
# Request-specific options
|
|
1220
1566
|
#
|
|
1221
1567
|
# @yield [result, err] Result & error if block supplied
|
|
1222
|
-
# @yieldparam result [Google::Apis::ClassroomV1::
|
|
1568
|
+
# @yieldparam result [Google::Apis::ClassroomV1::StudentSubmission] parsed result object
|
|
1223
1569
|
# @yieldparam err [StandardError] error object if request failed
|
|
1224
1570
|
#
|
|
1225
|
-
# @return [Google::Apis::ClassroomV1::
|
|
1571
|
+
# @return [Google::Apis::ClassroomV1::StudentSubmission]
|
|
1226
1572
|
#
|
|
1227
1573
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1228
1574
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1229
1575
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1230
|
-
def
|
|
1231
|
-
command = make_simple_command(:
|
|
1232
|
-
command.
|
|
1233
|
-
command.
|
|
1234
|
-
command.response_representation = Google::Apis::ClassroomV1::Empty::Representation
|
|
1235
|
-
command.response_class = Google::Apis::ClassroomV1::Empty
|
|
1576
|
+
def get_student_submission(course_id, course_work_id, id, quota_user: nil, fields: nil, options: nil, &block)
|
|
1577
|
+
command = make_simple_command(:get, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}', options)
|
|
1578
|
+
command.response_representation = Google::Apis::ClassroomV1::StudentSubmission::Representation
|
|
1579
|
+
command.response_class = Google::Apis::ClassroomV1::StudentSubmission
|
|
1236
1580
|
command.params['courseId'] = course_id unless course_id.nil?
|
|
1237
1581
|
command.params['courseWorkId'] = course_work_id unless course_work_id.nil?
|
|
1238
1582
|
command.params['id'] = id unless id.nil?
|
|
1239
|
-
command.query['fields'] = fields unless fields.nil?
|
|
1240
1583
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1584
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1241
1585
|
execute_or_queue_command(command, &block)
|
|
1242
1586
|
end
|
|
1243
1587
|
|
|
1244
|
-
# Returns a student submission.
|
|
1245
|
-
#
|
|
1246
|
-
#
|
|
1247
|
-
#
|
|
1248
|
-
#
|
|
1249
|
-
#
|
|
1250
|
-
#
|
|
1251
|
-
#
|
|
1252
|
-
#
|
|
1253
|
-
#
|
|
1254
|
-
#
|
|
1255
|
-
#
|
|
1256
|
-
#
|
|
1588
|
+
# Returns a student submission.
|
|
1589
|
+
# Returning a student submission transfers ownership of attached Drive
|
|
1590
|
+
# files to the student and may also update the submission state.
|
|
1591
|
+
# Unlike the Classroom application, returning a student submission does not
|
|
1592
|
+
# set assignedGrade to the draftGrade value.
|
|
1593
|
+
# Only a teacher of the course that contains the requested student submission
|
|
1594
|
+
# may call this method.
|
|
1595
|
+
# This request must be made by the Developer Console project of the
|
|
1596
|
+
# [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
|
|
1597
|
+
# create the corresponding course work item.
|
|
1598
|
+
# This method returns the following error codes:
|
|
1599
|
+
# * `PERMISSION_DENIED` if the requesting user is not permitted to access the
|
|
1600
|
+
# requested course or course work, return the requested student submission,
|
|
1601
|
+
# or for access errors.
|
|
1602
|
+
# * `INVALID_ARGUMENT` if the request is malformed.
|
|
1603
|
+
# * `NOT_FOUND` if the requested course, course work, or student submission
|
|
1604
|
+
# does not exist.
|
|
1257
1605
|
# @param [String] course_id
|
|
1258
|
-
# Identifier of the course.
|
|
1259
|
-
# identifier or an
|
|
1606
|
+
# Identifier of the course.
|
|
1607
|
+
# This identifier can be either the Classroom-assigned identifier or an
|
|
1608
|
+
# alias.
|
|
1260
1609
|
# @param [String] course_work_id
|
|
1261
1610
|
# Identifier of the course work.
|
|
1262
1611
|
# @param [String] id
|
|
1263
1612
|
# Identifier of the student submission.
|
|
1264
1613
|
# @param [Google::Apis::ClassroomV1::ReturnStudentSubmissionRequest] return_student_submission_request_object
|
|
1265
|
-
# @param [String] fields
|
|
1266
|
-
# Selector specifying which fields to include in a partial response.
|
|
1267
1614
|
# @param [String] quota_user
|
|
1268
1615
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
1269
1616
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1617
|
+
# @param [String] fields
|
|
1618
|
+
# Selector specifying which fields to include in a partial response.
|
|
1270
1619
|
# @param [Google::Apis::RequestOptions] options
|
|
1271
1620
|
# Request-specific options
|
|
1272
1621
|
#
|
|
@@ -1279,7 +1628,7 @@ module Google
|
|
|
1279
1628
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1280
1629
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1281
1630
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1282
|
-
def return_student_submission(course_id, course_work_id, id, return_student_submission_request_object = nil,
|
|
1631
|
+
def return_student_submission(course_id, course_work_id, id, return_student_submission_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
1283
1632
|
command = make_simple_command(:post, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:return', options)
|
|
1284
1633
|
command.request_representation = Google::Apis::ClassroomV1::ReturnStudentSubmissionRequest::Representation
|
|
1285
1634
|
command.request_object = return_student_submission_request_object
|
|
@@ -1288,34 +1637,46 @@ module Google
|
|
|
1288
1637
|
command.params['courseId'] = course_id unless course_id.nil?
|
|
1289
1638
|
command.params['courseWorkId'] = course_work_id unless course_work_id.nil?
|
|
1290
1639
|
command.params['id'] = id unless id.nil?
|
|
1291
|
-
command.query['fields'] = fields unless fields.nil?
|
|
1292
1640
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1641
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1293
1642
|
execute_or_queue_command(command, &block)
|
|
1294
1643
|
end
|
|
1295
1644
|
|
|
1296
|
-
#
|
|
1297
|
-
#
|
|
1298
|
-
#
|
|
1645
|
+
# Updates one or more fields of a student submission.
|
|
1646
|
+
# See google.classroom.v1.StudentSubmission for details
|
|
1647
|
+
# of which fields may be updated and who may change them.
|
|
1648
|
+
# This request must be made by the Developer Console project of the
|
|
1299
1649
|
# [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
|
|
1300
|
-
# create the corresponding course work item.
|
|
1301
|
-
#
|
|
1302
|
-
#
|
|
1303
|
-
#
|
|
1304
|
-
#
|
|
1305
|
-
#
|
|
1650
|
+
# create the corresponding course work item.
|
|
1651
|
+
# This method returns the following error codes:
|
|
1652
|
+
# * `PERMISSION_DENIED` if the requesting developer project did not create
|
|
1653
|
+
# the corresponding course work, if the user is not permitted to make the
|
|
1654
|
+
# requested modification to the student submission, or for
|
|
1655
|
+
# access errors.
|
|
1656
|
+
# * `INVALID_ARGUMENT` if the request is malformed.
|
|
1657
|
+
# * `NOT_FOUND` if the requested course, course work, or student submission
|
|
1658
|
+
# does not exist.
|
|
1306
1659
|
# @param [String] course_id
|
|
1307
|
-
# Identifier of the course.
|
|
1308
|
-
# identifier or an
|
|
1660
|
+
# Identifier of the course.
|
|
1661
|
+
# This identifier can be either the Classroom-assigned identifier or an
|
|
1662
|
+
# alias.
|
|
1309
1663
|
# @param [String] course_work_id
|
|
1310
1664
|
# Identifier of the course work.
|
|
1311
1665
|
# @param [String] id
|
|
1312
1666
|
# Identifier of the student submission.
|
|
1313
|
-
# @param [Google::Apis::ClassroomV1::
|
|
1314
|
-
# @param [String]
|
|
1315
|
-
#
|
|
1667
|
+
# @param [Google::Apis::ClassroomV1::StudentSubmission] student_submission_object
|
|
1668
|
+
# @param [String] update_mask
|
|
1669
|
+
# Mask that identifies which fields on the student submission to update.
|
|
1670
|
+
# This field is required to do an update. The update fails if invalid
|
|
1671
|
+
# fields are specified.
|
|
1672
|
+
# The following fields may be specified by teachers:
|
|
1673
|
+
# * `draft_grade`
|
|
1674
|
+
# * `assigned_grade`
|
|
1316
1675
|
# @param [String] quota_user
|
|
1317
1676
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
1318
1677
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1678
|
+
# @param [String] fields
|
|
1679
|
+
# Selector specifying which fields to include in a partial response.
|
|
1319
1680
|
# @param [Google::Apis::RequestOptions] options
|
|
1320
1681
|
# Request-specific options
|
|
1321
1682
|
#
|
|
@@ -1328,32 +1689,37 @@ module Google
|
|
|
1328
1689
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1329
1690
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1330
1691
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1331
|
-
def
|
|
1332
|
-
command = make_simple_command(:
|
|
1333
|
-
command.request_representation = Google::Apis::ClassroomV1::
|
|
1334
|
-
command.request_object =
|
|
1692
|
+
def patch_student_submission(course_id, course_work_id, id, student_submission_object = nil, update_mask: nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
1693
|
+
command = make_simple_command(:patch, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}', options)
|
|
1694
|
+
command.request_representation = Google::Apis::ClassroomV1::StudentSubmission::Representation
|
|
1695
|
+
command.request_object = student_submission_object
|
|
1335
1696
|
command.response_representation = Google::Apis::ClassroomV1::StudentSubmission::Representation
|
|
1336
1697
|
command.response_class = Google::Apis::ClassroomV1::StudentSubmission
|
|
1337
1698
|
command.params['courseId'] = course_id unless course_id.nil?
|
|
1338
1699
|
command.params['courseWorkId'] = course_work_id unless course_work_id.nil?
|
|
1339
1700
|
command.params['id'] = id unless id.nil?
|
|
1340
|
-
command.query['
|
|
1701
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
|
1341
1702
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1703
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1342
1704
|
execute_or_queue_command(command, &block)
|
|
1343
1705
|
end
|
|
1344
1706
|
|
|
1345
|
-
# Returns a user profile.
|
|
1346
|
-
#
|
|
1347
|
-
#
|
|
1707
|
+
# Returns a user profile.
|
|
1708
|
+
# This method returns the following error codes:
|
|
1709
|
+
# * `PERMISSION_DENIED` if the requesting user is not permitted to access
|
|
1710
|
+
# this user profile, if no profile exists with the requested ID, or for
|
|
1711
|
+
# access errors.
|
|
1348
1712
|
# @param [String] user_id
|
|
1349
1713
|
# Identifier of the profile to return. The identifier can be one of the
|
|
1350
|
-
# following:
|
|
1351
|
-
#
|
|
1352
|
-
#
|
|
1353
|
-
#
|
|
1714
|
+
# following:
|
|
1715
|
+
# * the numeric identifier for the user
|
|
1716
|
+
# * the email address of the user
|
|
1717
|
+
# * the string literal `"me"`, indicating the requesting user
|
|
1354
1718
|
# @param [String] quota_user
|
|
1355
1719
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
1356
1720
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1721
|
+
# @param [String] fields
|
|
1722
|
+
# Selector specifying which fields to include in a partial response.
|
|
1357
1723
|
# @param [Google::Apis::RequestOptions] options
|
|
1358
1724
|
# Request-specific options
|
|
1359
1725
|
#
|
|
@@ -1366,268 +1732,109 @@ module Google
|
|
|
1366
1732
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1367
1733
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1368
1734
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1369
|
-
def get_user_profile(user_id,
|
|
1735
|
+
def get_user_profile(user_id, quota_user: nil, fields: nil, options: nil, &block)
|
|
1370
1736
|
command = make_simple_command(:get, 'v1/userProfiles/{userId}', options)
|
|
1371
1737
|
command.response_representation = Google::Apis::ClassroomV1::UserProfile::Representation
|
|
1372
1738
|
command.response_class = Google::Apis::ClassroomV1::UserProfile
|
|
1373
1739
|
command.params['userId'] = user_id unless user_id.nil?
|
|
1374
|
-
command.query['fields'] = fields unless fields.nil?
|
|
1375
1740
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1741
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1376
1742
|
execute_or_queue_command(command, &block)
|
|
1377
1743
|
end
|
|
1378
1744
|
|
|
1379
|
-
# Returns a
|
|
1380
|
-
#
|
|
1381
|
-
#
|
|
1382
|
-
#
|
|
1383
|
-
#
|
|
1384
|
-
#
|
|
1385
|
-
# or for other access errors.
|
|
1386
|
-
# specified, but its format cannot
|
|
1387
|
-
#
|
|
1388
|
-
#
|
|
1389
|
-
# `
|
|
1390
|
-
# no record
|
|
1745
|
+
# Returns a specific guardian.
|
|
1746
|
+
# This method returns the following error codes:
|
|
1747
|
+
# * `PERMISSION_DENIED` if no user that matches the provided `student_id`
|
|
1748
|
+
# is visible to the requesting user, if the requesting user is not
|
|
1749
|
+
# permitted to view guardian information for the student identified by the
|
|
1750
|
+
# `student_id`, if guardians are not enabled for the domain in question,
|
|
1751
|
+
# or for other access errors.
|
|
1752
|
+
# * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot
|
|
1753
|
+
# be recognized (it is not an email address, nor a `student_id` from the
|
|
1754
|
+
# API, nor the literal string `me`).
|
|
1755
|
+
# * `NOT_FOUND` if the requesting user is permitted to view guardians for
|
|
1756
|
+
# the requested `student_id`, but no `Guardian` record exists for that
|
|
1757
|
+
# student that matches the provided `guardian_id`.
|
|
1391
1758
|
# @param [String] student_id
|
|
1392
|
-
# The
|
|
1393
|
-
#
|
|
1394
|
-
# the email address of the user
|
|
1395
|
-
#
|
|
1396
|
-
#
|
|
1397
|
-
#
|
|
1398
|
-
# @param [String] invited_email_address
|
|
1399
|
-
# If specified, only results with the specified `invited_email_address` will be
|
|
1400
|
-
# returned.
|
|
1401
|
-
# @param [Array<String>, String] states
|
|
1402
|
-
# If specified, only results with the specified `state` values will be returned.
|
|
1403
|
-
# Otherwise, results with a `state` of `PENDING` will be returned.
|
|
1404
|
-
# @param [String] page_token
|
|
1405
|
-
# nextPageToken value returned from a previous list call, indicating that the
|
|
1406
|
-
# subsequent page of results should be returned. The list request must be
|
|
1407
|
-
# otherwise identical to the one that resulted in this token.
|
|
1408
|
-
# @param [Fixnum] page_size
|
|
1409
|
-
# Maximum number of items to return. Zero or unspecified indicates that the
|
|
1410
|
-
# server may assign a maximum. The server may return fewer than the specified
|
|
1411
|
-
# number of results.
|
|
1412
|
-
# @param [String] fields
|
|
1413
|
-
# Selector specifying which fields to include in a partial response.
|
|
1414
|
-
# @param [String] quota_user
|
|
1415
|
-
# Available to use for quota purposes for server-side applications. Can be any
|
|
1416
|
-
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1417
|
-
# @param [Google::Apis::RequestOptions] options
|
|
1418
|
-
# Request-specific options
|
|
1419
|
-
#
|
|
1420
|
-
# @yield [result, err] Result & error if block supplied
|
|
1421
|
-
# @yieldparam result [Google::Apis::ClassroomV1::ListGuardianInvitationsResponse] parsed result object
|
|
1422
|
-
# @yieldparam err [StandardError] error object if request failed
|
|
1423
|
-
#
|
|
1424
|
-
# @return [Google::Apis::ClassroomV1::ListGuardianInvitationsResponse]
|
|
1425
|
-
#
|
|
1426
|
-
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1427
|
-
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1428
|
-
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1429
|
-
def list_user_profile_guardian_invitations(student_id, invited_email_address: nil, states: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
1430
|
-
command = make_simple_command(:get, 'v1/userProfiles/{studentId}/guardianInvitations', options)
|
|
1431
|
-
command.response_representation = Google::Apis::ClassroomV1::ListGuardianInvitationsResponse::Representation
|
|
1432
|
-
command.response_class = Google::Apis::ClassroomV1::ListGuardianInvitationsResponse
|
|
1433
|
-
command.params['studentId'] = student_id unless student_id.nil?
|
|
1434
|
-
command.query['invitedEmailAddress'] = invited_email_address unless invited_email_address.nil?
|
|
1435
|
-
command.query['states'] = states unless states.nil?
|
|
1436
|
-
command.query['pageToken'] = page_token unless page_token.nil?
|
|
1437
|
-
command.query['pageSize'] = page_size unless page_size.nil?
|
|
1438
|
-
command.query['fields'] = fields unless fields.nil?
|
|
1439
|
-
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1440
|
-
execute_or_queue_command(command, &block)
|
|
1441
|
-
end
|
|
1442
|
-
|
|
1443
|
-
# Returns a specific guardian invitation. This method returns the following
|
|
1444
|
-
# error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to
|
|
1445
|
-
# view guardian invitations for the student identified by the `student_id`, if
|
|
1446
|
-
# guardians are not enabled for the domain in question, or for other access
|
|
1447
|
-
# errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its format
|
|
1448
|
-
# cannot be recognized (it is not an email address, nor a `student_id` from the
|
|
1449
|
-
# API, nor the literal string `me`). * `NOT_FOUND` if Classroom cannot find any
|
|
1450
|
-
# record of the given student or `invitation_id`. May also be returned if the
|
|
1451
|
-
# student exists, but the requesting user does not have access to see that
|
|
1452
|
-
# student.
|
|
1453
|
-
# @param [String] student_id
|
|
1454
|
-
# The ID of the student whose guardian invitation is being requested.
|
|
1455
|
-
# @param [String] invitation_id
|
|
1456
|
-
# The `id` field of the `GuardianInvitation` being requested.
|
|
1457
|
-
# @param [String] fields
|
|
1458
|
-
# Selector specifying which fields to include in a partial response.
|
|
1759
|
+
# The student whose guardian is being requested. One of the following:
|
|
1760
|
+
# * the numeric identifier for the user
|
|
1761
|
+
# * the email address of the user
|
|
1762
|
+
# * the string literal `"me"`, indicating the requesting user
|
|
1763
|
+
# @param [String] guardian_id
|
|
1764
|
+
# The `id` field from a `Guardian`.
|
|
1459
1765
|
# @param [String] quota_user
|
|
1460
1766
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
1461
1767
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1462
|
-
# @param [Google::Apis::RequestOptions] options
|
|
1463
|
-
# Request-specific options
|
|
1464
|
-
#
|
|
1465
|
-
# @yield [result, err] Result & error if block supplied
|
|
1466
|
-
# @yieldparam result [Google::Apis::ClassroomV1::GuardianInvitation] parsed result object
|
|
1467
|
-
# @yieldparam err [StandardError] error object if request failed
|
|
1468
|
-
#
|
|
1469
|
-
# @return [Google::Apis::ClassroomV1::GuardianInvitation]
|
|
1470
|
-
#
|
|
1471
|
-
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1472
|
-
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1473
|
-
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1474
|
-
def get_user_profile_guardian_invitation(student_id, invitation_id, fields: nil, quota_user: nil, options: nil, &block)
|
|
1475
|
-
command = make_simple_command(:get, 'v1/userProfiles/{studentId}/guardianInvitations/{invitationId}', options)
|
|
1476
|
-
command.response_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation
|
|
1477
|
-
command.response_class = Google::Apis::ClassroomV1::GuardianInvitation
|
|
1478
|
-
command.params['studentId'] = student_id unless student_id.nil?
|
|
1479
|
-
command.params['invitationId'] = invitation_id unless invitation_id.nil?
|
|
1480
|
-
command.query['fields'] = fields unless fields.nil?
|
|
1481
|
-
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1482
|
-
execute_or_queue_command(command, &block)
|
|
1483
|
-
end
|
|
1484
|
-
|
|
1485
|
-
# Creates a guardian invitation, and sends an email to the guardian asking them
|
|
1486
|
-
# to confirm that they are the student's guardian. Once the guardian accepts the
|
|
1487
|
-
# invitation, their `state` will change to `COMPLETED` and they will start
|
|
1488
|
-
# receiving guardian notifications. A `Guardian` resource will also be created
|
|
1489
|
-
# to represent the active guardian. The request object must have the `student_id`
|
|
1490
|
-
# and `invited_email_address` fields set. Failing to set these fields, or
|
|
1491
|
-
# setting any other fields in the request, will result in an error. This method
|
|
1492
|
-
# returns the following error codes: * `PERMISSION_DENIED` if the current user
|
|
1493
|
-
# does not have permission to manage guardians, if the guardian in question has
|
|
1494
|
-
# already rejected too many requests for that student, if guardians are not
|
|
1495
|
-
# enabled for the domain in question, or for other access errors. * `
|
|
1496
|
-
# RESOURCE_EXHAUSTED` if the student or guardian has exceeded the guardian link
|
|
1497
|
-
# limit. * `INVALID_ARGUMENT` if the guardian email address is not valid (for
|
|
1498
|
-
# example, if it is too long), or if the format of the student ID provided
|
|
1499
|
-
# cannot be recognized (it is not an email address, nor a `user_id` from this
|
|
1500
|
-
# API). This error will also be returned if read-only fields are set, or if the `
|
|
1501
|
-
# state` field is set to to a value other than `PENDING`. * `NOT_FOUND` if the
|
|
1502
|
-
# student ID provided is a valid student ID, but Classroom has no record of that
|
|
1503
|
-
# student. * `ALREADY_EXISTS` if there is already a pending guardian invitation
|
|
1504
|
-
# for the student and `invited_email_address` provided, or if the provided `
|
|
1505
|
-
# invited_email_address` matches the Google account of an existing `Guardian`
|
|
1506
|
-
# for this user.
|
|
1507
|
-
# @param [String] student_id
|
|
1508
|
-
# ID of the student (in standard format)
|
|
1509
|
-
# @param [Google::Apis::ClassroomV1::GuardianInvitation] guardian_invitation_object
|
|
1510
1768
|
# @param [String] fields
|
|
1511
1769
|
# Selector specifying which fields to include in a partial response.
|
|
1512
|
-
# @param [String] quota_user
|
|
1513
|
-
# Available to use for quota purposes for server-side applications. Can be any
|
|
1514
|
-
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1515
1770
|
# @param [Google::Apis::RequestOptions] options
|
|
1516
1771
|
# Request-specific options
|
|
1517
1772
|
#
|
|
1518
1773
|
# @yield [result, err] Result & error if block supplied
|
|
1519
|
-
# @yieldparam result [Google::Apis::ClassroomV1::
|
|
1774
|
+
# @yieldparam result [Google::Apis::ClassroomV1::Guardian] parsed result object
|
|
1520
1775
|
# @yieldparam err [StandardError] error object if request failed
|
|
1521
1776
|
#
|
|
1522
|
-
# @return [Google::Apis::ClassroomV1::
|
|
1777
|
+
# @return [Google::Apis::ClassroomV1::Guardian]
|
|
1523
1778
|
#
|
|
1524
1779
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1525
1780
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1526
1781
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1527
|
-
def
|
|
1528
|
-
command = make_simple_command(:
|
|
1529
|
-
command.
|
|
1530
|
-
command.
|
|
1531
|
-
command.response_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation
|
|
1532
|
-
command.response_class = Google::Apis::ClassroomV1::GuardianInvitation
|
|
1782
|
+
def get_user_profile_guardian(student_id, guardian_id, quota_user: nil, fields: nil, options: nil, &block)
|
|
1783
|
+
command = make_simple_command(:get, 'v1/userProfiles/{studentId}/guardians/{guardianId}', options)
|
|
1784
|
+
command.response_representation = Google::Apis::ClassroomV1::Guardian::Representation
|
|
1785
|
+
command.response_class = Google::Apis::ClassroomV1::Guardian
|
|
1533
1786
|
command.params['studentId'] = student_id unless student_id.nil?
|
|
1534
|
-
command.
|
|
1787
|
+
command.params['guardianId'] = guardian_id unless guardian_id.nil?
|
|
1535
1788
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1536
|
-
execute_or_queue_command(command, &block)
|
|
1537
|
-
end
|
|
1538
|
-
|
|
1539
|
-
# Modifies a guardian invitation. Currently, the only valid modification is to
|
|
1540
|
-
# change the `state` from `PENDING` to `COMPLETE`. This has the effect of
|
|
1541
|
-
# withdrawing the invitation. This method returns the following error codes: * `
|
|
1542
|
-
# PERMISSION_DENIED` if the current user does not have permission to manage
|
|
1543
|
-
# guardians, if guardians are not enabled for the domain in question or for
|
|
1544
|
-
# other access errors. * `FAILED_PRECONDITION` if the guardian link is not in
|
|
1545
|
-
# the `PENDING` state. * `INVALID_ARGUMENT` if the format of the student ID
|
|
1546
|
-
# provided cannot be recognized (it is not an email address, nor a `user_id`
|
|
1547
|
-
# from this API), or if the passed `GuardianInvitation` has a `state` other than
|
|
1548
|
-
# `COMPLETE`, or if it modifies fields other than `state`. * `NOT_FOUND` if the
|
|
1549
|
-
# student ID provided is a valid student ID, but Classroom has no record of that
|
|
1550
|
-
# student, or if the `id` field does not refer to a guardian invitation known to
|
|
1551
|
-
# Classroom.
|
|
1552
|
-
# @param [String] student_id
|
|
1553
|
-
# The ID of the student whose guardian invitation is to be modified.
|
|
1554
|
-
# @param [String] invitation_id
|
|
1555
|
-
# The `id` field of the `GuardianInvitation` to be modified.
|
|
1556
|
-
# @param [Google::Apis::ClassroomV1::GuardianInvitation] guardian_invitation_object
|
|
1557
|
-
# @param [String] update_mask
|
|
1558
|
-
# Mask that identifies which fields on the course to update. This field is
|
|
1559
|
-
# required to do an update. The update will fail if invalid fields are specified.
|
|
1560
|
-
# The following fields are valid: * `state` When set in a query parameter, this
|
|
1561
|
-
# field should be specified as `updateMask=,,...`
|
|
1562
|
-
# @param [String] fields
|
|
1563
|
-
# Selector specifying which fields to include in a partial response.
|
|
1564
|
-
# @param [String] quota_user
|
|
1565
|
-
# Available to use for quota purposes for server-side applications. Can be any
|
|
1566
|
-
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1567
|
-
# @param [Google::Apis::RequestOptions] options
|
|
1568
|
-
# Request-specific options
|
|
1569
|
-
#
|
|
1570
|
-
# @yield [result, err] Result & error if block supplied
|
|
1571
|
-
# @yieldparam result [Google::Apis::ClassroomV1::GuardianInvitation] parsed result object
|
|
1572
|
-
# @yieldparam err [StandardError] error object if request failed
|
|
1573
|
-
#
|
|
1574
|
-
# @return [Google::Apis::ClassroomV1::GuardianInvitation]
|
|
1575
|
-
#
|
|
1576
|
-
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1577
|
-
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1578
|
-
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1579
|
-
def patch_user_profile_guardian_invitation(student_id, invitation_id, guardian_invitation_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
1580
|
-
command = make_simple_command(:patch, 'v1/userProfiles/{studentId}/guardianInvitations/{invitationId}', options)
|
|
1581
|
-
command.request_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation
|
|
1582
|
-
command.request_object = guardian_invitation_object
|
|
1583
|
-
command.response_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation
|
|
1584
|
-
command.response_class = Google::Apis::ClassroomV1::GuardianInvitation
|
|
1585
|
-
command.params['studentId'] = student_id unless student_id.nil?
|
|
1586
|
-
command.params['invitationId'] = invitation_id unless invitation_id.nil?
|
|
1587
|
-
command.query['updateMask'] = update_mask unless update_mask.nil?
|
|
1588
1789
|
command.query['fields'] = fields unless fields.nil?
|
|
1589
|
-
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1590
1790
|
execute_or_queue_command(command, &block)
|
|
1591
1791
|
end
|
|
1592
1792
|
|
|
1593
|
-
# Returns a list of guardians that the requesting user is permitted to
|
|
1594
|
-
# restricted to those that match the request.
|
|
1595
|
-
# that the requesting user may view
|
|
1596
|
-
# for the
|
|
1597
|
-
#
|
|
1598
|
-
#
|
|
1599
|
-
#
|
|
1600
|
-
#
|
|
1601
|
-
#
|
|
1602
|
-
#
|
|
1603
|
-
#
|
|
1604
|
-
#
|
|
1605
|
-
#
|
|
1606
|
-
#
|
|
1607
|
-
#
|
|
1793
|
+
# Returns a list of guardians that the requesting user is permitted to
|
|
1794
|
+
# view, restricted to those that match the request.
|
|
1795
|
+
# To list guardians for any student that the requesting user may view
|
|
1796
|
+
# guardians for, use the literal character `-` for the student ID.
|
|
1797
|
+
# This method returns the following error codes:
|
|
1798
|
+
# * `PERMISSION_DENIED` if a `student_id` is specified, and the requesting
|
|
1799
|
+
# user is not permitted to view guardian information for that student, if
|
|
1800
|
+
# `"-"` is specified as the `student_id` and the user is not a domain
|
|
1801
|
+
# administrator, if guardians are not enabled for the domain in question,
|
|
1802
|
+
# if the `invited_email_address` filter is set by a user who is not a
|
|
1803
|
+
# domain administrator, or for other access errors.
|
|
1804
|
+
# * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot
|
|
1805
|
+
# be recognized (it is not an email address, nor a `student_id` from the
|
|
1806
|
+
# API, nor the literal string `me`). May also be returned if an invalid
|
|
1807
|
+
# `page_token` is provided.
|
|
1808
|
+
# * `NOT_FOUND` if a `student_id` is specified, and its format can be
|
|
1809
|
+
# recognized, but Classroom has no record of that student.
|
|
1608
1810
|
# @param [String] student_id
|
|
1609
|
-
# Filter results by the student who the guardian is linked to.
|
|
1610
|
-
# can be one of the following:
|
|
1611
|
-
#
|
|
1612
|
-
#
|
|
1613
|
-
#
|
|
1614
|
-
#
|
|
1615
|
-
#
|
|
1616
|
-
# resulting in this guardian link. This filter can only be used by domain
|
|
1617
|
-
# administrators.
|
|
1618
|
-
# @param [String] page_token
|
|
1619
|
-
# nextPageToken value returned from a previous list call, indicating that the
|
|
1620
|
-
# subsequent page of results should be returned. The list request must be
|
|
1621
|
-
# otherwise identical to the one that resulted in this token.
|
|
1811
|
+
# Filter results by the student who the guardian is linked to.
|
|
1812
|
+
# The identifier can be one of the following:
|
|
1813
|
+
# * the numeric identifier for the user
|
|
1814
|
+
# * the email address of the user
|
|
1815
|
+
# * the string literal `"me"`, indicating the requesting user
|
|
1816
|
+
# * the string literal `"-"`, indicating that results should be returned for
|
|
1817
|
+
# all students that the requesting user has access to view.
|
|
1622
1818
|
# @param [Fixnum] page_size
|
|
1623
1819
|
# Maximum number of items to return. Zero or unspecified indicates that the
|
|
1624
|
-
# server may assign a maximum.
|
|
1625
|
-
# number of results.
|
|
1626
|
-
# @param [String]
|
|
1627
|
-
#
|
|
1820
|
+
# server may assign a maximum.
|
|
1821
|
+
# The server may return fewer than the specified number of results.
|
|
1822
|
+
# @param [String] invited_email_address
|
|
1823
|
+
# Filter results by the email address that the original invitation was sent
|
|
1824
|
+
# to, resulting in this guardian link.
|
|
1825
|
+
# This filter can only be used by domain administrators.
|
|
1826
|
+
# @param [String] page_token
|
|
1827
|
+
# nextPageToken
|
|
1828
|
+
# value returned from a previous
|
|
1829
|
+
# list call,
|
|
1830
|
+
# indicating that the subsequent page of results should be returned.
|
|
1831
|
+
# The list request
|
|
1832
|
+
# must be otherwise identical to the one that resulted in this token.
|
|
1628
1833
|
# @param [String] quota_user
|
|
1629
1834
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
1630
1835
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1836
|
+
# @param [String] fields
|
|
1837
|
+
# Selector specifying which fields to include in a partial response.
|
|
1631
1838
|
# @param [Google::Apis::RequestOptions] options
|
|
1632
1839
|
# Request-specific options
|
|
1633
1840
|
#
|
|
@@ -1640,85 +1847,46 @@ module Google
|
|
|
1640
1847
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1641
1848
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1642
1849
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1643
|
-
def list_user_profile_guardians(student_id,
|
|
1850
|
+
def list_user_profile_guardians(student_id, page_size: nil, invited_email_address: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
1644
1851
|
command = make_simple_command(:get, 'v1/userProfiles/{studentId}/guardians', options)
|
|
1645
1852
|
command.response_representation = Google::Apis::ClassroomV1::ListGuardiansResponse::Representation
|
|
1646
1853
|
command.response_class = Google::Apis::ClassroomV1::ListGuardiansResponse
|
|
1647
1854
|
command.params['studentId'] = student_id unless student_id.nil?
|
|
1855
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
|
1648
1856
|
command.query['invitedEmailAddress'] = invited_email_address unless invited_email_address.nil?
|
|
1649
1857
|
command.query['pageToken'] = page_token unless page_token.nil?
|
|
1650
|
-
command.query['pageSize'] = page_size unless page_size.nil?
|
|
1651
|
-
command.query['fields'] = fields unless fields.nil?
|
|
1652
1858
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1859
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1653
1860
|
execute_or_queue_command(command, &block)
|
|
1654
1861
|
end
|
|
1655
1862
|
|
|
1656
|
-
#
|
|
1657
|
-
#
|
|
1658
|
-
#
|
|
1659
|
-
#
|
|
1660
|
-
#
|
|
1661
|
-
#
|
|
1662
|
-
#
|
|
1663
|
-
#
|
|
1664
|
-
#
|
|
1665
|
-
#
|
|
1863
|
+
# Deletes a guardian.
|
|
1864
|
+
# The guardian will no longer receive guardian notifications and the guardian
|
|
1865
|
+
# will no longer be accessible via the API.
|
|
1866
|
+
# This method returns the following error codes:
|
|
1867
|
+
# * `PERMISSION_DENIED` if no user that matches the provided `student_id`
|
|
1868
|
+
# is visible to the requesting user, if the requesting user is not
|
|
1869
|
+
# permitted to manage guardians for the student identified by the
|
|
1870
|
+
# `student_id`, if guardians are not enabled for the domain in question,
|
|
1871
|
+
# or for other access errors.
|
|
1872
|
+
# * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot
|
|
1873
|
+
# be recognized (it is not an email address, nor a `student_id` from the
|
|
1874
|
+
# API).
|
|
1875
|
+
# * `NOT_FOUND` if the requesting user is permitted to modify guardians for
|
|
1876
|
+
# the requested `student_id`, but no `Guardian` record exists for that
|
|
1877
|
+
# student with the provided `guardian_id`.
|
|
1666
1878
|
# @param [String] student_id
|
|
1667
|
-
# The student whose guardian is
|
|
1668
|
-
#
|
|
1669
|
-
#
|
|
1879
|
+
# The student whose guardian is to be deleted. One of the following:
|
|
1880
|
+
# * the numeric identifier for the user
|
|
1881
|
+
# * the email address of the user
|
|
1882
|
+
# * the string literal `"me"`, indicating the requesting user
|
|
1670
1883
|
# @param [String] guardian_id
|
|
1671
1884
|
# The `id` field from a `Guardian`.
|
|
1672
|
-
# @param [String] fields
|
|
1673
|
-
# Selector specifying which fields to include in a partial response.
|
|
1674
1885
|
# @param [String] quota_user
|
|
1675
1886
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
1676
1887
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1677
|
-
# @param [Google::Apis::RequestOptions] options
|
|
1678
|
-
# Request-specific options
|
|
1679
|
-
#
|
|
1680
|
-
# @yield [result, err] Result & error if block supplied
|
|
1681
|
-
# @yieldparam result [Google::Apis::ClassroomV1::Guardian] parsed result object
|
|
1682
|
-
# @yieldparam err [StandardError] error object if request failed
|
|
1683
|
-
#
|
|
1684
|
-
# @return [Google::Apis::ClassroomV1::Guardian]
|
|
1685
|
-
#
|
|
1686
|
-
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1687
|
-
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1688
|
-
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1689
|
-
def get_user_profile_guardian(student_id, guardian_id, fields: nil, quota_user: nil, options: nil, &block)
|
|
1690
|
-
command = make_simple_command(:get, 'v1/userProfiles/{studentId}/guardians/{guardianId}', options)
|
|
1691
|
-
command.response_representation = Google::Apis::ClassroomV1::Guardian::Representation
|
|
1692
|
-
command.response_class = Google::Apis::ClassroomV1::Guardian
|
|
1693
|
-
command.params['studentId'] = student_id unless student_id.nil?
|
|
1694
|
-
command.params['guardianId'] = guardian_id unless guardian_id.nil?
|
|
1695
|
-
command.query['fields'] = fields unless fields.nil?
|
|
1696
|
-
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1697
|
-
execute_or_queue_command(command, &block)
|
|
1698
|
-
end
|
|
1699
|
-
|
|
1700
|
-
# Deletes a guardian. The guardian will no longer receive guardian notifications
|
|
1701
|
-
# and the guardian will no longer be accessible via the API. This method returns
|
|
1702
|
-
# the following error codes: * `PERMISSION_DENIED` if no user that matches the
|
|
1703
|
-
# provided `student_id` is visible to the requesting user, if the requesting
|
|
1704
|
-
# user is not permitted to manage guardians for the student identified by the `
|
|
1705
|
-
# student_id`, if guardians are not enabled for the domain in question, or for
|
|
1706
|
-
# other access errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but
|
|
1707
|
-
# its format cannot be recognized (it is not an email address, nor a `student_id`
|
|
1708
|
-
# from the API). * `NOT_FOUND` if the requesting user is permitted to modify
|
|
1709
|
-
# guardians for the requested `student_id`, but no `Guardian` record exists for
|
|
1710
|
-
# that student with the provided `guardian_id`.
|
|
1711
|
-
# @param [String] student_id
|
|
1712
|
-
# The student whose guardian is to be deleted. One of the following: * the
|
|
1713
|
-
# numeric identifier for the user * the email address of the user * the string
|
|
1714
|
-
# literal `"me"`, indicating the requesting user
|
|
1715
|
-
# @param [String] guardian_id
|
|
1716
|
-
# The `id` field from a `Guardian`.
|
|
1717
1888
|
# @param [String] fields
|
|
1718
1889
|
# Selector specifying which fields to include in a partial response.
|
|
1719
|
-
# @param [String] quota_user
|
|
1720
|
-
# Available to use for quota purposes for server-side applications. Can be any
|
|
1721
|
-
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1722
1890
|
# @param [Google::Apis::RequestOptions] options
|
|
1723
1891
|
# Request-specific options
|
|
1724
1892
|
#
|
|
@@ -1731,205 +1899,245 @@ module Google
|
|
|
1731
1899
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1732
1900
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1733
1901
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1734
|
-
def delete_user_profile_guardian(student_id, guardian_id,
|
|
1902
|
+
def delete_user_profile_guardian(student_id, guardian_id, quota_user: nil, fields: nil, options: nil, &block)
|
|
1735
1903
|
command = make_simple_command(:delete, 'v1/userProfiles/{studentId}/guardians/{guardianId}', options)
|
|
1736
1904
|
command.response_representation = Google::Apis::ClassroomV1::Empty::Representation
|
|
1737
1905
|
command.response_class = Google::Apis::ClassroomV1::Empty
|
|
1738
1906
|
command.params['studentId'] = student_id unless student_id.nil?
|
|
1739
1907
|
command.params['guardianId'] = guardian_id unless guardian_id.nil?
|
|
1740
|
-
command.query['fields'] = fields unless fields.nil?
|
|
1741
1908
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1909
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1742
1910
|
execute_or_queue_command(command, &block)
|
|
1743
1911
|
end
|
|
1744
1912
|
|
|
1745
|
-
#
|
|
1746
|
-
#
|
|
1747
|
-
#
|
|
1748
|
-
#
|
|
1749
|
-
#
|
|
1750
|
-
#
|
|
1751
|
-
#
|
|
1752
|
-
#
|
|
1753
|
-
#
|
|
1754
|
-
#
|
|
1755
|
-
#
|
|
1756
|
-
#
|
|
1913
|
+
# Returns a specific guardian invitation.
|
|
1914
|
+
# This method returns the following error codes:
|
|
1915
|
+
# * `PERMISSION_DENIED` if the requesting user is not permitted to view
|
|
1916
|
+
# guardian invitations for the student identified by the `student_id`, if
|
|
1917
|
+
# guardians are not enabled for the domain in question, or for other
|
|
1918
|
+
# access errors.
|
|
1919
|
+
# * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot
|
|
1920
|
+
# be recognized (it is not an email address, nor a `student_id` from the
|
|
1921
|
+
# API, nor the literal string `me`).
|
|
1922
|
+
# * `NOT_FOUND` if Classroom cannot find any record of the given student or
|
|
1923
|
+
# `invitation_id`. May also be returned if the student exists, but the
|
|
1924
|
+
# requesting user does not have access to see that student.
|
|
1925
|
+
# @param [String] student_id
|
|
1926
|
+
# The ID of the student whose guardian invitation is being requested.
|
|
1927
|
+
# @param [String] invitation_id
|
|
1928
|
+
# The `id` field of the `GuardianInvitation` being requested.
|
|
1757
1929
|
# @param [String] quota_user
|
|
1758
1930
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
1759
1931
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1760
|
-
# @param [Google::Apis::RequestOptions] options
|
|
1761
|
-
# Request-specific options
|
|
1762
|
-
#
|
|
1763
|
-
# @yield [result, err] Result & error if block supplied
|
|
1764
|
-
# @yieldparam result [Google::Apis::ClassroomV1::Invitation] parsed result object
|
|
1765
|
-
# @yieldparam err [StandardError] error object if request failed
|
|
1766
|
-
#
|
|
1767
|
-
# @return [Google::Apis::ClassroomV1::Invitation]
|
|
1768
|
-
#
|
|
1769
|
-
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1770
|
-
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1771
|
-
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1772
|
-
def create_invitation(invitation_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
1773
|
-
command = make_simple_command(:post, 'v1/invitations', options)
|
|
1774
|
-
command.request_representation = Google::Apis::ClassroomV1::Invitation::Representation
|
|
1775
|
-
command.request_object = invitation_object
|
|
1776
|
-
command.response_representation = Google::Apis::ClassroomV1::Invitation::Representation
|
|
1777
|
-
command.response_class = Google::Apis::ClassroomV1::Invitation
|
|
1778
|
-
command.query['fields'] = fields unless fields.nil?
|
|
1779
|
-
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1780
|
-
execute_or_queue_command(command, &block)
|
|
1781
|
-
end
|
|
1782
|
-
|
|
1783
|
-
# Returns an invitation. This method returns the following error codes: * `
|
|
1784
|
-
# PERMISSION_DENIED` if the requesting user is not permitted to view the
|
|
1785
|
-
# requested invitation or for access errors. * `NOT_FOUND` if no invitation
|
|
1786
|
-
# exists with the requested ID.
|
|
1787
|
-
# @param [String] id
|
|
1788
|
-
# Identifier of the invitation to return.
|
|
1789
1932
|
# @param [String] fields
|
|
1790
1933
|
# Selector specifying which fields to include in a partial response.
|
|
1791
|
-
# @param [String] quota_user
|
|
1792
|
-
# Available to use for quota purposes for server-side applications. Can be any
|
|
1793
|
-
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1794
1934
|
# @param [Google::Apis::RequestOptions] options
|
|
1795
1935
|
# Request-specific options
|
|
1796
1936
|
#
|
|
1797
1937
|
# @yield [result, err] Result & error if block supplied
|
|
1798
|
-
# @yieldparam result [Google::Apis::ClassroomV1::
|
|
1938
|
+
# @yieldparam result [Google::Apis::ClassroomV1::GuardianInvitation] parsed result object
|
|
1799
1939
|
# @yieldparam err [StandardError] error object if request failed
|
|
1800
1940
|
#
|
|
1801
|
-
# @return [Google::Apis::ClassroomV1::
|
|
1941
|
+
# @return [Google::Apis::ClassroomV1::GuardianInvitation]
|
|
1802
1942
|
#
|
|
1803
1943
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1804
1944
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1805
1945
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1806
|
-
def
|
|
1807
|
-
command = make_simple_command(:get, 'v1/
|
|
1808
|
-
command.response_representation = Google::Apis::ClassroomV1::
|
|
1809
|
-
command.response_class = Google::Apis::ClassroomV1::
|
|
1810
|
-
command.params['
|
|
1811
|
-
command.
|
|
1946
|
+
def get_user_profile_guardian_invitation(student_id, invitation_id, quota_user: nil, fields: nil, options: nil, &block)
|
|
1947
|
+
command = make_simple_command(:get, 'v1/userProfiles/{studentId}/guardianInvitations/{invitationId}', options)
|
|
1948
|
+
command.response_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation
|
|
1949
|
+
command.response_class = Google::Apis::ClassroomV1::GuardianInvitation
|
|
1950
|
+
command.params['studentId'] = student_id unless student_id.nil?
|
|
1951
|
+
command.params['invitationId'] = invitation_id unless invitation_id.nil?
|
|
1812
1952
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1953
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1813
1954
|
execute_or_queue_command(command, &block)
|
|
1814
1955
|
end
|
|
1815
1956
|
|
|
1816
|
-
#
|
|
1817
|
-
#
|
|
1818
|
-
#
|
|
1819
|
-
#
|
|
1820
|
-
#
|
|
1821
|
-
#
|
|
1822
|
-
#
|
|
1823
|
-
#
|
|
1957
|
+
# Creates a guardian invitation, and sends an email to the guardian asking
|
|
1958
|
+
# them to confirm that they are the student's guardian.
|
|
1959
|
+
# Once the guardian accepts the invitation, their `state` will change to
|
|
1960
|
+
# `COMPLETED` and they will start receiving guardian notifications. A
|
|
1961
|
+
# `Guardian` resource will also be created to represent the active guardian.
|
|
1962
|
+
# The request object must have the `student_id` and
|
|
1963
|
+
# `invited_email_address` fields set. Failing to set these fields, or
|
|
1964
|
+
# setting any other fields in the request, will result in an error.
|
|
1965
|
+
# This method returns the following error codes:
|
|
1966
|
+
# * `PERMISSION_DENIED` if the current user does not have permission to
|
|
1967
|
+
# manage guardians, if the guardian in question has already rejected
|
|
1968
|
+
# too many requests for that student, if guardians are not enabled for the
|
|
1969
|
+
# domain in question, or for other access errors.
|
|
1970
|
+
# * `RESOURCE_EXHAUSTED` if the student or guardian has exceeded the guardian
|
|
1971
|
+
# link limit.
|
|
1972
|
+
# * `INVALID_ARGUMENT` if the guardian email address is not valid (for
|
|
1973
|
+
# example, if it is too long), or if the format of the student ID provided
|
|
1974
|
+
# cannot be recognized (it is not an email address, nor a `user_id` from
|
|
1975
|
+
# this API). This error will also be returned if read-only fields are set,
|
|
1976
|
+
# or if the `state` field is set to to a value other than `PENDING`.
|
|
1977
|
+
# * `NOT_FOUND` if the student ID provided is a valid student ID, but
|
|
1978
|
+
# Classroom has no record of that student.
|
|
1979
|
+
# * `ALREADY_EXISTS` if there is already a pending guardian invitation for
|
|
1980
|
+
# the student and `invited_email_address` provided, or if the provided
|
|
1981
|
+
# `invited_email_address` matches the Google account of an existing
|
|
1982
|
+
# `Guardian` for this user.
|
|
1983
|
+
# @param [String] student_id
|
|
1984
|
+
# ID of the student (in standard format)
|
|
1985
|
+
# @param [Google::Apis::ClassroomV1::GuardianInvitation] guardian_invitation_object
|
|
1824
1986
|
# @param [String] quota_user
|
|
1825
1987
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
1826
1988
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1989
|
+
# @param [String] fields
|
|
1990
|
+
# Selector specifying which fields to include in a partial response.
|
|
1827
1991
|
# @param [Google::Apis::RequestOptions] options
|
|
1828
1992
|
# Request-specific options
|
|
1829
1993
|
#
|
|
1830
1994
|
# @yield [result, err] Result & error if block supplied
|
|
1831
|
-
# @yieldparam result [Google::Apis::ClassroomV1::
|
|
1995
|
+
# @yieldparam result [Google::Apis::ClassroomV1::GuardianInvitation] parsed result object
|
|
1832
1996
|
# @yieldparam err [StandardError] error object if request failed
|
|
1833
1997
|
#
|
|
1834
|
-
# @return [Google::Apis::ClassroomV1::
|
|
1998
|
+
# @return [Google::Apis::ClassroomV1::GuardianInvitation]
|
|
1835
1999
|
#
|
|
1836
2000
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1837
2001
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1838
2002
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1839
|
-
def
|
|
1840
|
-
command = make_simple_command(:
|
|
1841
|
-
command.
|
|
1842
|
-
command.
|
|
1843
|
-
command.
|
|
1844
|
-
command.
|
|
2003
|
+
def create_user_profile_guardian_invitation(student_id, guardian_invitation_object = nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
2004
|
+
command = make_simple_command(:post, 'v1/userProfiles/{studentId}/guardianInvitations', options)
|
|
2005
|
+
command.request_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation
|
|
2006
|
+
command.request_object = guardian_invitation_object
|
|
2007
|
+
command.response_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation
|
|
2008
|
+
command.response_class = Google::Apis::ClassroomV1::GuardianInvitation
|
|
2009
|
+
command.params['studentId'] = student_id unless student_id.nil?
|
|
1845
2010
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
2011
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1846
2012
|
execute_or_queue_command(command, &block)
|
|
1847
2013
|
end
|
|
1848
2014
|
|
|
1849
|
-
# Returns a list of invitations that the requesting user is
|
|
1850
|
-
#
|
|
1851
|
-
#
|
|
1852
|
-
#
|
|
1853
|
-
#
|
|
1854
|
-
#
|
|
1855
|
-
#
|
|
1856
|
-
#
|
|
1857
|
-
#
|
|
1858
|
-
#
|
|
1859
|
-
#
|
|
1860
|
-
#
|
|
1861
|
-
#
|
|
2015
|
+
# Returns a list of guardian invitations that the requesting user is
|
|
2016
|
+
# permitted to view, filtered by the parameters provided.
|
|
2017
|
+
# This method returns the following error codes:
|
|
2018
|
+
# * `PERMISSION_DENIED` if a `student_id` is specified, and the requesting
|
|
2019
|
+
# user is not permitted to view guardian invitations for that student, if
|
|
2020
|
+
# `"-"` is specified as the `student_id` and the user is not a domain
|
|
2021
|
+
# administrator, if guardians are not enabled for the domain in question,
|
|
2022
|
+
# or for other access errors.
|
|
2023
|
+
# * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot
|
|
2024
|
+
# be recognized (it is not an email address, nor a `student_id` from the
|
|
2025
|
+
# API, nor the literal string `me`). May also be returned if an invalid
|
|
2026
|
+
# `page_token` or `state` is provided.
|
|
2027
|
+
# * `NOT_FOUND` if a `student_id` is specified, and its format can be
|
|
2028
|
+
# recognized, but Classroom has no record of that student.
|
|
2029
|
+
# @param [String] student_id
|
|
2030
|
+
# The ID of the student whose guardian invitations are to be returned.
|
|
2031
|
+
# The identifier can be one of the following:
|
|
2032
|
+
# * the numeric identifier for the user
|
|
2033
|
+
# * the email address of the user
|
|
2034
|
+
# * the string literal `"me"`, indicating the requesting user
|
|
2035
|
+
# * the string literal `"-"`, indicating that results should be returned for
|
|
2036
|
+
# all students that the requesting user is permitted to view guardian
|
|
2037
|
+
# invitations.
|
|
1862
2038
|
# @param [Fixnum] page_size
|
|
1863
|
-
# Maximum number of items to return. Zero
|
|
1864
|
-
#
|
|
2039
|
+
# Maximum number of items to return. Zero or unspecified indicates that the
|
|
2040
|
+
# server may assign a maximum.
|
|
2041
|
+
# The server may return fewer than the specified number of results.
|
|
2042
|
+
# @param [String] invited_email_address
|
|
2043
|
+
# If specified, only results with the specified `invited_email_address`
|
|
2044
|
+
# will be returned.
|
|
2045
|
+
# @param [Array<String>, String] states
|
|
2046
|
+
# If specified, only results with the specified `state` values will be
|
|
2047
|
+
# returned. Otherwise, results with a `state` of `PENDING` will be returned.
|
|
1865
2048
|
# @param [String] page_token
|
|
1866
|
-
# nextPageToken
|
|
1867
|
-
#
|
|
1868
|
-
#
|
|
1869
|
-
#
|
|
1870
|
-
#
|
|
2049
|
+
# nextPageToken
|
|
2050
|
+
# value returned from a previous
|
|
2051
|
+
# list call,
|
|
2052
|
+
# indicating that the subsequent page of results should be returned.
|
|
2053
|
+
# The list request
|
|
2054
|
+
# must be otherwise identical to the one that resulted in this token.
|
|
1871
2055
|
# @param [String] quota_user
|
|
1872
2056
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
1873
2057
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
2058
|
+
# @param [String] fields
|
|
2059
|
+
# Selector specifying which fields to include in a partial response.
|
|
1874
2060
|
# @param [Google::Apis::RequestOptions] options
|
|
1875
2061
|
# Request-specific options
|
|
1876
2062
|
#
|
|
1877
2063
|
# @yield [result, err] Result & error if block supplied
|
|
1878
|
-
# @yieldparam result [Google::Apis::ClassroomV1::
|
|
2064
|
+
# @yieldparam result [Google::Apis::ClassroomV1::ListGuardianInvitationsResponse] parsed result object
|
|
1879
2065
|
# @yieldparam err [StandardError] error object if request failed
|
|
1880
2066
|
#
|
|
1881
|
-
# @return [Google::Apis::ClassroomV1::
|
|
2067
|
+
# @return [Google::Apis::ClassroomV1::ListGuardianInvitationsResponse]
|
|
1882
2068
|
#
|
|
1883
2069
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1884
2070
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1885
2071
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1886
|
-
def
|
|
1887
|
-
command = make_simple_command(:get, 'v1/
|
|
1888
|
-
command.response_representation = Google::Apis::ClassroomV1::
|
|
1889
|
-
command.response_class = Google::Apis::ClassroomV1::
|
|
1890
|
-
command.
|
|
1891
|
-
command.query['courseId'] = course_id unless course_id.nil?
|
|
2072
|
+
def list_user_profile_guardian_invitations(student_id, page_size: nil, invited_email_address: nil, states: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
2073
|
+
command = make_simple_command(:get, 'v1/userProfiles/{studentId}/guardianInvitations', options)
|
|
2074
|
+
command.response_representation = Google::Apis::ClassroomV1::ListGuardianInvitationsResponse::Representation
|
|
2075
|
+
command.response_class = Google::Apis::ClassroomV1::ListGuardianInvitationsResponse
|
|
2076
|
+
command.params['studentId'] = student_id unless student_id.nil?
|
|
1892
2077
|
command.query['pageSize'] = page_size unless page_size.nil?
|
|
2078
|
+
command.query['invitedEmailAddress'] = invited_email_address unless invited_email_address.nil?
|
|
2079
|
+
command.query['states'] = states unless states.nil?
|
|
1893
2080
|
command.query['pageToken'] = page_token unless page_token.nil?
|
|
1894
|
-
command.query['fields'] = fields unless fields.nil?
|
|
1895
2081
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
2082
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1896
2083
|
execute_or_queue_command(command, &block)
|
|
1897
2084
|
end
|
|
1898
2085
|
|
|
1899
|
-
#
|
|
1900
|
-
#
|
|
1901
|
-
#
|
|
1902
|
-
#
|
|
1903
|
-
#
|
|
1904
|
-
#
|
|
1905
|
-
#
|
|
1906
|
-
#
|
|
1907
|
-
#
|
|
1908
|
-
#
|
|
1909
|
-
#
|
|
1910
|
-
#
|
|
2086
|
+
# Modifies a guardian invitation.
|
|
2087
|
+
# Currently, the only valid modification is to change the `state` from
|
|
2088
|
+
# `PENDING` to `COMPLETE`. This has the effect of withdrawing the invitation.
|
|
2089
|
+
# This method returns the following error codes:
|
|
2090
|
+
# * `PERMISSION_DENIED` if the current user does not have permission to
|
|
2091
|
+
# manage guardians, if guardians are not enabled for the domain in question
|
|
2092
|
+
# or for other access errors.
|
|
2093
|
+
# * `FAILED_PRECONDITION` if the guardian link is not in the `PENDING` state.
|
|
2094
|
+
# * `INVALID_ARGUMENT` if the format of the student ID provided
|
|
2095
|
+
# cannot be recognized (it is not an email address, nor a `user_id` from
|
|
2096
|
+
# this API), or if the passed `GuardianInvitation` has a `state` other than
|
|
2097
|
+
# `COMPLETE`, or if it modifies fields other than `state`.
|
|
2098
|
+
# * `NOT_FOUND` if the student ID provided is a valid student ID, but
|
|
2099
|
+
# Classroom has no record of that student, or if the `id` field does not
|
|
2100
|
+
# refer to a guardian invitation known to Classroom.
|
|
2101
|
+
# @param [String] student_id
|
|
2102
|
+
# The ID of the student whose guardian invitation is to be modified.
|
|
2103
|
+
# @param [String] invitation_id
|
|
2104
|
+
# The `id` field of the `GuardianInvitation` to be modified.
|
|
2105
|
+
# @param [Google::Apis::ClassroomV1::GuardianInvitation] guardian_invitation_object
|
|
2106
|
+
# @param [String] update_mask
|
|
2107
|
+
# Mask that identifies which fields on the course to update.
|
|
2108
|
+
# This field is required to do an update. The update will fail if invalid
|
|
2109
|
+
# fields are specified. The following fields are valid:
|
|
2110
|
+
# * `state`
|
|
2111
|
+
# When set in a query parameter, this field should be specified as
|
|
2112
|
+
# `updateMask=<field1>,<field2>,...`
|
|
1911
2113
|
# @param [String] quota_user
|
|
1912
2114
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
1913
2115
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
2116
|
+
# @param [String] fields
|
|
2117
|
+
# Selector specifying which fields to include in a partial response.
|
|
1914
2118
|
# @param [Google::Apis::RequestOptions] options
|
|
1915
2119
|
# Request-specific options
|
|
1916
2120
|
#
|
|
1917
2121
|
# @yield [result, err] Result & error if block supplied
|
|
1918
|
-
# @yieldparam result [Google::Apis::ClassroomV1::
|
|
2122
|
+
# @yieldparam result [Google::Apis::ClassroomV1::GuardianInvitation] parsed result object
|
|
1919
2123
|
# @yieldparam err [StandardError] error object if request failed
|
|
1920
2124
|
#
|
|
1921
|
-
# @return [Google::Apis::ClassroomV1::
|
|
2125
|
+
# @return [Google::Apis::ClassroomV1::GuardianInvitation]
|
|
1922
2126
|
#
|
|
1923
2127
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1924
2128
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1925
2129
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1926
|
-
def
|
|
1927
|
-
command = make_simple_command(:
|
|
1928
|
-
command.
|
|
1929
|
-
command.
|
|
1930
|
-
command.
|
|
1931
|
-
command.
|
|
2130
|
+
def patch_user_profile_guardian_invitation(student_id, invitation_id, guardian_invitation_object = nil, update_mask: nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
2131
|
+
command = make_simple_command(:patch, 'v1/userProfiles/{studentId}/guardianInvitations/{invitationId}', options)
|
|
2132
|
+
command.request_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation
|
|
2133
|
+
command.request_object = guardian_invitation_object
|
|
2134
|
+
command.response_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation
|
|
2135
|
+
command.response_class = Google::Apis::ClassroomV1::GuardianInvitation
|
|
2136
|
+
command.params['studentId'] = student_id unless student_id.nil?
|
|
2137
|
+
command.params['invitationId'] = invitation_id unless invitation_id.nil?
|
|
2138
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
|
1932
2139
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
2140
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1933
2141
|
execute_or_queue_command(command, &block)
|
|
1934
2142
|
end
|
|
1935
2143
|
|