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