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