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