google-api-client 0.8.3 → 0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +20 -0
- data/.rspec +2 -0
- data/.rubocop.yml +7 -0
- data/.rubocop_todo.yml +63 -0
- data/.travis.yml +22 -0
- data/.yardopts +12 -0
- data/CHANGELOG.md +52 -2
- data/CONTRIBUTING.md +31 -0
- data/Gemfile +35 -1
- data/MIGRATING.md +171 -0
- data/README.md +181 -148
- data/Rakefile +1 -40
- data/api_names.yaml +1036 -0
- data/api_names_out.yaml +26053 -0
- data/bin/generate-api +95 -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_3.rb +35 -0
- data/generated/google/apis/adexchangeseller_v2_0/classes.rb +792 -0
- data/generated/google/apis/adexchangeseller_v2_0/representations.rb +309 -0
- data/generated/google/apis/adexchangeseller_v2_0/service.rb +668 -0
- data/generated/google/apis/adexchangeseller_v2_0.rb +38 -0
- data/generated/google/apis/admin_datatransfer_v1/classes.rb +267 -0
- data/generated/google/apis/admin_datatransfer_v1/representations.rb +118 -0
- data/generated/google/apis/admin_datatransfer_v1/service.rb +262 -0
- data/generated/google/apis/admin_datatransfer_v1.rb +37 -0
- data/generated/google/apis/admin_directory_v1/classes.rb +3141 -0
- data/generated/google/apis/admin_directory_v1/representations.rb +1029 -0
- data/generated/google/apis/admin_directory_v1/service.rb +3818 -0
- data/generated/google/apis/admin_directory_v1.rb +113 -0
- data/generated/google/apis/admin_reports_v1/classes.rb +582 -0
- data/generated/google/apis/admin_reports_v1/representations.rb +231 -0
- data/generated/google/apis/admin_reports_v1/service.rb +336 -0
- data/generated/google/apis/admin_reports_v1.rb +38 -0
- data/generated/google/apis/adsense_v1_4/classes.rb +1285 -0
- data/generated/google/apis/adsense_v1_4/representations.rb +494 -0
- data/generated/google/apis/adsense_v1_4/service.rb +1714 -0
- data/generated/google/apis/adsense_v1_4.rb +38 -0
- data/generated/google/apis/adsensehost_v4_1/classes.rb +834 -0
- data/generated/google/apis/adsensehost_v4_1/representations.rb +327 -0
- data/generated/google/apis/adsensehost_v4_1/service.rb +1164 -0
- data/generated/google/apis/adsensehost_v4_1.rb +35 -0
- data/generated/google/apis/analytics_v3/classes.rb +5118 -0
- data/generated/google/apis/analytics_v3/representations.rb +1662 -0
- data/generated/google/apis/analytics_v3/service.rb +3568 -0
- data/generated/google/apis/analytics_v3.rb +49 -0
- data/generated/google/apis/androidenterprise_v1/classes.rb +1443 -0
- data/generated/google/apis/androidenterprise_v1/representations.rb +538 -0
- data/generated/google/apis/androidenterprise_v1/service.rb +2602 -0
- data/generated/google/apis/androidenterprise_v1.rb +35 -0
- data/generated/google/apis/androidpublisher_v2/classes.rb +1411 -0
- data/generated/google/apis/androidpublisher_v2/representations.rb +646 -0
- data/generated/google/apis/androidpublisher_v2/service.rb +2338 -0
- data/generated/google/apis/androidpublisher_v2.rb +34 -0
- data/generated/google/apis/appengine_v1beta4/classes.rb +1532 -0
- data/generated/google/apis/appengine_v1beta4/representations.rb +526 -0
- data/generated/google/apis/appengine_v1beta4/service.rb +476 -0
- data/generated/google/apis/appengine_v1beta4.rb +35 -0
- data/generated/google/apis/appsactivity_v1/classes.rb +392 -0
- data/generated/google/apis/appsactivity_v1/representations.rb +184 -0
- data/generated/google/apis/appsactivity_v1/service.rb +128 -0
- data/generated/google/apis/appsactivity_v1.rb +46 -0
- data/generated/google/apis/appstate_v1/classes.rb +154 -0
- data/generated/google/apis/appstate_v1/representations.rb +79 -0
- data/generated/google/apis/appstate_v1/service.rb +260 -0
- data/generated/google/apis/appstate_v1.rb +34 -0
- data/generated/google/apis/autoscaler_v1beta2/classes.rb +747 -0
- data/generated/google/apis/autoscaler_v1beta2/representations.rb +281 -0
- data/generated/google/apis/autoscaler_v1beta2/service.rb +478 -0
- data/generated/google/apis/autoscaler_v1beta2.rb +38 -0
- data/generated/google/apis/bigquery_v2/classes.rb +2471 -0
- data/generated/google/apis/bigquery_v2/representations.rb +816 -0
- data/generated/google/apis/bigquery_v2/service.rb +982 -0
- data/generated/google/apis/bigquery_v2.rb +52 -0
- data/generated/google/apis/blogger_v3/classes.rb +1354 -0
- data/generated/google/apis/blogger_v3/representations.rb +562 -0
- data/generated/google/apis/blogger_v3/service.rb +1587 -0
- data/generated/google/apis/blogger_v3.rb +37 -0
- data/generated/google/apis/books_v1/classes.rb +3956 -0
- data/generated/google/apis/books_v1/representations.rb +1538 -0
- data/generated/google/apis/books_v1/service.rb +2290 -0
- data/generated/google/apis/books_v1.rb +34 -0
- data/generated/google/apis/calendar_v3/classes.rb +1742 -0
- data/generated/google/apis/calendar_v3/representations.rb +567 -0
- data/generated/google/apis/calendar_v3/service.rb +1968 -0
- data/generated/google/apis/calendar_v3.rb +37 -0
- data/generated/google/apis/civicinfo_v2/classes.rb +1127 -0
- data/generated/google/apis/civicinfo_v2/representations.rb +383 -0
- data/generated/google/apis/civicinfo_v2/service.rb +279 -0
- data/{lib/google/api_client/service_account.rb → generated/google/apis/civicinfo_v2.rb} +18 -8
- data/generated/google/apis/classroom_v1/classes.rb +512 -0
- data/generated/google/apis/classroom_v1/representations.rb +217 -0
- data/generated/google/apis/classroom_v1/service.rb +970 -0
- data/generated/google/apis/classroom_v1.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/classroom_v1beta1.rb +49 -0
- data/generated/google/apis/cloudbilling_v1/classes.rb +169 -0
- data/generated/google/apis/cloudbilling_v1/representations.rb +79 -0
- data/generated/google/apis/cloudbilling_v1/service.rb +258 -0
- data/generated/google/apis/cloudbilling_v1.rb +35 -0
- data/generated/google/apis/clouddebugger_v2/classes.rb +1004 -0
- data/generated/google/apis/clouddebugger_v2/representations.rb +410 -0
- data/generated/google/apis/clouddebugger_v2/service.rb +370 -0
- data/generated/google/apis/clouddebugger_v2.rb +41 -0
- data/generated/google/apis/cloudmonitoring_v2beta2/classes.rb +679 -0
- data/generated/google/apis/cloudmonitoring_v2beta2/representations.rb +311 -0
- data/generated/google/apis/cloudmonitoring_v2beta2/service.rb +452 -0
- data/generated/google/apis/cloudmonitoring_v2beta2.rb +37 -0
- data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +437 -0
- data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +188 -0
- data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +623 -0
- data/generated/google/apis/cloudresourcemanager_v1beta1.rb +38 -0
- data/generated/google/apis/cloudtrace_v1/classes.rb +188 -0
- data/generated/google/apis/cloudtrace_v1/representations.rb +92 -0
- data/generated/google/apis/cloudtrace_v1/service.rb +190 -0
- data/generated/google/apis/cloudtrace_v1.rb +35 -0
- data/generated/google/apis/clouduseraccounts_beta/classes.rb +823 -0
- data/generated/google/apis/clouduseraccounts_beta/representations.rb +313 -0
- data/generated/google/apis/clouduseraccounts_beta/service.rb +854 -0
- data/generated/google/apis/clouduseraccounts_beta.rb +43 -0
- data/generated/google/apis/compute_beta/classes.rb +9128 -0
- data/generated/google/apis/compute_beta/representations.rb +3048 -0
- data/generated/google/apis/compute_beta/service.rb +10154 -0
- data/generated/google/apis/compute_beta.rb +49 -0
- data/generated/google/apis/compute_v1/classes.rb +8681 -0
- data/generated/google/apis/compute_v1/representations.rb +2895 -0
- data/generated/google/apis/compute_v1/service.rb +9252 -0
- data/generated/google/apis/compute_v1.rb +49 -0
- data/generated/google/apis/container_v1/classes.rb +463 -0
- data/generated/google/apis/container_v1/representations.rb +175 -0
- data/generated/google/apis/container_v1/service.rb +367 -0
- data/generated/google/apis/container_v1.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/container_v1beta1.rb +35 -0
- data/generated/google/apis/content_v2/classes.rb +5986 -0
- data/generated/google/apis/content_v2/representations.rb +2288 -0
- data/generated/google/apis/content_v2/service.rb +2338 -0
- data/generated/google/apis/content_v2.rb +35 -0
- data/generated/google/apis/coordinate_v1/classes.rb +669 -0
- data/generated/google/apis/coordinate_v1/representations.rb +285 -0
- data/generated/google/apis/coordinate_v1/service.rb +678 -0
- data/generated/google/apis/coordinate_v1.rb +37 -0
- data/generated/google/apis/customsearch_v1/classes.rb +771 -0
- data/generated/google/apis/customsearch_v1/representations.rb +276 -0
- data/generated/google/apis/customsearch_v1/service.rb +207 -0
- data/{lib/google/api_client/auth/compute_service_account.rb → generated/google/apis/customsearch_v1.rb} +13 -10
- data/generated/google/apis/datastore_v1beta2/classes.rb +1186 -0
- data/generated/google/apis/datastore_v1beta2/representations.rb +526 -0
- data/generated/google/apis/datastore_v1beta2/service.rb +294 -0
- data/generated/google/apis/datastore_v1beta2.rb +40 -0
- data/generated/google/apis/deploymentmanager_v2/classes.rb +1091 -0
- data/generated/google/apis/deploymentmanager_v2/representations.rb +422 -0
- data/generated/google/apis/deploymentmanager_v2/service.rb +857 -0
- data/generated/google/apis/deploymentmanager_v2.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/deploymentmanager_v2beta2.rb +44 -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_1.rb +37 -0
- data/generated/google/apis/discovery_v1/classes.rb +961 -0
- data/generated/google/apis/discovery_v1/representations.rb +357 -0
- data/generated/google/apis/discovery_v1/service.rb +142 -0
- data/generated/google/apis/discovery_v1.rb +32 -0
- data/generated/google/apis/dns_v1/classes.rb +406 -0
- data/generated/google/apis/dns_v1/representations.rb +151 -0
- data/generated/google/apis/dns_v1/service.rb +454 -0
- data/generated/google/apis/dns_v1.rb +44 -0
- data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +716 -0
- data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +298 -0
- data/generated/google/apis/doubleclickbidmanager_v1/service.rb +341 -0
- data/generated/google/apis/doubleclickbidmanager_v1.rb +31 -0
- data/generated/google/apis/doubleclicksearch_v2/classes.rb +956 -0
- data/generated/google/apis/doubleclicksearch_v2/representations.rb +316 -0
- data/generated/google/apis/doubleclicksearch_v2/service.rb +480 -0
- data/generated/google/apis/doubleclicksearch_v2.rb +35 -0
- data/generated/google/apis/drive_v2/classes.rb +2562 -0
- data/generated/google/apis/drive_v2/representations.rb +795 -0
- data/generated/google/apis/drive_v2/service.rb +2696 -0
- data/generated/google/apis/drive_v2.rb +58 -0
- data/generated/google/apis/drive_v3/classes.rb +1534 -0
- data/generated/google/apis/drive_v3/representations.rb +497 -0
- data/generated/google/apis/drive_v3/service.rb +1541 -0
- data/generated/google/apis/drive_v3.rb +55 -0
- data/generated/google/apis/fitness_v1/classes.rb +885 -0
- data/generated/google/apis/fitness_v1/representations.rb +320 -0
- data/generated/google/apis/fitness_v1/service.rb +675 -0
- data/generated/google/apis/fitness_v1.rb +49 -0
- data/generated/google/apis/fusiontables_v2/classes.rb +1048 -0
- data/generated/google/apis/fusiontables_v2/representations.rb +409 -0
- data/generated/google/apis/fusiontables_v2/service.rb +1463 -0
- data/generated/google/apis/fusiontables_v2.rb +37 -0
- data/generated/google/apis/games_configuration_v1configuration/classes.rb +506 -0
- data/generated/google/apis/games_configuration_v1configuration/representations.rb +206 -0
- data/generated/google/apis/games_configuration_v1configuration/service.rb +565 -0
- data/generated/google/apis/games_configuration_v1configuration.rb +34 -0
- data/generated/google/apis/games_management_v1management/classes.rb +524 -0
- data/generated/google/apis/games_management_v1management/representations.rb +231 -0
- data/generated/google/apis/games_management_v1management/service.rb +994 -0
- data/generated/google/apis/games_management_v1management.rb +37 -0
- data/generated/google/apis/games_v1/classes.rb +4617 -0
- data/generated/google/apis/games_v1/representations.rb +1584 -0
- data/generated/google/apis/games_v1/service.rb +2290 -0
- data/generated/google/apis/games_v1.rb +40 -0
- data/generated/google/apis/gan_v1beta1/classes.rb +1428 -0
- data/generated/google/apis/gan_v1beta1/representations.rb +428 -0
- data/generated/google/apis/gan_v1beta1/service.rb +682 -0
- data/generated/google/apis/gan_v1beta1.rb +31 -0
- data/generated/google/apis/genomics_v1/classes.rb +2609 -0
- data/generated/google/apis/genomics_v1/representations.rb +909 -0
- data/generated/google/apis/genomics_v1/service.rb +1676 -0
- data/generated/google/apis/genomics_v1.rb +49 -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/genomics_v1beta2.rb +46 -0
- data/generated/google/apis/gmail_v1/classes.rb +794 -0
- data/generated/google/apis/gmail_v1/representations.rb +339 -0
- data/generated/google/apis/gmail_v1/service.rb +1470 -0
- data/generated/google/apis/gmail_v1.rb +52 -0
- data/generated/google/apis/groupsmigration_v1/classes.rb +51 -0
- data/generated/google/apis/groupsmigration_v1/representations.rb +38 -0
- data/generated/google/apis/groupsmigration_v1/service.rb +110 -0
- data/generated/google/apis/groupsmigration_v1.rb +34 -0
- data/generated/google/apis/groupssettings_v1/classes.rb +221 -0
- data/generated/google/apis/groupssettings_v1/representations.rb +64 -0
- data/generated/google/apis/groupssettings_v1/service.rb +179 -0
- data/generated/google/apis/groupssettings_v1.rb +34 -0
- data/generated/google/apis/identitytoolkit_v3/classes.rb +1466 -0
- data/generated/google/apis/identitytoolkit_v3/representations.rb +509 -0
- data/generated/google/apis/identitytoolkit_v3/service.rb +581 -0
- data/generated/google/apis/identitytoolkit_v3.rb +31 -0
- data/generated/google/apis/kgsearch_v1/classes.rb +59 -0
- data/generated/google/apis/kgsearch_v1/representations.rb +39 -0
- data/generated/google/apis/kgsearch_v1/service.rb +111 -0
- data/{spec/google/api_client/request_spec.rb → generated/google/apis/kgsearch_v1.rb} +16 -13
- data/generated/google/apis/licensing_v1/classes.rb +132 -0
- data/generated/google/apis/licensing_v1/representations.rb +68 -0
- data/generated/google/apis/licensing_v1/service.rb +369 -0
- data/generated/google/apis/licensing_v1.rb +34 -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_v1beta3.rb +47 -0
- data/generated/google/apis/manager_v1beta2/classes.rb +1287 -0
- data/generated/google/apis/manager_v1beta2/representations.rb +536 -0
- data/generated/google/apis/manager_v1beta2/service.rb +372 -0
- data/generated/google/apis/manager_v1beta2.rb +53 -0
- data/generated/google/apis/mapsengine_v1/classes.rb +2873 -0
- data/generated/google/apis/mapsengine_v1/representations.rb +1235 -0
- data/generated/google/apis/mapsengine_v1/service.rb +3388 -0
- data/generated/google/apis/mapsengine_v1.rb +38 -0
- data/generated/google/apis/mirror_v1/classes.rb +1072 -0
- data/generated/google/apis/mirror_v1/representations.rb +350 -0
- data/generated/google/apis/mirror_v1/service.rb +977 -0
- data/generated/google/apis/mirror_v1.rb +37 -0
- data/generated/google/apis/oauth2_v2/classes.rb +245 -0
- data/generated/google/apis/oauth2_v2/representations.rb +94 -0
- data/generated/google/apis/oauth2_v2/service.rb +199 -0
- data/generated/google/apis/oauth2_v2.rb +43 -0
- data/generated/google/apis/pagespeedonline_v2/classes.rb +614 -0
- data/generated/google/apis/pagespeedonline_v2/representations.rb +244 -0
- data/generated/google/apis/pagespeedonline_v2/service.rb +119 -0
- data/generated/google/apis/pagespeedonline_v2.rb +32 -0
- data/generated/google/apis/partners_v2/classes.rb +942 -0
- data/generated/google/apis/partners_v2/representations.rb +402 -0
- data/generated/google/apis/partners_v2/service.rb +400 -0
- data/generated/google/apis/partners_v2.rb +32 -0
- data/generated/google/apis/plus_domains_v1/classes.rb +2609 -0
- data/generated/google/apis/plus_domains_v1/representations.rb +987 -0
- data/generated/google/apis/plus_domains_v1/service.rb +904 -0
- data/generated/google/apis/plus_domains_v1.rb +61 -0
- data/generated/google/apis/plus_v1/classes.rb +2094 -0
- data/generated/google/apis/plus_v1/representations.rb +805 -0
- data/generated/google/apis/plus_v1/service.rb +470 -0
- data/generated/google/apis/plus_v1.rb +43 -0
- data/generated/google/apis/prediction_v1_6/classes.rb +751 -0
- data/generated/google/apis/prediction_v1_6/representations.rb +327 -0
- data/generated/google/apis/prediction_v1_6/service.rb +380 -0
- data/generated/google/apis/prediction_v1_6.rb +44 -0
- data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +639 -0
- data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +274 -0
- data/generated/google/apis/proximitybeacon_v1beta1/service.rb +591 -0
- data/generated/google/apis/proximitybeacon_v1beta1.rb +31 -0
- data/generated/google/apis/pubsub_v1/classes.rb +614 -0
- data/generated/google/apis/pubsub_v1/representations.rb +281 -0
- data/generated/google/apis/pubsub_v1/service.rb +774 -0
- data/generated/google/apis/pubsub_v1.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/pubsub_v1beta2.rb +37 -0
- data/generated/google/apis/qpx_express_v1/classes.rb +1268 -0
- data/generated/google/apis/qpx_express_v1/representations.rb +424 -0
- data/generated/google/apis/qpx_express_v1/service.rb +100 -0
- data/generated/google/apis/qpx_express_v1.rb +31 -0
- data/generated/google/apis/replicapool_v1beta2/classes.rb +631 -0
- data/generated/google/apis/replicapool_v1beta2/representations.rb +236 -0
- data/generated/google/apis/replicapool_v1beta2/service.rb +608 -0
- data/generated/google/apis/replicapool_v1beta2.rb +44 -0
- data/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +733 -0
- data/generated/google/apis/replicapoolupdater_v1beta1/representations.rb +264 -0
- data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +508 -0
- data/generated/google/apis/replicapoolupdater_v1beta1.rb +44 -0
- data/generated/google/apis/reseller_v1/classes.rb +520 -0
- data/generated/google/apis/reseller_v1/representations.rb +200 -0
- data/generated/google/apis/reseller_v1/service.rb +623 -0
- data/generated/google/apis/reseller_v1.rb +37 -0
- data/generated/google/apis/resourceviews_v1beta2/classes.rb +660 -0
- data/generated/google/apis/resourceviews_v1beta2/representations.rb +269 -0
- data/generated/google/apis/resourceviews_v1beta2/service.rb +563 -0
- data/generated/google/apis/resourceviews_v1beta2.rb +50 -0
- data/generated/google/apis/script_v1/classes.rb +259 -0
- data/generated/google/apis/script_v1/representations.rb +106 -0
- data/generated/google/apis/script_v1/service.rb +98 -0
- data/generated/google/apis/script_v1.rb +61 -0
- data/generated/google/apis/site_verification_v1/classes.rb +185 -0
- data/generated/google/apis/site_verification_v1/representations.rb +101 -0
- data/generated/google/apis/site_verification_v1/service.rb +315 -0
- data/generated/google/apis/site_verification_v1.rb +37 -0
- data/generated/google/apis/sqladmin_v1beta4/classes.rb +2001 -0
- data/generated/google/apis/sqladmin_v1beta4/representations.rb +758 -0
- data/generated/google/apis/sqladmin_v1beta4/service.rb +1625 -0
- data/generated/google/apis/sqladmin_v1beta4.rb +37 -0
- data/generated/google/apis/storage_v1/classes.rb +1222 -0
- data/generated/google/apis/storage_v1/representations.rb +445 -0
- data/generated/google/apis/storage_v1/service.rb +1903 -0
- data/generated/google/apis/storage_v1.rb +46 -0
- data/generated/google/apis/storagetransfer_v1/classes.rb +1046 -0
- data/generated/google/apis/storagetransfer_v1/representations.rb +370 -0
- data/generated/google/apis/storagetransfer_v1/service.rb +473 -0
- data/generated/google/apis/storagetransfer_v1.rb +35 -0
- data/generated/google/apis/tagmanager_v1/classes.rb +1384 -0
- data/generated/google/apis/tagmanager_v1/representations.rb +515 -0
- data/generated/google/apis/tagmanager_v1/service.rb +1817 -0
- data/generated/google/apis/tagmanager_v1.rb +52 -0
- data/generated/google/apis/taskqueue_v1beta2/classes.rb +254 -0
- data/generated/google/apis/taskqueue_v1beta2/representations.rb +114 -0
- data/generated/google/apis/taskqueue_v1beta2/service.rb +408 -0
- data/generated/google/apis/taskqueue_v1beta2.rb +37 -0
- data/generated/google/apis/tasks_v1/classes.rb +296 -0
- data/generated/google/apis/tasks_v1/representations.rb +115 -0
- data/generated/google/apis/tasks_v1/service.rb +643 -0
- data/generated/google/apis/tasks_v1.rb +37 -0
- data/generated/google/apis/translate_v2/classes.rb +168 -0
- data/generated/google/apis/translate_v2/representations.rb +109 -0
- data/generated/google/apis/translate_v2/service.rb +182 -0
- data/generated/google/apis/translate_v2.rb +31 -0
- data/generated/google/apis/urlshortener_v1/classes.rb +246 -0
- data/generated/google/apis/urlshortener_v1/representations.rb +111 -0
- data/generated/google/apis/urlshortener_v1/service.rb +176 -0
- data/generated/google/apis/urlshortener_v1.rb +34 -0
- data/generated/google/apis/webmasters_v3/classes.rb +563 -0
- data/generated/google/apis/webmasters_v3/representations.rb +250 -0
- data/generated/google/apis/webmasters_v3/service.rb +573 -0
- data/generated/google/apis/webmasters_v3.rb +37 -0
- data/generated/google/apis/youtube_analytics_v1/classes.rb +546 -0
- data/generated/google/apis/youtube_analytics_v1/representations.rb +243 -0
- data/generated/google/apis/youtube_analytics_v1/service.rb +562 -0
- data/generated/google/apis/youtube_analytics_v1.rb +46 -0
- data/generated/google/apis/youtube_v3/classes.rb +8136 -0
- data/generated/google/apis/youtube_v3/representations.rb +2838 -0
- data/generated/google/apis/youtube_v3/service.rb +4403 -0
- data/generated/google/apis/youtube_v3.rb +49 -0
- data/generated/google/apis/youtubereporting_v1/classes.rb +258 -0
- data/generated/google/apis/youtubereporting_v1/representations.rb +128 -0
- data/generated/google/apis/youtubereporting_v1/service.rb +364 -0
- data/generated/google/apis/youtubereporting_v1.rb +38 -0
- data/google-api-client.gemspec +27 -39
- data/lib/google/api_client/auth/installed_app.rb +7 -5
- data/lib/google/api_client/auth/key_utils.rb +12 -11
- data/lib/google/api_client/auth/storage.rb +5 -2
- data/lib/google/api_client/auth/storages/file_store.rb +2 -3
- data/lib/google/api_client/auth/storages/redis_store.rb +7 -2
- data/lib/google/api_client/client_secrets.rb +4 -5
- data/lib/google/apis/core/api_command.rb +135 -0
- data/lib/google/apis/core/base_service.rb +317 -0
- data/lib/google/apis/core/batch.rb +239 -0
- data/lib/google/apis/core/download.rb +94 -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 +312 -0
- data/lib/google/apis/core/json_representation.rb +127 -0
- data/lib/google/{api_client/version.rb → apis/core/logging.rb} +12 -8
- data/lib/google/apis/core/multipart.rb +187 -0
- data/lib/google/apis/core/upload.rb +288 -0
- data/lib/google/{api_client → apis}/errors.rb +39 -28
- data/lib/google/apis/generator/annotator.rb +295 -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 +15 -0
- data/lib/google/apis/generator/templates/_representation_type.tmpl +10 -0
- data/lib/google/{api_client/reference.rb → apis/generator/templates/classes.rb.tmpl} +11 -9
- 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/generator.rb +70 -0
- data/lib/google/apis/options.rb +85 -0
- data/lib/google/apis/version.rb +39 -0
- data/lib/google/apis.rb +48 -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/Gemfile +7 -0
- data/samples/README.md +51 -0
- data/samples/google-api-samples +32 -0
- data/samples/lib/base_cli.rb +94 -0
- data/samples/lib/samples/analytics.rb +62 -0
- data/samples/lib/samples/calendar.rb +83 -0
- data/samples/lib/samples/drive.rb +82 -0
- data/samples/lib/samples/gmail.rb +50 -0
- data/samples/lib/samples/pubsub.rb +114 -0
- data/samples/lib/samples/translate.rb +44 -0
- data/samples/lib/samples/you_tube.rb +44 -0
- data/script/generate +95 -0
- data/script/package +8 -0
- data/script/release +15 -0
- data/spec/fixtures/files/api_names.yaml +3 -0
- data/spec/fixtures/files/auth_stored_credentials.json +8 -0
- data/spec/fixtures/files/child/.gitignore +0 -0
- data/spec/fixtures/files/client_secrets.json +1 -0
- data/spec/fixtures/files/invalid.json +1 -0
- data/spec/fixtures/files/test.blah +1 -0
- data/spec/fixtures/files/test.txt +1 -0
- data/spec/fixtures/files/test_api.json +440 -0
- data/spec/google/api_client/auth/storage_spec.rb +1 -3
- data/spec/google/api_client/auth/storages/file_store_spec.rb +1 -2
- data/spec/google/api_client/auth/storages/redis_store_spec.rb +1 -3
- data/spec/google/api_client/client_secrets_spec.rb +38 -1
- data/spec/google/apis/core/api_command_spec.rb +209 -0
- data/spec/google/apis/core/batch_spec.rb +142 -0
- data/spec/google/apis/core/download_spec.rb +103 -0
- data/spec/google/apis/core/hashable_spec.rb +60 -0
- data/spec/google/apis/core/http_command_spec.rb +284 -0
- data/spec/google/apis/core/json_representation_spec.rb +192 -0
- data/spec/google/apis/core/service_spec.rb +247 -0
- data/spec/google/apis/core/upload_spec.rb +300 -0
- data/{lib/google/api_client/discovery.rb → spec/google/apis/generated_spec.rb} +13 -5
- data/spec/google/apis/generator/generator_spec.rb +272 -0
- data/spec/google/apis/logging_spec.rb +45 -0
- data/spec/google/apis/options_spec.rb +40 -0
- data/spec/integration_tests/adsense_spec.rb +29 -0
- data/spec/integration_tests/drive_spec.rb +35 -0
- data/spec/integration_tests/pubsub_spec.rb +48 -0
- data/spec/integration_tests/url_shortener_spec.rb +45 -0
- data/spec/spec_helper/load_path_spec.rb +33 -0
- data/spec/spec_helper.rb +131 -44
- data/third_party/hurley_patches.rb +103 -0
- metadata +533 -170
- data/lib/compat/multi_json.rb +0 -19
- data/lib/google/api_client/auth/file_storage.rb +0 -59
- data/lib/google/api_client/auth/jwt_asserter.rb +0 -126
- data/lib/google/api_client/auth/pkcs12.rb +0 -41
- data/lib/google/api_client/batch.rb +0 -325
- data/lib/google/api_client/charset.rb +0 -33
- data/lib/google/api_client/discovery/api.rb +0 -300
- data/lib/google/api_client/discovery/media.rb +0 -77
- data/lib/google/api_client/discovery/method.rb +0 -363
- data/lib/google/api_client/discovery/resource.rb +0 -156
- data/lib/google/api_client/discovery/schema.rb +0 -119
- data/lib/google/api_client/environment.rb +0 -42
- data/lib/google/api_client/gzip.rb +0 -28
- data/lib/google/api_client/logging.rb +0 -32
- data/lib/google/api_client/media.rb +0 -259
- data/lib/google/api_client/railtie.rb +0 -18
- data/lib/google/api_client/request.rb +0 -350
- data/lib/google/api_client/result.rb +0 -255
- data/lib/google/api_client/service/batch.rb +0 -110
- data/lib/google/api_client/service/request.rb +0 -144
- data/lib/google/api_client/service/resource.rb +0 -40
- data/lib/google/api_client/service/result.rb +0 -162
- data/lib/google/api_client/service/simple_file_store.rb +0 -151
- data/lib/google/api_client/service/stub_generator.rb +0 -61
- data/lib/google/api_client/service.rb +0 -233
- data/lib/google/api_client.rb +0 -750
- data/spec/google/api_client/batch_spec.rb +0 -248
- data/spec/google/api_client/discovery_spec.rb +0 -662
- data/spec/google/api_client/gzip_spec.rb +0 -98
- data/spec/google/api_client/media_spec.rb +0 -178
- data/spec/google/api_client/result_spec.rb +0 -207
- data/spec/google/api_client/service_account_spec.rb +0 -169
- data/spec/google/api_client/service_spec.rb +0 -618
- data/spec/google/api_client/simple_file_store_spec.rb +0 -133
- data/spec/google/api_client_spec.rb +0 -352
|
@@ -0,0 +1,1541 @@
|
|
|
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 DriveV3
|
|
23
|
+
# Drive API
|
|
24
|
+
#
|
|
25
|
+
# The API to interact with Drive.
|
|
26
|
+
#
|
|
27
|
+
# @example
|
|
28
|
+
# require 'google/apis/drive_v3'
|
|
29
|
+
#
|
|
30
|
+
# Drive = Google::Apis::DriveV3 # Alias the module
|
|
31
|
+
# service = Drive::DriveService.new
|
|
32
|
+
#
|
|
33
|
+
# @see https://developers.google.com/drive/
|
|
34
|
+
class DriveService < 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
|
+
# Overrides userIp if both are provided.
|
|
44
|
+
attr_accessor :quota_user
|
|
45
|
+
|
|
46
|
+
# @return [String]
|
|
47
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
48
|
+
# enforce per-user limits.
|
|
49
|
+
attr_accessor :user_ip
|
|
50
|
+
|
|
51
|
+
def initialize
|
|
52
|
+
super('https://www.googleapis.com/', 'drive/v3/')
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Gets information about the user, the user's Drive, and system capabilities.
|
|
56
|
+
# @param [String] fields
|
|
57
|
+
# Selector specifying which fields to include in a partial response.
|
|
58
|
+
# @param [String] quota_user
|
|
59
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
60
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
61
|
+
# Overrides userIp if both are provided.
|
|
62
|
+
# @param [String] user_ip
|
|
63
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
64
|
+
# enforce per-user limits.
|
|
65
|
+
# @param [Google::Apis::RequestOptions] options
|
|
66
|
+
# Request-specific options
|
|
67
|
+
#
|
|
68
|
+
# @yield [result, err] Result & error if block supplied
|
|
69
|
+
# @yieldparam result [Google::Apis::DriveV3::About] parsed result object
|
|
70
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
71
|
+
#
|
|
72
|
+
# @return [Google::Apis::DriveV3::About]
|
|
73
|
+
#
|
|
74
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
75
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
76
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
77
|
+
def get_about(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
78
|
+
command = make_simple_command(:get, 'about', options)
|
|
79
|
+
command.response_representation = Google::Apis::DriveV3::About::Representation
|
|
80
|
+
command.response_class = Google::Apis::DriveV3::About
|
|
81
|
+
command.query['fields'] = fields unless fields.nil?
|
|
82
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
83
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
84
|
+
execute_or_queue_command(command, &block)
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Gets the starting pageToken for listing future changes.
|
|
88
|
+
# @param [String] fields
|
|
89
|
+
# Selector specifying which fields to include in a partial response.
|
|
90
|
+
# @param [String] quota_user
|
|
91
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
92
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
93
|
+
# Overrides userIp if both are provided.
|
|
94
|
+
# @param [String] user_ip
|
|
95
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
96
|
+
# enforce per-user limits.
|
|
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::DriveV3::StartPageToken] parsed result object
|
|
102
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
103
|
+
#
|
|
104
|
+
# @return [Google::Apis::DriveV3::StartPageToken]
|
|
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_changes_start_page_token(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
110
|
+
command = make_simple_command(:get, 'changes/startPageToken', options)
|
|
111
|
+
command.response_representation = Google::Apis::DriveV3::StartPageToken::Representation
|
|
112
|
+
command.response_class = Google::Apis::DriveV3::StartPageToken
|
|
113
|
+
command.query['fields'] = fields unless fields.nil?
|
|
114
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
115
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
116
|
+
execute_or_queue_command(command, &block)
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Lists changes for a user.
|
|
120
|
+
# @param [String] page_token
|
|
121
|
+
# The token for continuing a previous list request on the next page. This should
|
|
122
|
+
# be set to the value of 'nextPageToken' from the previous response or to the
|
|
123
|
+
# response from the getStartPageToken method.
|
|
124
|
+
# @param [Boolean] include_removed
|
|
125
|
+
# Whether to include changes indicating that items have left the view of the
|
|
126
|
+
# changes list, for example by deletion or lost access.
|
|
127
|
+
# @param [Fixnum] page_size
|
|
128
|
+
# The maximum number of changes to return per page.
|
|
129
|
+
# @param [Boolean] restrict_to_my_drive
|
|
130
|
+
# Whether to restrict the results to changes inside the My Drive hierarchy. This
|
|
131
|
+
# omits changes to files such as those in the Application Data folder or shared
|
|
132
|
+
# files which have not been added to My Drive.
|
|
133
|
+
# @param [String] spaces
|
|
134
|
+
# A comma-separated list of spaces to query within the user corpus. Supported
|
|
135
|
+
# values are 'drive', 'appDataFolder' and 'photos'.
|
|
136
|
+
# @param [String] fields
|
|
137
|
+
# Selector specifying which fields to include in a partial response.
|
|
138
|
+
# @param [String] quota_user
|
|
139
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
140
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
141
|
+
# Overrides userIp if both are provided.
|
|
142
|
+
# @param [String] user_ip
|
|
143
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
144
|
+
# enforce per-user limits.
|
|
145
|
+
# @param [Google::Apis::RequestOptions] options
|
|
146
|
+
# Request-specific options
|
|
147
|
+
#
|
|
148
|
+
# @yield [result, err] Result & error if block supplied
|
|
149
|
+
# @yieldparam result [Google::Apis::DriveV3::ChangeList] parsed result object
|
|
150
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
151
|
+
#
|
|
152
|
+
# @return [Google::Apis::DriveV3::ChangeList]
|
|
153
|
+
#
|
|
154
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
155
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
156
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
157
|
+
def list_changes(page_token, include_removed: nil, page_size: nil, restrict_to_my_drive: nil, spaces: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
158
|
+
command = make_simple_command(:get, 'changes', options)
|
|
159
|
+
command.response_representation = Google::Apis::DriveV3::ChangeList::Representation
|
|
160
|
+
command.response_class = Google::Apis::DriveV3::ChangeList
|
|
161
|
+
command.query['includeRemoved'] = include_removed unless include_removed.nil?
|
|
162
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
|
163
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
164
|
+
command.query['restrictToMyDrive'] = restrict_to_my_drive unless restrict_to_my_drive.nil?
|
|
165
|
+
command.query['spaces'] = spaces unless spaces.nil?
|
|
166
|
+
command.query['fields'] = fields unless fields.nil?
|
|
167
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
168
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
169
|
+
execute_or_queue_command(command, &block)
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Subscribes to changes for a user.
|
|
173
|
+
# @param [String] page_token
|
|
174
|
+
# The token for continuing a previous list request on the next page. This should
|
|
175
|
+
# be set to the value of 'nextPageToken' from the previous response or to the
|
|
176
|
+
# response from the getStartPageToken method.
|
|
177
|
+
# @param [Google::Apis::DriveV3::Channel] channel_object
|
|
178
|
+
# @param [Boolean] include_removed
|
|
179
|
+
# Whether to include changes indicating that items have left the view of the
|
|
180
|
+
# changes list, for example by deletion or lost access.
|
|
181
|
+
# @param [Fixnum] page_size
|
|
182
|
+
# The maximum number of changes to return per page.
|
|
183
|
+
# @param [Boolean] restrict_to_my_drive
|
|
184
|
+
# Whether to restrict the results to changes inside the My Drive hierarchy. This
|
|
185
|
+
# omits changes to files such as those in the Application Data folder or shared
|
|
186
|
+
# files which have not been added to My Drive.
|
|
187
|
+
# @param [String] spaces
|
|
188
|
+
# A comma-separated list of spaces to query within the user corpus. Supported
|
|
189
|
+
# values are 'drive', 'appDataFolder' and 'photos'.
|
|
190
|
+
# @param [String] fields
|
|
191
|
+
# Selector specifying which fields to include in a partial response.
|
|
192
|
+
# @param [String] quota_user
|
|
193
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
194
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
195
|
+
# Overrides userIp if both are provided.
|
|
196
|
+
# @param [String] user_ip
|
|
197
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
198
|
+
# enforce per-user limits.
|
|
199
|
+
# @param [Google::Apis::RequestOptions] options
|
|
200
|
+
# Request-specific options
|
|
201
|
+
#
|
|
202
|
+
# @yield [result, err] Result & error if block supplied
|
|
203
|
+
# @yieldparam result [Google::Apis::DriveV3::Channel] parsed result object
|
|
204
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
205
|
+
#
|
|
206
|
+
# @return [Google::Apis::DriveV3::Channel]
|
|
207
|
+
#
|
|
208
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
209
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
210
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
211
|
+
def watch_change(page_token, channel_object = nil, include_removed: nil, page_size: nil, restrict_to_my_drive: nil, spaces: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
212
|
+
command = make_simple_command(:post, 'changes/watch', options)
|
|
213
|
+
command.request_representation = Google::Apis::DriveV3::Channel::Representation
|
|
214
|
+
command.request_object = channel_object
|
|
215
|
+
command.response_representation = Google::Apis::DriveV3::Channel::Representation
|
|
216
|
+
command.response_class = Google::Apis::DriveV3::Channel
|
|
217
|
+
command.query['includeRemoved'] = include_removed unless include_removed.nil?
|
|
218
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
|
219
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
220
|
+
command.query['restrictToMyDrive'] = restrict_to_my_drive unless restrict_to_my_drive.nil?
|
|
221
|
+
command.query['spaces'] = spaces unless spaces.nil?
|
|
222
|
+
command.query['fields'] = fields unless fields.nil?
|
|
223
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
224
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
225
|
+
execute_or_queue_command(command, &block)
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# Stop watching resources through this channel
|
|
229
|
+
# @param [Google::Apis::DriveV3::Channel] channel_object
|
|
230
|
+
# @param [String] fields
|
|
231
|
+
# Selector specifying which fields to include in a partial response.
|
|
232
|
+
# @param [String] quota_user
|
|
233
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
234
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
235
|
+
# Overrides userIp if both are provided.
|
|
236
|
+
# @param [String] user_ip
|
|
237
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
238
|
+
# enforce per-user limits.
|
|
239
|
+
# @param [Google::Apis::RequestOptions] options
|
|
240
|
+
# Request-specific options
|
|
241
|
+
#
|
|
242
|
+
# @yield [result, err] Result & error if block supplied
|
|
243
|
+
# @yieldparam result [NilClass] No result returned for this method
|
|
244
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
245
|
+
#
|
|
246
|
+
# @return [void]
|
|
247
|
+
#
|
|
248
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
249
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
250
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
251
|
+
def stop_channel(channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
252
|
+
command = make_simple_command(:post, 'channels/stop', options)
|
|
253
|
+
command.request_representation = Google::Apis::DriveV3::Channel::Representation
|
|
254
|
+
command.request_object = channel_object
|
|
255
|
+
command.query['fields'] = fields unless fields.nil?
|
|
256
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
257
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
258
|
+
execute_or_queue_command(command, &block)
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
# Creates a new comment on a file.
|
|
262
|
+
# @param [String] file_id
|
|
263
|
+
# The ID of the file.
|
|
264
|
+
# @param [Google::Apis::DriveV3::Comment] comment_object
|
|
265
|
+
# @param [String] fields
|
|
266
|
+
# Selector specifying which fields to include in a partial response.
|
|
267
|
+
# @param [String] quota_user
|
|
268
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
269
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
270
|
+
# Overrides userIp if both are provided.
|
|
271
|
+
# @param [String] user_ip
|
|
272
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
273
|
+
# enforce per-user limits.
|
|
274
|
+
# @param [Google::Apis::RequestOptions] options
|
|
275
|
+
# Request-specific options
|
|
276
|
+
#
|
|
277
|
+
# @yield [result, err] Result & error if block supplied
|
|
278
|
+
# @yieldparam result [Google::Apis::DriveV3::Comment] parsed result object
|
|
279
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
280
|
+
#
|
|
281
|
+
# @return [Google::Apis::DriveV3::Comment]
|
|
282
|
+
#
|
|
283
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
284
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
285
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
286
|
+
def create_comment(file_id, comment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
287
|
+
command = make_simple_command(:post, 'files/{fileId}/comments', options)
|
|
288
|
+
command.request_representation = Google::Apis::DriveV3::Comment::Representation
|
|
289
|
+
command.request_object = comment_object
|
|
290
|
+
command.response_representation = Google::Apis::DriveV3::Comment::Representation
|
|
291
|
+
command.response_class = Google::Apis::DriveV3::Comment
|
|
292
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
293
|
+
command.query['fields'] = fields unless fields.nil?
|
|
294
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
295
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
296
|
+
execute_or_queue_command(command, &block)
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
# Deletes a comment.
|
|
300
|
+
# @param [String] file_id
|
|
301
|
+
# The ID of the file.
|
|
302
|
+
# @param [String] comment_id
|
|
303
|
+
# The ID of the comment.
|
|
304
|
+
# @param [String] fields
|
|
305
|
+
# Selector specifying which fields to include in a partial response.
|
|
306
|
+
# @param [String] quota_user
|
|
307
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
308
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
309
|
+
# Overrides userIp if both are provided.
|
|
310
|
+
# @param [String] user_ip
|
|
311
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
312
|
+
# enforce per-user limits.
|
|
313
|
+
# @param [Google::Apis::RequestOptions] options
|
|
314
|
+
# Request-specific options
|
|
315
|
+
#
|
|
316
|
+
# @yield [result, err] Result & error if block supplied
|
|
317
|
+
# @yieldparam result [NilClass] No result returned for this method
|
|
318
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
319
|
+
#
|
|
320
|
+
# @return [void]
|
|
321
|
+
#
|
|
322
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
323
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
324
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
325
|
+
def delete_comment(file_id, comment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
326
|
+
command = make_simple_command(:delete, 'files/{fileId}/comments/{commentId}', options)
|
|
327
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
328
|
+
command.params['commentId'] = comment_id unless comment_id.nil?
|
|
329
|
+
command.query['fields'] = fields unless fields.nil?
|
|
330
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
331
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
332
|
+
execute_or_queue_command(command, &block)
|
|
333
|
+
end
|
|
334
|
+
|
|
335
|
+
# Gets a comment by ID.
|
|
336
|
+
# @param [String] file_id
|
|
337
|
+
# The ID of the file.
|
|
338
|
+
# @param [String] comment_id
|
|
339
|
+
# The ID of the comment.
|
|
340
|
+
# @param [Boolean] include_deleted
|
|
341
|
+
# Whether to return deleted comments. Deleted comments will not include their
|
|
342
|
+
# original content.
|
|
343
|
+
# @param [String] fields
|
|
344
|
+
# Selector specifying which fields to include in a partial response.
|
|
345
|
+
# @param [String] quota_user
|
|
346
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
347
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
348
|
+
# Overrides userIp if both are provided.
|
|
349
|
+
# @param [String] user_ip
|
|
350
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
351
|
+
# enforce per-user limits.
|
|
352
|
+
# @param [Google::Apis::RequestOptions] options
|
|
353
|
+
# Request-specific options
|
|
354
|
+
#
|
|
355
|
+
# @yield [result, err] Result & error if block supplied
|
|
356
|
+
# @yieldparam result [Google::Apis::DriveV3::Comment] parsed result object
|
|
357
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
358
|
+
#
|
|
359
|
+
# @return [Google::Apis::DriveV3::Comment]
|
|
360
|
+
#
|
|
361
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
362
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
363
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
364
|
+
def get_comment(file_id, comment_id, include_deleted: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
365
|
+
command = make_simple_command(:get, 'files/{fileId}/comments/{commentId}', options)
|
|
366
|
+
command.response_representation = Google::Apis::DriveV3::Comment::Representation
|
|
367
|
+
command.response_class = Google::Apis::DriveV3::Comment
|
|
368
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
369
|
+
command.params['commentId'] = comment_id unless comment_id.nil?
|
|
370
|
+
command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
|
|
371
|
+
command.query['fields'] = fields unless fields.nil?
|
|
372
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
373
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
374
|
+
execute_or_queue_command(command, &block)
|
|
375
|
+
end
|
|
376
|
+
|
|
377
|
+
# Lists a file's comments.
|
|
378
|
+
# @param [String] file_id
|
|
379
|
+
# The ID of the file.
|
|
380
|
+
# @param [Boolean] include_deleted
|
|
381
|
+
# Whether to include deleted comments. Deleted comments will not include their
|
|
382
|
+
# original content.
|
|
383
|
+
# @param [Fixnum] page_size
|
|
384
|
+
# The maximum number of comments to return per page.
|
|
385
|
+
# @param [String] page_token
|
|
386
|
+
# The token for continuing a previous list request on the next page. This should
|
|
387
|
+
# be set to the value of 'nextPageToken' from the previous response.
|
|
388
|
+
# @param [String] start_modified_time
|
|
389
|
+
# The minimum value of 'modifiedTime' for the result comments (RFC 3339 date-
|
|
390
|
+
# time).
|
|
391
|
+
# @param [String] fields
|
|
392
|
+
# Selector specifying which fields to include in a partial response.
|
|
393
|
+
# @param [String] quota_user
|
|
394
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
395
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
396
|
+
# Overrides userIp if both are provided.
|
|
397
|
+
# @param [String] user_ip
|
|
398
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
399
|
+
# enforce per-user limits.
|
|
400
|
+
# @param [Google::Apis::RequestOptions] options
|
|
401
|
+
# Request-specific options
|
|
402
|
+
#
|
|
403
|
+
# @yield [result, err] Result & error if block supplied
|
|
404
|
+
# @yieldparam result [Google::Apis::DriveV3::CommentList] parsed result object
|
|
405
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
406
|
+
#
|
|
407
|
+
# @return [Google::Apis::DriveV3::CommentList]
|
|
408
|
+
#
|
|
409
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
410
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
411
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
412
|
+
def list_comments(file_id, include_deleted: nil, page_size: nil, page_token: nil, start_modified_time: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
413
|
+
command = make_simple_command(:get, 'files/{fileId}/comments', options)
|
|
414
|
+
command.response_representation = Google::Apis::DriveV3::CommentList::Representation
|
|
415
|
+
command.response_class = Google::Apis::DriveV3::CommentList
|
|
416
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
417
|
+
command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
|
|
418
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
|
419
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
420
|
+
command.query['startModifiedTime'] = start_modified_time unless start_modified_time.nil?
|
|
421
|
+
command.query['fields'] = fields unless fields.nil?
|
|
422
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
423
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
424
|
+
execute_or_queue_command(command, &block)
|
|
425
|
+
end
|
|
426
|
+
|
|
427
|
+
# Updates a comment with patch semantics.
|
|
428
|
+
# @param [String] file_id
|
|
429
|
+
# The ID of the file.
|
|
430
|
+
# @param [String] comment_id
|
|
431
|
+
# The ID of the comment.
|
|
432
|
+
# @param [Google::Apis::DriveV3::Comment] comment_object
|
|
433
|
+
# @param [String] fields
|
|
434
|
+
# Selector specifying which fields to include in a partial response.
|
|
435
|
+
# @param [String] quota_user
|
|
436
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
437
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
438
|
+
# Overrides userIp if both are provided.
|
|
439
|
+
# @param [String] user_ip
|
|
440
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
441
|
+
# enforce per-user limits.
|
|
442
|
+
# @param [Google::Apis::RequestOptions] options
|
|
443
|
+
# Request-specific options
|
|
444
|
+
#
|
|
445
|
+
# @yield [result, err] Result & error if block supplied
|
|
446
|
+
# @yieldparam result [Google::Apis::DriveV3::Comment] parsed result object
|
|
447
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
448
|
+
#
|
|
449
|
+
# @return [Google::Apis::DriveV3::Comment]
|
|
450
|
+
#
|
|
451
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
452
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
453
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
454
|
+
def update_comment(file_id, comment_id, comment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
455
|
+
command = make_simple_command(:patch, 'files/{fileId}/comments/{commentId}', options)
|
|
456
|
+
command.request_representation = Google::Apis::DriveV3::Comment::Representation
|
|
457
|
+
command.request_object = comment_object
|
|
458
|
+
command.response_representation = Google::Apis::DriveV3::Comment::Representation
|
|
459
|
+
command.response_class = Google::Apis::DriveV3::Comment
|
|
460
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
461
|
+
command.params['commentId'] = comment_id unless comment_id.nil?
|
|
462
|
+
command.query['fields'] = fields unless fields.nil?
|
|
463
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
464
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
465
|
+
execute_or_queue_command(command, &block)
|
|
466
|
+
end
|
|
467
|
+
|
|
468
|
+
# Creates a copy of a file and applies any requested updates with patch
|
|
469
|
+
# semantics.
|
|
470
|
+
# @param [String] file_id
|
|
471
|
+
# The ID of the file.
|
|
472
|
+
# @param [Google::Apis::DriveV3::File] file_object
|
|
473
|
+
# @param [Boolean] ignore_default_visibility
|
|
474
|
+
# Whether to ignore the domain's default visibility settings for the created
|
|
475
|
+
# file. Domain administrators can choose to make all uploaded files visible to
|
|
476
|
+
# the domain by default; this parameter bypasses that behavior for the request.
|
|
477
|
+
# Permissions are still inherited from parent folders.
|
|
478
|
+
# @param [Boolean] keep_revision_forever
|
|
479
|
+
# Whether to set the 'keepForever' field in the new head revision. This is only
|
|
480
|
+
# applicable to files with binary content in Drive.
|
|
481
|
+
# @param [String] ocr_language
|
|
482
|
+
# A language hint for OCR processing during image import (ISO 639-1 code).
|
|
483
|
+
# @param [String] fields
|
|
484
|
+
# Selector specifying which fields to include in a partial response.
|
|
485
|
+
# @param [String] quota_user
|
|
486
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
487
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
488
|
+
# Overrides userIp if both are provided.
|
|
489
|
+
# @param [String] user_ip
|
|
490
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
491
|
+
# enforce per-user limits.
|
|
492
|
+
# @param [Google::Apis::RequestOptions] options
|
|
493
|
+
# Request-specific options
|
|
494
|
+
#
|
|
495
|
+
# @yield [result, err] Result & error if block supplied
|
|
496
|
+
# @yieldparam result [Google::Apis::DriveV3::File] parsed result object
|
|
497
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
498
|
+
#
|
|
499
|
+
# @return [Google::Apis::DriveV3::File]
|
|
500
|
+
#
|
|
501
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
502
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
503
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
504
|
+
def copy_file(file_id, file_object = nil, ignore_default_visibility: nil, keep_revision_forever: nil, ocr_language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
505
|
+
command = make_simple_command(:post, 'files/{fileId}/copy', options)
|
|
506
|
+
command.request_representation = Google::Apis::DriveV3::File::Representation
|
|
507
|
+
command.request_object = file_object
|
|
508
|
+
command.response_representation = Google::Apis::DriveV3::File::Representation
|
|
509
|
+
command.response_class = Google::Apis::DriveV3::File
|
|
510
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
511
|
+
command.query['ignoreDefaultVisibility'] = ignore_default_visibility unless ignore_default_visibility.nil?
|
|
512
|
+
command.query['keepRevisionForever'] = keep_revision_forever unless keep_revision_forever.nil?
|
|
513
|
+
command.query['ocrLanguage'] = ocr_language unless ocr_language.nil?
|
|
514
|
+
command.query['fields'] = fields unless fields.nil?
|
|
515
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
516
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
517
|
+
execute_or_queue_command(command, &block)
|
|
518
|
+
end
|
|
519
|
+
|
|
520
|
+
# Creates a new file.
|
|
521
|
+
# @param [Google::Apis::DriveV3::File] file_object
|
|
522
|
+
# @param [Boolean] ignore_default_visibility
|
|
523
|
+
# Whether to ignore the domain's default visibility settings for the created
|
|
524
|
+
# file. Domain administrators can choose to make all uploaded files visible to
|
|
525
|
+
# the domain by default; this parameter bypasses that behavior for the request.
|
|
526
|
+
# Permissions are still inherited from parent folders.
|
|
527
|
+
# @param [Boolean] keep_revision_forever
|
|
528
|
+
# Whether to set the 'keepForever' field in the new head revision. This is only
|
|
529
|
+
# applicable to files with binary content in Drive.
|
|
530
|
+
# @param [String] ocr_language
|
|
531
|
+
# A language hint for OCR processing during image import (ISO 639-1 code).
|
|
532
|
+
# @param [Boolean] use_content_as_indexable_text
|
|
533
|
+
# Whether to use the uploaded content as indexable text.
|
|
534
|
+
# @param [String] fields
|
|
535
|
+
# Selector specifying which fields to include in a partial response.
|
|
536
|
+
# @param [String] quota_user
|
|
537
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
538
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
539
|
+
# Overrides userIp if both are provided.
|
|
540
|
+
# @param [String] user_ip
|
|
541
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
542
|
+
# enforce per-user limits.
|
|
543
|
+
# @param [IO, String] upload_source
|
|
544
|
+
# IO stream or filename containing content to upload
|
|
545
|
+
# @param [String] content_type
|
|
546
|
+
# Content type of the uploaded content.
|
|
547
|
+
# @param [Google::Apis::RequestOptions] options
|
|
548
|
+
# Request-specific options
|
|
549
|
+
#
|
|
550
|
+
# @yield [result, err] Result & error if block supplied
|
|
551
|
+
# @yieldparam result [Google::Apis::DriveV3::File] parsed result object
|
|
552
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
553
|
+
#
|
|
554
|
+
# @return [Google::Apis::DriveV3::File]
|
|
555
|
+
#
|
|
556
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
557
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
558
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
559
|
+
def create_file(file_object = nil, ignore_default_visibility: nil, keep_revision_forever: nil, ocr_language: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
|
|
560
|
+
if upload_source.nil?
|
|
561
|
+
command = make_simple_command(:post, 'files', options)
|
|
562
|
+
else
|
|
563
|
+
command = make_upload_command(:post, 'files', options)
|
|
564
|
+
command.upload_source = upload_source
|
|
565
|
+
command.upload_content_type = content_type
|
|
566
|
+
end
|
|
567
|
+
command.request_representation = Google::Apis::DriveV3::File::Representation
|
|
568
|
+
command.request_object = file_object
|
|
569
|
+
command.response_representation = Google::Apis::DriveV3::File::Representation
|
|
570
|
+
command.response_class = Google::Apis::DriveV3::File
|
|
571
|
+
command.query['ignoreDefaultVisibility'] = ignore_default_visibility unless ignore_default_visibility.nil?
|
|
572
|
+
command.query['keepRevisionForever'] = keep_revision_forever unless keep_revision_forever.nil?
|
|
573
|
+
command.query['ocrLanguage'] = ocr_language unless ocr_language.nil?
|
|
574
|
+
command.query['useContentAsIndexableText'] = use_content_as_indexable_text unless use_content_as_indexable_text.nil?
|
|
575
|
+
command.query['fields'] = fields unless fields.nil?
|
|
576
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
577
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
578
|
+
execute_or_queue_command(command, &block)
|
|
579
|
+
end
|
|
580
|
+
|
|
581
|
+
# Permanently deletes a file owned by the user without moving it to the trash.
|
|
582
|
+
# If the target is a folder, all descendants owned by the user are also deleted.
|
|
583
|
+
# @param [String] file_id
|
|
584
|
+
# The ID of the file.
|
|
585
|
+
# @param [String] fields
|
|
586
|
+
# Selector specifying which fields to include in a partial response.
|
|
587
|
+
# @param [String] quota_user
|
|
588
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
589
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
590
|
+
# Overrides userIp if both are provided.
|
|
591
|
+
# @param [String] user_ip
|
|
592
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
593
|
+
# enforce per-user limits.
|
|
594
|
+
# @param [Google::Apis::RequestOptions] options
|
|
595
|
+
# Request-specific options
|
|
596
|
+
#
|
|
597
|
+
# @yield [result, err] Result & error if block supplied
|
|
598
|
+
# @yieldparam result [NilClass] No result returned for this method
|
|
599
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
600
|
+
#
|
|
601
|
+
# @return [void]
|
|
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 delete_file(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
607
|
+
command = make_simple_command(:delete, 'files/{fileId}', options)
|
|
608
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
609
|
+
command.query['fields'] = fields unless fields.nil?
|
|
610
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
611
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
612
|
+
execute_or_queue_command(command, &block)
|
|
613
|
+
end
|
|
614
|
+
|
|
615
|
+
# Permanently deletes all of the user's trashed files.
|
|
616
|
+
# @param [String] fields
|
|
617
|
+
# Selector specifying which fields to include in a partial response.
|
|
618
|
+
# @param [String] quota_user
|
|
619
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
620
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
621
|
+
# Overrides userIp if both are provided.
|
|
622
|
+
# @param [String] user_ip
|
|
623
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
624
|
+
# enforce per-user limits.
|
|
625
|
+
# @param [Google::Apis::RequestOptions] options
|
|
626
|
+
# Request-specific options
|
|
627
|
+
#
|
|
628
|
+
# @yield [result, err] Result & error if block supplied
|
|
629
|
+
# @yieldparam result [NilClass] No result returned for this method
|
|
630
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
631
|
+
#
|
|
632
|
+
# @return [void]
|
|
633
|
+
#
|
|
634
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
635
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
636
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
637
|
+
def empty_file_trash(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
638
|
+
command = make_simple_command(:delete, 'files/trash', options)
|
|
639
|
+
command.query['fields'] = fields unless fields.nil?
|
|
640
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
641
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
642
|
+
execute_or_queue_command(command, &block)
|
|
643
|
+
end
|
|
644
|
+
|
|
645
|
+
# Exports a Google Doc to the requested MIME type.
|
|
646
|
+
# @param [String] file_id
|
|
647
|
+
# The ID of the file.
|
|
648
|
+
# @param [String] mime_type
|
|
649
|
+
# The MIME type of the format requested for this export.
|
|
650
|
+
# @param [String] fields
|
|
651
|
+
# Selector specifying which fields to include in a partial response.
|
|
652
|
+
# @param [String] quota_user
|
|
653
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
654
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
655
|
+
# Overrides userIp if both are provided.
|
|
656
|
+
# @param [String] user_ip
|
|
657
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
658
|
+
# enforce per-user limits.
|
|
659
|
+
# @param [IO, String] download_dest
|
|
660
|
+
# IO stream or filename to receive content download
|
|
661
|
+
# @param [Google::Apis::RequestOptions] options
|
|
662
|
+
# Request-specific options
|
|
663
|
+
#
|
|
664
|
+
# @yield [result, err] Result & error if block supplied
|
|
665
|
+
# @yieldparam result [NilClass] No result returned for this method
|
|
666
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
667
|
+
#
|
|
668
|
+
# @return [void]
|
|
669
|
+
#
|
|
670
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
671
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
672
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
673
|
+
def export_file(file_id, mime_type, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
|
|
674
|
+
if download_dest.nil?
|
|
675
|
+
command = make_simple_command(:get, 'files/{fileId}/export', options)
|
|
676
|
+
else
|
|
677
|
+
command = make_download_command(:get, 'files/{fileId}/export', options)
|
|
678
|
+
command.download_dest = download_dest
|
|
679
|
+
end
|
|
680
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
681
|
+
command.query['mimeType'] = mime_type unless mime_type.nil?
|
|
682
|
+
command.query['fields'] = fields unless fields.nil?
|
|
683
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
684
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
685
|
+
execute_or_queue_command(command, &block)
|
|
686
|
+
end
|
|
687
|
+
|
|
688
|
+
# Generates a set of file IDs which can be provided in create requests.
|
|
689
|
+
# @param [Fixnum] count
|
|
690
|
+
# The number of IDs to return.
|
|
691
|
+
# @param [String] space
|
|
692
|
+
# The space in which the IDs can be used to create new files. Supported values
|
|
693
|
+
# are 'drive' and 'appDataFolder'.
|
|
694
|
+
# @param [String] fields
|
|
695
|
+
# Selector specifying which fields to include in a partial response.
|
|
696
|
+
# @param [String] quota_user
|
|
697
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
698
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
699
|
+
# Overrides userIp if both are provided.
|
|
700
|
+
# @param [String] user_ip
|
|
701
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
702
|
+
# enforce per-user limits.
|
|
703
|
+
# @param [Google::Apis::RequestOptions] options
|
|
704
|
+
# Request-specific options
|
|
705
|
+
#
|
|
706
|
+
# @yield [result, err] Result & error if block supplied
|
|
707
|
+
# @yieldparam result [Google::Apis::DriveV3::GeneratedIds] parsed result object
|
|
708
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
709
|
+
#
|
|
710
|
+
# @return [Google::Apis::DriveV3::GeneratedIds]
|
|
711
|
+
#
|
|
712
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
713
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
714
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
715
|
+
def generate_file_ids(count: nil, space: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
716
|
+
command = make_simple_command(:get, 'files/generateIds', options)
|
|
717
|
+
command.response_representation = Google::Apis::DriveV3::GeneratedIds::Representation
|
|
718
|
+
command.response_class = Google::Apis::DriveV3::GeneratedIds
|
|
719
|
+
command.query['count'] = count unless count.nil?
|
|
720
|
+
command.query['space'] = space unless space.nil?
|
|
721
|
+
command.query['fields'] = fields unless fields.nil?
|
|
722
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
723
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
724
|
+
execute_or_queue_command(command, &block)
|
|
725
|
+
end
|
|
726
|
+
|
|
727
|
+
# Gets a file's metadata or content by ID.
|
|
728
|
+
# @param [String] file_id
|
|
729
|
+
# The ID of the file.
|
|
730
|
+
# @param [Boolean] acknowledge_abuse
|
|
731
|
+
# Whether the user is acknowledging the risk of downloading known malware or
|
|
732
|
+
# other abusive files. This is only applicable when alt=media.
|
|
733
|
+
# @param [String] fields
|
|
734
|
+
# Selector specifying which fields to include in a partial response.
|
|
735
|
+
# @param [String] quota_user
|
|
736
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
737
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
738
|
+
# Overrides userIp if both are provided.
|
|
739
|
+
# @param [String] user_ip
|
|
740
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
741
|
+
# enforce per-user limits.
|
|
742
|
+
# @param [IO, String] download_dest
|
|
743
|
+
# IO stream or filename to receive content download
|
|
744
|
+
# @param [Google::Apis::RequestOptions] options
|
|
745
|
+
# Request-specific options
|
|
746
|
+
#
|
|
747
|
+
# @yield [result, err] Result & error if block supplied
|
|
748
|
+
# @yieldparam result [Google::Apis::DriveV3::File] parsed result object
|
|
749
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
750
|
+
#
|
|
751
|
+
# @return [Google::Apis::DriveV3::File]
|
|
752
|
+
#
|
|
753
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
754
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
755
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
756
|
+
def get_file(file_id, acknowledge_abuse: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
|
|
757
|
+
if download_dest.nil?
|
|
758
|
+
command = make_simple_command(:get, 'files/{fileId}', options)
|
|
759
|
+
else
|
|
760
|
+
command = make_download_command(:get, 'files/{fileId}', options)
|
|
761
|
+
command.download_dest = download_dest
|
|
762
|
+
end
|
|
763
|
+
command.response_representation = Google::Apis::DriveV3::File::Representation
|
|
764
|
+
command.response_class = Google::Apis::DriveV3::File
|
|
765
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
766
|
+
command.query['acknowledgeAbuse'] = acknowledge_abuse unless acknowledge_abuse.nil?
|
|
767
|
+
command.query['fields'] = fields unless fields.nil?
|
|
768
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
769
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
770
|
+
execute_or_queue_command(command, &block)
|
|
771
|
+
end
|
|
772
|
+
|
|
773
|
+
# Lists or searches files.
|
|
774
|
+
# @param [String] corpus
|
|
775
|
+
# The source of files to list.
|
|
776
|
+
# @param [String] order_by
|
|
777
|
+
# A comma-separated list of sort keys. Valid keys are 'createdTime', 'folder', '
|
|
778
|
+
# modifiedByMeTime', 'modifiedTime', 'name', 'quotaBytesUsed', 'recency', '
|
|
779
|
+
# sharedWithMeTime', 'starred', and 'viewedByMeTime'. Each key sorts ascending
|
|
780
|
+
# by default, but may be reversed with the 'desc' modifier. Example usage: ?
|
|
781
|
+
# orderBy=folder,modifiedTime desc,name. Please note that there is a current
|
|
782
|
+
# limitation for users with approximately one million files in which the
|
|
783
|
+
# requested sort order is ignored.
|
|
784
|
+
# @param [Fixnum] page_size
|
|
785
|
+
# The maximum number of files to return per page.
|
|
786
|
+
# @param [String] page_token
|
|
787
|
+
# The token for continuing a previous list request on the next page. This should
|
|
788
|
+
# be set to the value of 'nextPageToken' from the previous response.
|
|
789
|
+
# @param [String] q
|
|
790
|
+
# A query for filtering the file results. See the "Search for Files" guide for
|
|
791
|
+
# supported syntax.
|
|
792
|
+
# @param [String] spaces
|
|
793
|
+
# A comma-separated list of spaces to query within the corpus. Supported values
|
|
794
|
+
# are 'drive', 'appDataFolder' and 'photos'.
|
|
795
|
+
# @param [String] fields
|
|
796
|
+
# Selector specifying which fields to include in a partial response.
|
|
797
|
+
# @param [String] quota_user
|
|
798
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
799
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
800
|
+
# Overrides userIp if both are provided.
|
|
801
|
+
# @param [String] user_ip
|
|
802
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
803
|
+
# enforce per-user limits.
|
|
804
|
+
# @param [Google::Apis::RequestOptions] options
|
|
805
|
+
# Request-specific options
|
|
806
|
+
#
|
|
807
|
+
# @yield [result, err] Result & error if block supplied
|
|
808
|
+
# @yieldparam result [Google::Apis::DriveV3::FileList] parsed result object
|
|
809
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
810
|
+
#
|
|
811
|
+
# @return [Google::Apis::DriveV3::FileList]
|
|
812
|
+
#
|
|
813
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
814
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
815
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
816
|
+
def list_files(corpus: nil, order_by: nil, page_size: nil, page_token: nil, q: nil, spaces: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
817
|
+
command = make_simple_command(:get, 'files', options)
|
|
818
|
+
command.response_representation = Google::Apis::DriveV3::FileList::Representation
|
|
819
|
+
command.response_class = Google::Apis::DriveV3::FileList
|
|
820
|
+
command.query['corpus'] = corpus unless corpus.nil?
|
|
821
|
+
command.query['orderBy'] = order_by unless order_by.nil?
|
|
822
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
|
823
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
824
|
+
command.query['q'] = q unless q.nil?
|
|
825
|
+
command.query['spaces'] = spaces unless spaces.nil?
|
|
826
|
+
command.query['fields'] = fields unless fields.nil?
|
|
827
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
828
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
829
|
+
execute_or_queue_command(command, &block)
|
|
830
|
+
end
|
|
831
|
+
|
|
832
|
+
# Updates a file's metadata and/or content with patch semantics.
|
|
833
|
+
# @param [String] file_id
|
|
834
|
+
# The ID of the file.
|
|
835
|
+
# @param [Google::Apis::DriveV3::File] file_object
|
|
836
|
+
# @param [String] add_parents
|
|
837
|
+
# A comma-separated list of parent IDs to add.
|
|
838
|
+
# @param [Boolean] keep_revision_forever
|
|
839
|
+
# Whether to set the 'keepForever' field in the new head revision. This is only
|
|
840
|
+
# applicable to files with binary content in Drive.
|
|
841
|
+
# @param [String] ocr_language
|
|
842
|
+
# A language hint for OCR processing during image import (ISO 639-1 code).
|
|
843
|
+
# @param [String] remove_parents
|
|
844
|
+
# A comma-separated list of parent IDs to remove.
|
|
845
|
+
# @param [Boolean] use_content_as_indexable_text
|
|
846
|
+
# Whether to use the uploaded content as indexable text.
|
|
847
|
+
# @param [String] fields
|
|
848
|
+
# Selector specifying which fields to include in a partial response.
|
|
849
|
+
# @param [String] quota_user
|
|
850
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
851
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
852
|
+
# Overrides userIp if both are provided.
|
|
853
|
+
# @param [String] user_ip
|
|
854
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
855
|
+
# enforce per-user limits.
|
|
856
|
+
# @param [IO, String] upload_source
|
|
857
|
+
# IO stream or filename containing content to upload
|
|
858
|
+
# @param [String] content_type
|
|
859
|
+
# Content type of the uploaded content.
|
|
860
|
+
# @param [Google::Apis::RequestOptions] options
|
|
861
|
+
# Request-specific options
|
|
862
|
+
#
|
|
863
|
+
# @yield [result, err] Result & error if block supplied
|
|
864
|
+
# @yieldparam result [Google::Apis::DriveV3::File] parsed result object
|
|
865
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
866
|
+
#
|
|
867
|
+
# @return [Google::Apis::DriveV3::File]
|
|
868
|
+
#
|
|
869
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
870
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
871
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
872
|
+
def update_file(file_id, file_object = nil, add_parents: nil, keep_revision_forever: nil, ocr_language: nil, remove_parents: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
|
|
873
|
+
if upload_source.nil?
|
|
874
|
+
command = make_simple_command(:patch, 'files/{fileId}', options)
|
|
875
|
+
else
|
|
876
|
+
command = make_upload_command(:patch, 'files/{fileId}', options)
|
|
877
|
+
command.upload_source = upload_source
|
|
878
|
+
command.upload_content_type = content_type
|
|
879
|
+
end
|
|
880
|
+
command.request_representation = Google::Apis::DriveV3::File::Representation
|
|
881
|
+
command.request_object = file_object
|
|
882
|
+
command.response_representation = Google::Apis::DriveV3::File::Representation
|
|
883
|
+
command.response_class = Google::Apis::DriveV3::File
|
|
884
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
885
|
+
command.query['addParents'] = add_parents unless add_parents.nil?
|
|
886
|
+
command.query['keepRevisionForever'] = keep_revision_forever unless keep_revision_forever.nil?
|
|
887
|
+
command.query['ocrLanguage'] = ocr_language unless ocr_language.nil?
|
|
888
|
+
command.query['removeParents'] = remove_parents unless remove_parents.nil?
|
|
889
|
+
command.query['useContentAsIndexableText'] = use_content_as_indexable_text unless use_content_as_indexable_text.nil?
|
|
890
|
+
command.query['fields'] = fields unless fields.nil?
|
|
891
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
892
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
893
|
+
execute_or_queue_command(command, &block)
|
|
894
|
+
end
|
|
895
|
+
|
|
896
|
+
# Subscribes to changes to a file
|
|
897
|
+
# @param [String] file_id
|
|
898
|
+
# The ID of the file.
|
|
899
|
+
# @param [Google::Apis::DriveV3::Channel] channel_object
|
|
900
|
+
# @param [Boolean] acknowledge_abuse
|
|
901
|
+
# Whether the user is acknowledging the risk of downloading known malware or
|
|
902
|
+
# other abusive files. This is only applicable when alt=media.
|
|
903
|
+
# @param [String] fields
|
|
904
|
+
# Selector specifying which fields to include in a partial response.
|
|
905
|
+
# @param [String] quota_user
|
|
906
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
907
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
908
|
+
# Overrides userIp if both are provided.
|
|
909
|
+
# @param [String] user_ip
|
|
910
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
911
|
+
# enforce per-user limits.
|
|
912
|
+
# @param [IO, String] download_dest
|
|
913
|
+
# IO stream or filename to receive content download
|
|
914
|
+
# @param [Google::Apis::RequestOptions] options
|
|
915
|
+
# Request-specific options
|
|
916
|
+
#
|
|
917
|
+
# @yield [result, err] Result & error if block supplied
|
|
918
|
+
# @yieldparam result [Google::Apis::DriveV3::Channel] parsed result object
|
|
919
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
920
|
+
#
|
|
921
|
+
# @return [Google::Apis::DriveV3::Channel]
|
|
922
|
+
#
|
|
923
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
924
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
925
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
926
|
+
def watch_file(file_id, channel_object = nil, acknowledge_abuse: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
|
|
927
|
+
if download_dest.nil?
|
|
928
|
+
command = make_simple_command(:post, 'files/{fileId}/watch', options)
|
|
929
|
+
else
|
|
930
|
+
command = make_download_command(:post, 'files/{fileId}/watch', options)
|
|
931
|
+
command.download_dest = download_dest
|
|
932
|
+
end
|
|
933
|
+
command.request_representation = Google::Apis::DriveV3::Channel::Representation
|
|
934
|
+
command.request_object = channel_object
|
|
935
|
+
command.response_representation = Google::Apis::DriveV3::Channel::Representation
|
|
936
|
+
command.response_class = Google::Apis::DriveV3::Channel
|
|
937
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
938
|
+
command.query['acknowledgeAbuse'] = acknowledge_abuse unless acknowledge_abuse.nil?
|
|
939
|
+
command.query['fields'] = fields unless fields.nil?
|
|
940
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
941
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
942
|
+
execute_or_queue_command(command, &block)
|
|
943
|
+
end
|
|
944
|
+
|
|
945
|
+
# Creates a permission for a file.
|
|
946
|
+
# @param [String] file_id
|
|
947
|
+
# The ID of the file.
|
|
948
|
+
# @param [Google::Apis::DriveV3::Permission] permission_object
|
|
949
|
+
# @param [String] email_message
|
|
950
|
+
# A custom message to include in the notification email.
|
|
951
|
+
# @param [Boolean] send_notification_email
|
|
952
|
+
# Whether to send a notification email when sharing to users or groups. This
|
|
953
|
+
# defaults to true for users and groups, and is not allowed for other requests.
|
|
954
|
+
# It must not be disabled for ownership transfers.
|
|
955
|
+
# @param [Boolean] transfer_ownership
|
|
956
|
+
# Whether to transfer ownership to the specified user and downgrade the current
|
|
957
|
+
# owner to a writer. This parameter is required as an acknowledgement of the
|
|
958
|
+
# side effect.
|
|
959
|
+
# @param [String] fields
|
|
960
|
+
# Selector specifying which fields to include in a partial response.
|
|
961
|
+
# @param [String] quota_user
|
|
962
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
963
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
964
|
+
# Overrides userIp if both are provided.
|
|
965
|
+
# @param [String] user_ip
|
|
966
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
967
|
+
# enforce per-user limits.
|
|
968
|
+
# @param [Google::Apis::RequestOptions] options
|
|
969
|
+
# Request-specific options
|
|
970
|
+
#
|
|
971
|
+
# @yield [result, err] Result & error if block supplied
|
|
972
|
+
# @yieldparam result [Google::Apis::DriveV3::Permission] parsed result object
|
|
973
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
974
|
+
#
|
|
975
|
+
# @return [Google::Apis::DriveV3::Permission]
|
|
976
|
+
#
|
|
977
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
978
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
979
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
980
|
+
def create_permission(file_id, permission_object = nil, email_message: nil, send_notification_email: nil, transfer_ownership: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
981
|
+
command = make_simple_command(:post, 'files/{fileId}/permissions', options)
|
|
982
|
+
command.request_representation = Google::Apis::DriveV3::Permission::Representation
|
|
983
|
+
command.request_object = permission_object
|
|
984
|
+
command.response_representation = Google::Apis::DriveV3::Permission::Representation
|
|
985
|
+
command.response_class = Google::Apis::DriveV3::Permission
|
|
986
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
987
|
+
command.query['emailMessage'] = email_message unless email_message.nil?
|
|
988
|
+
command.query['sendNotificationEmail'] = send_notification_email unless send_notification_email.nil?
|
|
989
|
+
command.query['transferOwnership'] = transfer_ownership unless transfer_ownership.nil?
|
|
990
|
+
command.query['fields'] = fields unless fields.nil?
|
|
991
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
992
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
993
|
+
execute_or_queue_command(command, &block)
|
|
994
|
+
end
|
|
995
|
+
|
|
996
|
+
# Deletes a permission.
|
|
997
|
+
# @param [String] file_id
|
|
998
|
+
# The ID of the file.
|
|
999
|
+
# @param [String] permission_id
|
|
1000
|
+
# The ID of the permission.
|
|
1001
|
+
# @param [String] fields
|
|
1002
|
+
# Selector specifying which fields to include in a partial response.
|
|
1003
|
+
# @param [String] quota_user
|
|
1004
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1005
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1006
|
+
# Overrides userIp if both are provided.
|
|
1007
|
+
# @param [String] user_ip
|
|
1008
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1009
|
+
# enforce per-user limits.
|
|
1010
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1011
|
+
# Request-specific options
|
|
1012
|
+
#
|
|
1013
|
+
# @yield [result, err] Result & error if block supplied
|
|
1014
|
+
# @yieldparam result [NilClass] No result returned for this method
|
|
1015
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1016
|
+
#
|
|
1017
|
+
# @return [void]
|
|
1018
|
+
#
|
|
1019
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1020
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1021
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1022
|
+
def delete_permission(file_id, permission_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
1023
|
+
command = make_simple_command(:delete, 'files/{fileId}/permissions/{permissionId}', options)
|
|
1024
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
1025
|
+
command.params['permissionId'] = permission_id unless permission_id.nil?
|
|
1026
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1027
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1028
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1029
|
+
execute_or_queue_command(command, &block)
|
|
1030
|
+
end
|
|
1031
|
+
|
|
1032
|
+
# Gets a permission by ID.
|
|
1033
|
+
# @param [String] file_id
|
|
1034
|
+
# The ID of the file.
|
|
1035
|
+
# @param [String] permission_id
|
|
1036
|
+
# The ID of the permission.
|
|
1037
|
+
# @param [String] fields
|
|
1038
|
+
# Selector specifying which fields to include in a partial response.
|
|
1039
|
+
# @param [String] quota_user
|
|
1040
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1041
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1042
|
+
# Overrides userIp if both are provided.
|
|
1043
|
+
# @param [String] user_ip
|
|
1044
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1045
|
+
# enforce per-user limits.
|
|
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::DriveV3::Permission] parsed result object
|
|
1051
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1052
|
+
#
|
|
1053
|
+
# @return [Google::Apis::DriveV3::Permission]
|
|
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 get_permission(file_id, permission_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
1059
|
+
command = make_simple_command(:get, 'files/{fileId}/permissions/{permissionId}', options)
|
|
1060
|
+
command.response_representation = Google::Apis::DriveV3::Permission::Representation
|
|
1061
|
+
command.response_class = Google::Apis::DriveV3::Permission
|
|
1062
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
1063
|
+
command.params['permissionId'] = permission_id unless permission_id.nil?
|
|
1064
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1065
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1066
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1067
|
+
execute_or_queue_command(command, &block)
|
|
1068
|
+
end
|
|
1069
|
+
|
|
1070
|
+
# Lists a file's permissions.
|
|
1071
|
+
# @param [String] file_id
|
|
1072
|
+
# The ID of the file.
|
|
1073
|
+
# @param [String] fields
|
|
1074
|
+
# Selector specifying which fields to include in a partial response.
|
|
1075
|
+
# @param [String] quota_user
|
|
1076
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1077
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1078
|
+
# Overrides userIp if both are provided.
|
|
1079
|
+
# @param [String] user_ip
|
|
1080
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1081
|
+
# enforce per-user limits.
|
|
1082
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1083
|
+
# Request-specific options
|
|
1084
|
+
#
|
|
1085
|
+
# @yield [result, err] Result & error if block supplied
|
|
1086
|
+
# @yieldparam result [Google::Apis::DriveV3::PermissionList] parsed result object
|
|
1087
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1088
|
+
#
|
|
1089
|
+
# @return [Google::Apis::DriveV3::PermissionList]
|
|
1090
|
+
#
|
|
1091
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1092
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1093
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1094
|
+
def list_permissions(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
1095
|
+
command = make_simple_command(:get, 'files/{fileId}/permissions', options)
|
|
1096
|
+
command.response_representation = Google::Apis::DriveV3::PermissionList::Representation
|
|
1097
|
+
command.response_class = Google::Apis::DriveV3::PermissionList
|
|
1098
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
1099
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1100
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1101
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1102
|
+
execute_or_queue_command(command, &block)
|
|
1103
|
+
end
|
|
1104
|
+
|
|
1105
|
+
# Updates a permission with patch semantics.
|
|
1106
|
+
# @param [String] file_id
|
|
1107
|
+
# The ID of the file.
|
|
1108
|
+
# @param [String] permission_id
|
|
1109
|
+
# The ID of the permission.
|
|
1110
|
+
# @param [Google::Apis::DriveV3::Permission] permission_object
|
|
1111
|
+
# @param [Boolean] transfer_ownership
|
|
1112
|
+
# Whether to transfer ownership to the specified user and downgrade the current
|
|
1113
|
+
# owner to a writer. This parameter is required as an acknowledgement of the
|
|
1114
|
+
# side effect.
|
|
1115
|
+
# @param [String] fields
|
|
1116
|
+
# Selector specifying which fields to include in a partial response.
|
|
1117
|
+
# @param [String] quota_user
|
|
1118
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1119
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1120
|
+
# Overrides userIp if both are provided.
|
|
1121
|
+
# @param [String] user_ip
|
|
1122
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1123
|
+
# enforce per-user limits.
|
|
1124
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1125
|
+
# Request-specific options
|
|
1126
|
+
#
|
|
1127
|
+
# @yield [result, err] Result & error if block supplied
|
|
1128
|
+
# @yieldparam result [Google::Apis::DriveV3::Permission] parsed result object
|
|
1129
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1130
|
+
#
|
|
1131
|
+
# @return [Google::Apis::DriveV3::Permission]
|
|
1132
|
+
#
|
|
1133
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1134
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1135
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1136
|
+
def update_permission(file_id, permission_id, permission_object = nil, transfer_ownership: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
1137
|
+
command = make_simple_command(:patch, 'files/{fileId}/permissions/{permissionId}', options)
|
|
1138
|
+
command.request_representation = Google::Apis::DriveV3::Permission::Representation
|
|
1139
|
+
command.request_object = permission_object
|
|
1140
|
+
command.response_representation = Google::Apis::DriveV3::Permission::Representation
|
|
1141
|
+
command.response_class = Google::Apis::DriveV3::Permission
|
|
1142
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
1143
|
+
command.params['permissionId'] = permission_id unless permission_id.nil?
|
|
1144
|
+
command.query['transferOwnership'] = transfer_ownership unless transfer_ownership.nil?
|
|
1145
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1146
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1147
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1148
|
+
execute_or_queue_command(command, &block)
|
|
1149
|
+
end
|
|
1150
|
+
|
|
1151
|
+
# Creates a new reply to a comment.
|
|
1152
|
+
# @param [String] file_id
|
|
1153
|
+
# The ID of the file.
|
|
1154
|
+
# @param [String] comment_id
|
|
1155
|
+
# The ID of the comment.
|
|
1156
|
+
# @param [Google::Apis::DriveV3::Reply] reply_object
|
|
1157
|
+
# @param [String] fields
|
|
1158
|
+
# Selector specifying which fields to include in a partial response.
|
|
1159
|
+
# @param [String] quota_user
|
|
1160
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1161
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1162
|
+
# Overrides userIp if both are provided.
|
|
1163
|
+
# @param [String] user_ip
|
|
1164
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1165
|
+
# enforce per-user limits.
|
|
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::DriveV3::Reply] parsed result object
|
|
1171
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1172
|
+
#
|
|
1173
|
+
# @return [Google::Apis::DriveV3::Reply]
|
|
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 create_reply(file_id, comment_id, reply_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
1179
|
+
command = make_simple_command(:post, 'files/{fileId}/comments/{commentId}/replies', options)
|
|
1180
|
+
command.request_representation = Google::Apis::DriveV3::Reply::Representation
|
|
1181
|
+
command.request_object = reply_object
|
|
1182
|
+
command.response_representation = Google::Apis::DriveV3::Reply::Representation
|
|
1183
|
+
command.response_class = Google::Apis::DriveV3::Reply
|
|
1184
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
1185
|
+
command.params['commentId'] = comment_id unless comment_id.nil?
|
|
1186
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1187
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1188
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1189
|
+
execute_or_queue_command(command, &block)
|
|
1190
|
+
end
|
|
1191
|
+
|
|
1192
|
+
# Deletes a reply.
|
|
1193
|
+
# @param [String] file_id
|
|
1194
|
+
# The ID of the file.
|
|
1195
|
+
# @param [String] comment_id
|
|
1196
|
+
# The ID of the comment.
|
|
1197
|
+
# @param [String] reply_id
|
|
1198
|
+
# The ID of the reply.
|
|
1199
|
+
# @param [String] fields
|
|
1200
|
+
# Selector specifying which fields to include in a partial response.
|
|
1201
|
+
# @param [String] quota_user
|
|
1202
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1203
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1204
|
+
# Overrides userIp if both are provided.
|
|
1205
|
+
# @param [String] user_ip
|
|
1206
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1207
|
+
# enforce per-user limits.
|
|
1208
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1209
|
+
# Request-specific options
|
|
1210
|
+
#
|
|
1211
|
+
# @yield [result, err] Result & error if block supplied
|
|
1212
|
+
# @yieldparam result [NilClass] No result returned for this method
|
|
1213
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1214
|
+
#
|
|
1215
|
+
# @return [void]
|
|
1216
|
+
#
|
|
1217
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1218
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1219
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1220
|
+
def delete_reply(file_id, comment_id, reply_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
1221
|
+
command = make_simple_command(:delete, 'files/{fileId}/comments/{commentId}/replies/{replyId}', options)
|
|
1222
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
1223
|
+
command.params['commentId'] = comment_id unless comment_id.nil?
|
|
1224
|
+
command.params['replyId'] = reply_id unless reply_id.nil?
|
|
1225
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1226
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1227
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1228
|
+
execute_or_queue_command(command, &block)
|
|
1229
|
+
end
|
|
1230
|
+
|
|
1231
|
+
# Gets a reply by ID.
|
|
1232
|
+
# @param [String] file_id
|
|
1233
|
+
# The ID of the file.
|
|
1234
|
+
# @param [String] comment_id
|
|
1235
|
+
# The ID of the comment.
|
|
1236
|
+
# @param [String] reply_id
|
|
1237
|
+
# The ID of the reply.
|
|
1238
|
+
# @param [Boolean] include_deleted
|
|
1239
|
+
# Whether to return deleted replies. Deleted replies will not include their
|
|
1240
|
+
# original content.
|
|
1241
|
+
# @param [String] fields
|
|
1242
|
+
# Selector specifying which fields to include in a partial response.
|
|
1243
|
+
# @param [String] quota_user
|
|
1244
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1245
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1246
|
+
# Overrides userIp if both are provided.
|
|
1247
|
+
# @param [String] user_ip
|
|
1248
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1249
|
+
# enforce per-user limits.
|
|
1250
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1251
|
+
# Request-specific options
|
|
1252
|
+
#
|
|
1253
|
+
# @yield [result, err] Result & error if block supplied
|
|
1254
|
+
# @yieldparam result [Google::Apis::DriveV3::Reply] parsed result object
|
|
1255
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1256
|
+
#
|
|
1257
|
+
# @return [Google::Apis::DriveV3::Reply]
|
|
1258
|
+
#
|
|
1259
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1260
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1261
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1262
|
+
def get_reply(file_id, comment_id, reply_id, include_deleted: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
1263
|
+
command = make_simple_command(:get, 'files/{fileId}/comments/{commentId}/replies/{replyId}', options)
|
|
1264
|
+
command.response_representation = Google::Apis::DriveV3::Reply::Representation
|
|
1265
|
+
command.response_class = Google::Apis::DriveV3::Reply
|
|
1266
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
1267
|
+
command.params['commentId'] = comment_id unless comment_id.nil?
|
|
1268
|
+
command.params['replyId'] = reply_id unless reply_id.nil?
|
|
1269
|
+
command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
|
|
1270
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1271
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1272
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1273
|
+
execute_or_queue_command(command, &block)
|
|
1274
|
+
end
|
|
1275
|
+
|
|
1276
|
+
# Lists a comment's replies.
|
|
1277
|
+
# @param [String] file_id
|
|
1278
|
+
# The ID of the file.
|
|
1279
|
+
# @param [String] comment_id
|
|
1280
|
+
# The ID of the comment.
|
|
1281
|
+
# @param [Boolean] include_deleted
|
|
1282
|
+
# Whether to include deleted replies. Deleted replies will not include their
|
|
1283
|
+
# original content.
|
|
1284
|
+
# @param [Fixnum] page_size
|
|
1285
|
+
# The maximum number of replies to return per page.
|
|
1286
|
+
# @param [String] page_token
|
|
1287
|
+
# The token for continuing a previous list request on the next page. This should
|
|
1288
|
+
# be set to the value of 'nextPageToken' from the previous response.
|
|
1289
|
+
# @param [String] fields
|
|
1290
|
+
# Selector specifying which fields to include in a partial response.
|
|
1291
|
+
# @param [String] quota_user
|
|
1292
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1293
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1294
|
+
# Overrides userIp if both are provided.
|
|
1295
|
+
# @param [String] user_ip
|
|
1296
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1297
|
+
# enforce per-user limits.
|
|
1298
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1299
|
+
# Request-specific options
|
|
1300
|
+
#
|
|
1301
|
+
# @yield [result, err] Result & error if block supplied
|
|
1302
|
+
# @yieldparam result [Google::Apis::DriveV3::ReplyList] parsed result object
|
|
1303
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1304
|
+
#
|
|
1305
|
+
# @return [Google::Apis::DriveV3::ReplyList]
|
|
1306
|
+
#
|
|
1307
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1308
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1309
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1310
|
+
def list_replies(file_id, comment_id, include_deleted: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
1311
|
+
command = make_simple_command(:get, 'files/{fileId}/comments/{commentId}/replies', options)
|
|
1312
|
+
command.response_representation = Google::Apis::DriveV3::ReplyList::Representation
|
|
1313
|
+
command.response_class = Google::Apis::DriveV3::ReplyList
|
|
1314
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
1315
|
+
command.params['commentId'] = comment_id unless comment_id.nil?
|
|
1316
|
+
command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
|
|
1317
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
|
1318
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
1319
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1320
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1321
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1322
|
+
execute_or_queue_command(command, &block)
|
|
1323
|
+
end
|
|
1324
|
+
|
|
1325
|
+
# Updates a reply with patch semantics.
|
|
1326
|
+
# @param [String] file_id
|
|
1327
|
+
# The ID of the file.
|
|
1328
|
+
# @param [String] comment_id
|
|
1329
|
+
# The ID of the comment.
|
|
1330
|
+
# @param [String] reply_id
|
|
1331
|
+
# The ID of the reply.
|
|
1332
|
+
# @param [Google::Apis::DriveV3::Reply] reply_object
|
|
1333
|
+
# @param [String] fields
|
|
1334
|
+
# Selector specifying which fields to include in a partial response.
|
|
1335
|
+
# @param [String] quota_user
|
|
1336
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1337
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1338
|
+
# Overrides userIp if both are provided.
|
|
1339
|
+
# @param [String] user_ip
|
|
1340
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1341
|
+
# enforce per-user limits.
|
|
1342
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1343
|
+
# Request-specific options
|
|
1344
|
+
#
|
|
1345
|
+
# @yield [result, err] Result & error if block supplied
|
|
1346
|
+
# @yieldparam result [Google::Apis::DriveV3::Reply] parsed result object
|
|
1347
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1348
|
+
#
|
|
1349
|
+
# @return [Google::Apis::DriveV3::Reply]
|
|
1350
|
+
#
|
|
1351
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1352
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1353
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1354
|
+
def update_reply(file_id, comment_id, reply_id, reply_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
1355
|
+
command = make_simple_command(:patch, 'files/{fileId}/comments/{commentId}/replies/{replyId}', options)
|
|
1356
|
+
command.request_representation = Google::Apis::DriveV3::Reply::Representation
|
|
1357
|
+
command.request_object = reply_object
|
|
1358
|
+
command.response_representation = Google::Apis::DriveV3::Reply::Representation
|
|
1359
|
+
command.response_class = Google::Apis::DriveV3::Reply
|
|
1360
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
1361
|
+
command.params['commentId'] = comment_id unless comment_id.nil?
|
|
1362
|
+
command.params['replyId'] = reply_id unless reply_id.nil?
|
|
1363
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1364
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1365
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1366
|
+
execute_or_queue_command(command, &block)
|
|
1367
|
+
end
|
|
1368
|
+
|
|
1369
|
+
# Permanently deletes a revision. This method is only applicable to files with
|
|
1370
|
+
# binary content in Drive.
|
|
1371
|
+
# @param [String] file_id
|
|
1372
|
+
# The ID of the file.
|
|
1373
|
+
# @param [String] revision_id
|
|
1374
|
+
# The ID of the revision.
|
|
1375
|
+
# @param [String] fields
|
|
1376
|
+
# Selector specifying which fields to include in a partial response.
|
|
1377
|
+
# @param [String] quota_user
|
|
1378
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1379
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1380
|
+
# Overrides userIp if both are provided.
|
|
1381
|
+
# @param [String] user_ip
|
|
1382
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1383
|
+
# enforce per-user limits.
|
|
1384
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1385
|
+
# Request-specific options
|
|
1386
|
+
#
|
|
1387
|
+
# @yield [result, err] Result & error if block supplied
|
|
1388
|
+
# @yieldparam result [NilClass] No result returned for this method
|
|
1389
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1390
|
+
#
|
|
1391
|
+
# @return [void]
|
|
1392
|
+
#
|
|
1393
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1394
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1395
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1396
|
+
def delete_revision(file_id, revision_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
1397
|
+
command = make_simple_command(:delete, 'files/{fileId}/revisions/{revisionId}', options)
|
|
1398
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
1399
|
+
command.params['revisionId'] = revision_id unless revision_id.nil?
|
|
1400
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1401
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1402
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1403
|
+
execute_or_queue_command(command, &block)
|
|
1404
|
+
end
|
|
1405
|
+
|
|
1406
|
+
# Gets a revision's metadata or content by ID.
|
|
1407
|
+
# @param [String] file_id
|
|
1408
|
+
# The ID of the file.
|
|
1409
|
+
# @param [String] revision_id
|
|
1410
|
+
# The ID of the revision.
|
|
1411
|
+
# @param [Boolean] acknowledge_abuse
|
|
1412
|
+
# Whether the user is acknowledging the risk of downloading known malware or
|
|
1413
|
+
# other abusive files. This is only applicable when alt=media.
|
|
1414
|
+
# @param [String] fields
|
|
1415
|
+
# Selector specifying which fields to include in a partial response.
|
|
1416
|
+
# @param [String] quota_user
|
|
1417
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1418
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1419
|
+
# Overrides userIp if both are provided.
|
|
1420
|
+
# @param [String] user_ip
|
|
1421
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1422
|
+
# enforce per-user limits.
|
|
1423
|
+
# @param [IO, String] download_dest
|
|
1424
|
+
# IO stream or filename to receive content download
|
|
1425
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1426
|
+
# Request-specific options
|
|
1427
|
+
#
|
|
1428
|
+
# @yield [result, err] Result & error if block supplied
|
|
1429
|
+
# @yieldparam result [Google::Apis::DriveV3::Revision] parsed result object
|
|
1430
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1431
|
+
#
|
|
1432
|
+
# @return [Google::Apis::DriveV3::Revision]
|
|
1433
|
+
#
|
|
1434
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1435
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1436
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1437
|
+
def get_revision(file_id, revision_id, acknowledge_abuse: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
|
|
1438
|
+
if download_dest.nil?
|
|
1439
|
+
command = make_simple_command(:get, 'files/{fileId}/revisions/{revisionId}', options)
|
|
1440
|
+
else
|
|
1441
|
+
command = make_download_command(:get, 'files/{fileId}/revisions/{revisionId}', options)
|
|
1442
|
+
command.download_dest = download_dest
|
|
1443
|
+
end
|
|
1444
|
+
command.response_representation = Google::Apis::DriveV3::Revision::Representation
|
|
1445
|
+
command.response_class = Google::Apis::DriveV3::Revision
|
|
1446
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
1447
|
+
command.params['revisionId'] = revision_id unless revision_id.nil?
|
|
1448
|
+
command.query['acknowledgeAbuse'] = acknowledge_abuse unless acknowledge_abuse.nil?
|
|
1449
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1450
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1451
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1452
|
+
execute_or_queue_command(command, &block)
|
|
1453
|
+
end
|
|
1454
|
+
|
|
1455
|
+
# Lists a file's revisions.
|
|
1456
|
+
# @param [String] file_id
|
|
1457
|
+
# The ID of the file.
|
|
1458
|
+
# @param [String] fields
|
|
1459
|
+
# Selector specifying which fields to include in a partial response.
|
|
1460
|
+
# @param [String] quota_user
|
|
1461
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1462
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1463
|
+
# Overrides userIp if both are provided.
|
|
1464
|
+
# @param [String] user_ip
|
|
1465
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1466
|
+
# enforce per-user limits.
|
|
1467
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1468
|
+
# Request-specific options
|
|
1469
|
+
#
|
|
1470
|
+
# @yield [result, err] Result & error if block supplied
|
|
1471
|
+
# @yieldparam result [Google::Apis::DriveV3::RevisionList] parsed result object
|
|
1472
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1473
|
+
#
|
|
1474
|
+
# @return [Google::Apis::DriveV3::RevisionList]
|
|
1475
|
+
#
|
|
1476
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1477
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1478
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1479
|
+
def list_revisions(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
1480
|
+
command = make_simple_command(:get, 'files/{fileId}/revisions', options)
|
|
1481
|
+
command.response_representation = Google::Apis::DriveV3::RevisionList::Representation
|
|
1482
|
+
command.response_class = Google::Apis::DriveV3::RevisionList
|
|
1483
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
1484
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1485
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1486
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1487
|
+
execute_or_queue_command(command, &block)
|
|
1488
|
+
end
|
|
1489
|
+
|
|
1490
|
+
# Updates a revision with patch semantics.
|
|
1491
|
+
# @param [String] file_id
|
|
1492
|
+
# The ID of the file.
|
|
1493
|
+
# @param [String] revision_id
|
|
1494
|
+
# The ID of the revision.
|
|
1495
|
+
# @param [Google::Apis::DriveV3::Revision] revision_object
|
|
1496
|
+
# @param [String] fields
|
|
1497
|
+
# Selector specifying which fields to include in a partial response.
|
|
1498
|
+
# @param [String] quota_user
|
|
1499
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1500
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1501
|
+
# Overrides userIp if both are provided.
|
|
1502
|
+
# @param [String] user_ip
|
|
1503
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1504
|
+
# enforce per-user limits.
|
|
1505
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1506
|
+
# Request-specific options
|
|
1507
|
+
#
|
|
1508
|
+
# @yield [result, err] Result & error if block supplied
|
|
1509
|
+
# @yieldparam result [Google::Apis::DriveV3::Revision] parsed result object
|
|
1510
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1511
|
+
#
|
|
1512
|
+
# @return [Google::Apis::DriveV3::Revision]
|
|
1513
|
+
#
|
|
1514
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1515
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1516
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1517
|
+
def update_revision(file_id, revision_id, revision_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
1518
|
+
command = make_simple_command(:patch, 'files/{fileId}/revisions/{revisionId}', options)
|
|
1519
|
+
command.request_representation = Google::Apis::DriveV3::Revision::Representation
|
|
1520
|
+
command.request_object = revision_object
|
|
1521
|
+
command.response_representation = Google::Apis::DriveV3::Revision::Representation
|
|
1522
|
+
command.response_class = Google::Apis::DriveV3::Revision
|
|
1523
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
1524
|
+
command.params['revisionId'] = revision_id unless revision_id.nil?
|
|
1525
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1526
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1527
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1528
|
+
execute_or_queue_command(command, &block)
|
|
1529
|
+
end
|
|
1530
|
+
|
|
1531
|
+
protected
|
|
1532
|
+
|
|
1533
|
+
def apply_command_defaults(command)
|
|
1534
|
+
command.query['key'] = key unless key.nil?
|
|
1535
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1536
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1537
|
+
end
|
|
1538
|
+
end
|
|
1539
|
+
end
|
|
1540
|
+
end
|
|
1541
|
+
end
|