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