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