google-api-client 0.8.6 → 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 +41 -2
- data/CONTRIBUTING.md +31 -0
- data/Gemfile +32 -2
- 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.rb +35 -0
- data/generated/google/apis/adexchangebuyer_v1_3/classes.rb +1335 -0
- data/generated/google/apis/adexchangebuyer_v1_3/representations.rb +446 -0
- data/generated/google/apis/adexchangebuyer_v1_3/service.rb +872 -0
- data/generated/google/apis/adexchangeseller_v2_0.rb +38 -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/admin_datatransfer_v1.rb +37 -0
- data/generated/google/apis/admin_datatransfer_v1/classes.rb +267 -0
- data/generated/google/apis/admin_datatransfer_v1/representations.rb +118 -0
- data/generated/google/apis/admin_datatransfer_v1/service.rb +262 -0
- data/generated/google/apis/admin_directory_v1.rb +113 -0
- data/generated/google/apis/admin_directory_v1/classes.rb +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_reports_v1.rb +38 -0
- data/generated/google/apis/admin_reports_v1/classes.rb +582 -0
- data/generated/google/apis/admin_reports_v1/representations.rb +231 -0
- data/generated/google/apis/admin_reports_v1/service.rb +336 -0
- data/generated/google/apis/adsense_v1_4.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/adsensehost_v4_1.rb +35 -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/analytics_v3.rb +49 -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/androidenterprise_v1.rb +35 -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/androidpublisher_v2.rb +34 -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/appengine_v1beta4.rb +35 -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/appsactivity_v1.rb +46 -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/appstate_v1.rb +34 -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/autoscaler_v1beta2.rb +38 -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/bigquery_v2.rb +52 -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/blogger_v3.rb +37 -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/books_v1.rb +34 -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/calendar_v3.rb +37 -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/{lib/google/api_client/service_account.rb → generated/google/apis/civicinfo_v2.rb} +18 -8
- 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/generated/google/apis/classroom_v1.rb +49 -0
- 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_v1beta1.rb +49 -0
- data/generated/google/apis/classroom_v1beta1/classes.rb +447 -0
- data/generated/google/apis/classroom_v1beta1/representations.rb +190 -0
- data/generated/google/apis/classroom_v1beta1/service.rb +791 -0
- data/generated/google/apis/cloudbilling_v1.rb +35 -0
- data/generated/google/apis/cloudbilling_v1/classes.rb +169 -0
- data/generated/google/apis/cloudbilling_v1/representations.rb +79 -0
- data/generated/google/apis/cloudbilling_v1/service.rb +258 -0
- data/generated/google/apis/clouddebugger_v2.rb +41 -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/cloudmonitoring_v2beta2.rb +37 -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/cloudresourcemanager_v1beta1.rb +38 -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/cloudtrace_v1.rb +35 -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/clouduseraccounts_beta.rb +43 -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/compute_beta.rb +49 -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_v1.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/container_v1.rb +35 -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_v1beta1.rb +35 -0
- data/generated/google/apis/container_v1beta1/classes.rb +466 -0
- data/generated/google/apis/container_v1beta1/representations.rb +177 -0
- data/generated/google/apis/container_v1beta1/service.rb +394 -0
- data/generated/google/apis/content_v2.rb +35 -0
- data/generated/google/apis/content_v2/classes.rb +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/coordinate_v1.rb +37 -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/{lib/google/api_client/auth/compute_service_account.rb → generated/google/apis/customsearch_v1.rb} +13 -10
- 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/generated/google/apis/datastore_v1beta2.rb +40 -0
- data/generated/google/apis/datastore_v1beta2/classes.rb +1186 -0
- data/generated/google/apis/datastore_v1beta2/representations.rb +526 -0
- data/generated/google/apis/datastore_v1beta2/service.rb +294 -0
- data/generated/google/apis/deploymentmanager_v2.rb +44 -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_v2beta2.rb +44 -0
- data/generated/google/apis/deploymentmanager_v2beta2/classes.rb +843 -0
- data/generated/google/apis/deploymentmanager_v2beta2/representations.rb +306 -0
- data/generated/google/apis/deploymentmanager_v2beta2/service.rb +689 -0
- data/generated/google/apis/dfareporting_v2_1.rb +37 -0
- data/generated/google/apis/dfareporting_v2_1/classes.rb +10770 -0
- data/generated/google/apis/dfareporting_v2_1/representations.rb +3438 -0
- data/generated/google/apis/dfareporting_v2_1/service.rb +8585 -0
- data/generated/google/apis/discovery_v1.rb +32 -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/dns_v1.rb +44 -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/doubleclickbidmanager_v1.rb +31 -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/doubleclicksearch_v2.rb +35 -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/drive_v2.rb +58 -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_v3.rb +55 -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/fitness_v1.rb +49 -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/fusiontables_v2.rb +37 -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/games_configuration_v1configuration.rb +34 -0
- data/generated/google/apis/games_configuration_v1configuration/classes.rb +506 -0
- data/generated/google/apis/games_configuration_v1configuration/representations.rb +206 -0
- data/generated/google/apis/games_configuration_v1configuration/service.rb +565 -0
- data/generated/google/apis/games_management_v1management.rb +37 -0
- data/generated/google/apis/games_management_v1management/classes.rb +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_v1.rb +40 -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/gan_v1beta1.rb +31 -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/genomics_v1.rb +49 -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_v1beta2.rb +46 -0
- data/generated/google/apis/genomics_v1beta2/classes.rb +3288 -0
- data/generated/google/apis/genomics_v1beta2/representations.rb +1194 -0
- data/generated/google/apis/genomics_v1beta2/service.rb +2392 -0
- data/generated/google/apis/gmail_v1.rb +52 -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/groupsmigration_v1.rb +34 -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/groupssettings_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/identitytoolkit_v3.rb +31 -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/{spec/google/api_client/request_spec.rb → generated/google/apis/kgsearch_v1.rb} +16 -13
- 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/generated/google/apis/licensing_v1.rb +34 -0
- data/generated/google/apis/licensing_v1/classes.rb +132 -0
- data/generated/google/apis/licensing_v1/representations.rb +68 -0
- data/generated/google/apis/licensing_v1/service.rb +369 -0
- data/generated/google/apis/logging_v1beta3.rb +47 -0
- data/generated/google/apis/logging_v1beta3/classes.rb +1079 -0
- data/generated/google/apis/logging_v1beta3/representations.rb +366 -0
- data/generated/google/apis/logging_v1beta3/service.rb +1001 -0
- data/generated/google/apis/manager_v1beta2.rb +53 -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/mapsengine_v1.rb +38 -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/mirror_v1.rb +37 -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/oauth2_v2.rb +43 -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/pagespeedonline_v2.rb +32 -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/partners_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/plus_domains_v1.rb +61 -0
- data/generated/google/apis/plus_domains_v1/classes.rb +2609 -0
- data/generated/google/apis/plus_domains_v1/representations.rb +987 -0
- data/generated/google/apis/plus_domains_v1/service.rb +904 -0
- data/generated/google/apis/plus_v1.rb +43 -0
- data/generated/google/apis/plus_v1/classes.rb +2094 -0
- data/generated/google/apis/plus_v1/representations.rb +805 -0
- data/generated/google/apis/plus_v1/service.rb +470 -0
- data/generated/google/apis/prediction_v1_6.rb +44 -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/proximitybeacon_v1beta1.rb +31 -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/pubsub_v1.rb +37 -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_v1beta2.rb +37 -0
- data/generated/google/apis/pubsub_v1beta2/classes.rb +620 -0
- data/generated/google/apis/pubsub_v1beta2/representations.rb +282 -0
- data/generated/google/apis/pubsub_v1beta2/service.rb +774 -0
- data/generated/google/apis/qpx_express_v1.rb +31 -0
- data/generated/google/apis/qpx_express_v1/classes.rb +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/replicapool_v1beta2.rb +44 -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/replicapoolupdater_v1beta1.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/reseller_v1.rb +37 -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/resourceviews_v1beta2.rb +50 -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/script_v1.rb +61 -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/site_verification_v1.rb +37 -0
- data/generated/google/apis/site_verification_v1/classes.rb +185 -0
- data/generated/google/apis/site_verification_v1/representations.rb +101 -0
- data/generated/google/apis/site_verification_v1/service.rb +315 -0
- data/generated/google/apis/sqladmin_v1beta4.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/storage_v1.rb +46 -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/storagetransfer_v1.rb +35 -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/tagmanager_v1.rb +52 -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/taskqueue_v1beta2.rb +37 -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/tasks_v1.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/translate_v2.rb +31 -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/urlshortener_v1.rb +34 -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/webmasters_v3.rb +37 -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/youtube_analytics_v1.rb +46 -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_v3.rb +49 -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/youtubereporting_v1.rb +38 -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/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 +1 -0
- data/lib/google/api_client/auth/storage.rb +4 -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.rb +48 -0
- 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.rb +70 -0
- 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/options.rb +85 -0
- data/lib/google/apis/version.rb +39 -0
- data/rakelib/metrics.rake +22 -0
- data/rakelib/rubocop.rake +10 -0
- data/rakelib/spec.rake +11 -0
- data/rakelib/yard.rake +11 -0
- data/samples/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.rb +131 -44
- data/spec/spec_helper/load_path_spec.rb +33 -0
- data/third_party/hurley_patches.rb +103 -0
- metadata +533 -170
- data/lib/compat/multi_json.rb +0 -19
- data/lib/google/api_client.rb +0 -750
- 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 -326
- data/lib/google/api_client/charset.rb +0 -33
- data/lib/google/api_client/discovery/api.rb +0 -310
- 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 -117
- 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.rb +0 -233
- 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/spec/google/api_client/batch_spec.rb +0 -248
- data/spec/google/api_client/discovery_spec.rb +0 -708
- 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,2696 @@
|
|
|
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 DriveV2
|
|
23
|
+
# Drive API
|
|
24
|
+
#
|
|
25
|
+
# The API to interact with Drive.
|
|
26
|
+
#
|
|
27
|
+
# @example
|
|
28
|
+
# require 'google/apis/drive_v2'
|
|
29
|
+
#
|
|
30
|
+
# Drive = Google::Apis::DriveV2 # 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/v2/')
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Gets the information about the current user along with Drive API settings
|
|
56
|
+
# @param [Boolean] include_subscribed
|
|
57
|
+
# When calculating the number of remaining change IDs, whether to include public
|
|
58
|
+
# files the user has opened and shared files. When set to false, this counts
|
|
59
|
+
# only change IDs for owned files and any shared or public files that the user
|
|
60
|
+
# has explicitly added to a folder they own.
|
|
61
|
+
# @param [String] max_change_id_count
|
|
62
|
+
# Maximum number of remaining change IDs to count
|
|
63
|
+
# @param [String] start_change_id
|
|
64
|
+
# Change ID to start counting from when calculating number of remaining change
|
|
65
|
+
# IDs
|
|
66
|
+
# @param [String] fields
|
|
67
|
+
# Selector specifying which fields to include in a partial response.
|
|
68
|
+
# @param [String] quota_user
|
|
69
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
70
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
71
|
+
# Overrides userIp if both are provided.
|
|
72
|
+
# @param [String] user_ip
|
|
73
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
74
|
+
# enforce per-user limits.
|
|
75
|
+
# @param [Google::Apis::RequestOptions] options
|
|
76
|
+
# Request-specific options
|
|
77
|
+
#
|
|
78
|
+
# @yield [result, err] Result & error if block supplied
|
|
79
|
+
# @yieldparam result [Google::Apis::DriveV2::About] parsed result object
|
|
80
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
81
|
+
#
|
|
82
|
+
# @return [Google::Apis::DriveV2::About]
|
|
83
|
+
#
|
|
84
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
85
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
86
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
87
|
+
def get_about(include_subscribed: nil, max_change_id_count: nil, start_change_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
88
|
+
command = make_simple_command(:get, 'about', options)
|
|
89
|
+
command.response_representation = Google::Apis::DriveV2::About::Representation
|
|
90
|
+
command.response_class = Google::Apis::DriveV2::About
|
|
91
|
+
command.query['includeSubscribed'] = include_subscribed unless include_subscribed.nil?
|
|
92
|
+
command.query['maxChangeIdCount'] = max_change_id_count unless max_change_id_count.nil?
|
|
93
|
+
command.query['startChangeId'] = start_change_id unless start_change_id.nil?
|
|
94
|
+
command.query['fields'] = fields unless fields.nil?
|
|
95
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
96
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
97
|
+
execute_or_queue_command(command, &block)
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Gets a specific app.
|
|
101
|
+
# @param [String] app_id
|
|
102
|
+
# The ID of the app.
|
|
103
|
+
# @param [String] fields
|
|
104
|
+
# Selector specifying which fields to include in a partial response.
|
|
105
|
+
# @param [String] quota_user
|
|
106
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
107
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
108
|
+
# Overrides userIp if both are provided.
|
|
109
|
+
# @param [String] user_ip
|
|
110
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
111
|
+
# enforce per-user limits.
|
|
112
|
+
# @param [Google::Apis::RequestOptions] options
|
|
113
|
+
# Request-specific options
|
|
114
|
+
#
|
|
115
|
+
# @yield [result, err] Result & error if block supplied
|
|
116
|
+
# @yieldparam result [Google::Apis::DriveV2::App] parsed result object
|
|
117
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
118
|
+
#
|
|
119
|
+
# @return [Google::Apis::DriveV2::App]
|
|
120
|
+
#
|
|
121
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
122
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
123
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
124
|
+
def get_app(app_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
125
|
+
command = make_simple_command(:get, 'apps/{appId}', options)
|
|
126
|
+
command.response_representation = Google::Apis::DriveV2::App::Representation
|
|
127
|
+
command.response_class = Google::Apis::DriveV2::App
|
|
128
|
+
command.params['appId'] = app_id unless app_id.nil?
|
|
129
|
+
command.query['fields'] = fields unless fields.nil?
|
|
130
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
131
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
132
|
+
execute_or_queue_command(command, &block)
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Lists a user's installed apps.
|
|
136
|
+
# @param [String] app_filter_extensions
|
|
137
|
+
# A comma-separated list of file extensions for open with filtering. All apps
|
|
138
|
+
# within the given app query scope which can open any of the given file
|
|
139
|
+
# extensions will be included in the response. If appFilterMimeTypes are
|
|
140
|
+
# provided as well, the result is a union of the two resulting app lists.
|
|
141
|
+
# @param [String] app_filter_mime_types
|
|
142
|
+
# A comma-separated list of MIME types for open with filtering. All apps within
|
|
143
|
+
# the given app query scope which can open any of the given MIME types will be
|
|
144
|
+
# included in the response. If appFilterExtensions are provided as well, the
|
|
145
|
+
# result is a union of the two resulting app lists.
|
|
146
|
+
# @param [String] language_code
|
|
147
|
+
# A language or locale code, as defined by BCP 47, with some extensions from
|
|
148
|
+
# Unicode's LDML format (http://www.unicode.org/reports/tr35/).
|
|
149
|
+
# @param [String] fields
|
|
150
|
+
# Selector specifying which fields to include in a partial response.
|
|
151
|
+
# @param [String] quota_user
|
|
152
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
153
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
154
|
+
# Overrides userIp if both are provided.
|
|
155
|
+
# @param [String] user_ip
|
|
156
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
157
|
+
# enforce per-user limits.
|
|
158
|
+
# @param [Google::Apis::RequestOptions] options
|
|
159
|
+
# Request-specific options
|
|
160
|
+
#
|
|
161
|
+
# @yield [result, err] Result & error if block supplied
|
|
162
|
+
# @yieldparam result [Google::Apis::DriveV2::AppList] parsed result object
|
|
163
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
164
|
+
#
|
|
165
|
+
# @return [Google::Apis::DriveV2::AppList]
|
|
166
|
+
#
|
|
167
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
168
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
169
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
170
|
+
def list_apps(app_filter_extensions: nil, app_filter_mime_types: nil, language_code: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
171
|
+
command = make_simple_command(:get, 'apps', options)
|
|
172
|
+
command.response_representation = Google::Apis::DriveV2::AppList::Representation
|
|
173
|
+
command.response_class = Google::Apis::DriveV2::AppList
|
|
174
|
+
command.query['appFilterExtensions'] = app_filter_extensions unless app_filter_extensions.nil?
|
|
175
|
+
command.query['appFilterMimeTypes'] = app_filter_mime_types unless app_filter_mime_types.nil?
|
|
176
|
+
command.query['languageCode'] = language_code unless language_code.nil?
|
|
177
|
+
command.query['fields'] = fields unless fields.nil?
|
|
178
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
179
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
180
|
+
execute_or_queue_command(command, &block)
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Gets a specific change.
|
|
184
|
+
# @param [String] change_id
|
|
185
|
+
# The ID of the change.
|
|
186
|
+
# @param [String] fields
|
|
187
|
+
# Selector specifying which fields to include in a partial response.
|
|
188
|
+
# @param [String] quota_user
|
|
189
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
190
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
191
|
+
# Overrides userIp if both are provided.
|
|
192
|
+
# @param [String] user_ip
|
|
193
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
194
|
+
# enforce per-user limits.
|
|
195
|
+
# @param [Google::Apis::RequestOptions] options
|
|
196
|
+
# Request-specific options
|
|
197
|
+
#
|
|
198
|
+
# @yield [result, err] Result & error if block supplied
|
|
199
|
+
# @yieldparam result [Google::Apis::DriveV2::Change] parsed result object
|
|
200
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
201
|
+
#
|
|
202
|
+
# @return [Google::Apis::DriveV2::Change]
|
|
203
|
+
#
|
|
204
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
205
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
206
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
207
|
+
def get_change(change_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
208
|
+
command = make_simple_command(:get, 'changes/{changeId}', options)
|
|
209
|
+
command.response_representation = Google::Apis::DriveV2::Change::Representation
|
|
210
|
+
command.response_class = Google::Apis::DriveV2::Change
|
|
211
|
+
command.params['changeId'] = change_id unless change_id.nil?
|
|
212
|
+
command.query['fields'] = fields unless fields.nil?
|
|
213
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
214
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
215
|
+
execute_or_queue_command(command, &block)
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# Lists the changes for a user.
|
|
219
|
+
# @param [Boolean] include_deleted
|
|
220
|
+
# Whether to include deleted items.
|
|
221
|
+
# @param [Boolean] include_subscribed
|
|
222
|
+
# Whether to include public files the user has opened and shared files. When set
|
|
223
|
+
# to false, the list only includes owned files plus any shared or public files
|
|
224
|
+
# the user has explicitly added to a folder they own.
|
|
225
|
+
# @param [Fixnum] max_results
|
|
226
|
+
# Maximum number of changes to return.
|
|
227
|
+
# @param [String] page_token
|
|
228
|
+
# Page token for changes.
|
|
229
|
+
# @param [String] spaces
|
|
230
|
+
# A comma-separated list of spaces to query. Supported values are 'drive', '
|
|
231
|
+
# appDataFolder' and 'photos'.
|
|
232
|
+
# @param [String] start_change_id
|
|
233
|
+
# Change ID to start listing changes from.
|
|
234
|
+
# @param [String] fields
|
|
235
|
+
# Selector specifying which fields to include in a partial response.
|
|
236
|
+
# @param [String] quota_user
|
|
237
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
238
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
239
|
+
# Overrides userIp if both are provided.
|
|
240
|
+
# @param [String] user_ip
|
|
241
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
242
|
+
# enforce per-user limits.
|
|
243
|
+
# @param [Google::Apis::RequestOptions] options
|
|
244
|
+
# Request-specific options
|
|
245
|
+
#
|
|
246
|
+
# @yield [result, err] Result & error if block supplied
|
|
247
|
+
# @yieldparam result [Google::Apis::DriveV2::ChangeList] parsed result object
|
|
248
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
249
|
+
#
|
|
250
|
+
# @return [Google::Apis::DriveV2::ChangeList]
|
|
251
|
+
#
|
|
252
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
253
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
254
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
255
|
+
def list_changes(include_deleted: nil, include_subscribed: nil, max_results: nil, page_token: nil, spaces: nil, start_change_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
256
|
+
command = make_simple_command(:get, 'changes', options)
|
|
257
|
+
command.response_representation = Google::Apis::DriveV2::ChangeList::Representation
|
|
258
|
+
command.response_class = Google::Apis::DriveV2::ChangeList
|
|
259
|
+
command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
|
|
260
|
+
command.query['includeSubscribed'] = include_subscribed unless include_subscribed.nil?
|
|
261
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
|
262
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
263
|
+
command.query['spaces'] = spaces unless spaces.nil?
|
|
264
|
+
command.query['startChangeId'] = start_change_id unless start_change_id.nil?
|
|
265
|
+
command.query['fields'] = fields unless fields.nil?
|
|
266
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
267
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
268
|
+
execute_or_queue_command(command, &block)
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
# Subscribe to changes for a user.
|
|
272
|
+
# @param [Google::Apis::DriveV2::Channel] channel_object
|
|
273
|
+
# @param [Boolean] include_deleted
|
|
274
|
+
# Whether to include deleted items.
|
|
275
|
+
# @param [Boolean] include_subscribed
|
|
276
|
+
# Whether to include public files the user has opened and shared files. When set
|
|
277
|
+
# to false, the list only includes owned files plus any shared or public files
|
|
278
|
+
# the user has explicitly added to a folder they own.
|
|
279
|
+
# @param [Fixnum] max_results
|
|
280
|
+
# Maximum number of changes to return.
|
|
281
|
+
# @param [String] page_token
|
|
282
|
+
# Page token for changes.
|
|
283
|
+
# @param [String] spaces
|
|
284
|
+
# A comma-separated list of spaces to query. Supported values are 'drive', '
|
|
285
|
+
# appDataFolder' and 'photos'.
|
|
286
|
+
# @param [String] start_change_id
|
|
287
|
+
# Change ID to start listing changes from.
|
|
288
|
+
# @param [String] fields
|
|
289
|
+
# Selector specifying which fields to include in a partial response.
|
|
290
|
+
# @param [String] quota_user
|
|
291
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
292
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
293
|
+
# Overrides userIp if both are provided.
|
|
294
|
+
# @param [String] user_ip
|
|
295
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
296
|
+
# enforce per-user limits.
|
|
297
|
+
# @param [Google::Apis::RequestOptions] options
|
|
298
|
+
# Request-specific options
|
|
299
|
+
#
|
|
300
|
+
# @yield [result, err] Result & error if block supplied
|
|
301
|
+
# @yieldparam result [Google::Apis::DriveV2::Channel] parsed result object
|
|
302
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
303
|
+
#
|
|
304
|
+
# @return [Google::Apis::DriveV2::Channel]
|
|
305
|
+
#
|
|
306
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
307
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
308
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
309
|
+
def watch_change(channel_object = nil, include_deleted: nil, include_subscribed: nil, max_results: nil, page_token: nil, spaces: nil, start_change_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
310
|
+
command = make_simple_command(:post, 'changes/watch', options)
|
|
311
|
+
command.request_representation = Google::Apis::DriveV2::Channel::Representation
|
|
312
|
+
command.request_object = channel_object
|
|
313
|
+
command.response_representation = Google::Apis::DriveV2::Channel::Representation
|
|
314
|
+
command.response_class = Google::Apis::DriveV2::Channel
|
|
315
|
+
command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
|
|
316
|
+
command.query['includeSubscribed'] = include_subscribed unless include_subscribed.nil?
|
|
317
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
|
318
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
319
|
+
command.query['spaces'] = spaces unless spaces.nil?
|
|
320
|
+
command.query['startChangeId'] = start_change_id unless start_change_id.nil?
|
|
321
|
+
command.query['fields'] = fields unless fields.nil?
|
|
322
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
323
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
324
|
+
execute_or_queue_command(command, &block)
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
# Stop watching resources through this channel
|
|
328
|
+
# @param [Google::Apis::DriveV2::Channel] channel_object
|
|
329
|
+
# @param [String] fields
|
|
330
|
+
# Selector specifying which fields to include in a partial response.
|
|
331
|
+
# @param [String] quota_user
|
|
332
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
333
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
334
|
+
# Overrides userIp if both are provided.
|
|
335
|
+
# @param [String] user_ip
|
|
336
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
337
|
+
# enforce per-user limits.
|
|
338
|
+
# @param [Google::Apis::RequestOptions] options
|
|
339
|
+
# Request-specific options
|
|
340
|
+
#
|
|
341
|
+
# @yield [result, err] Result & error if block supplied
|
|
342
|
+
# @yieldparam result [NilClass] No result returned for this method
|
|
343
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
344
|
+
#
|
|
345
|
+
# @return [void]
|
|
346
|
+
#
|
|
347
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
348
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
349
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
350
|
+
def stop_channel(channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
351
|
+
command = make_simple_command(:post, 'channels/stop', options)
|
|
352
|
+
command.request_representation = Google::Apis::DriveV2::Channel::Representation
|
|
353
|
+
command.request_object = channel_object
|
|
354
|
+
command.query['fields'] = fields unless fields.nil?
|
|
355
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
356
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
357
|
+
execute_or_queue_command(command, &block)
|
|
358
|
+
end
|
|
359
|
+
|
|
360
|
+
# Removes a child from a folder.
|
|
361
|
+
# @param [String] folder_id
|
|
362
|
+
# The ID of the folder.
|
|
363
|
+
# @param [String] child_id
|
|
364
|
+
# The ID of the child.
|
|
365
|
+
# @param [String] fields
|
|
366
|
+
# Selector specifying which fields to include in a partial response.
|
|
367
|
+
# @param [String] quota_user
|
|
368
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
369
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
370
|
+
# Overrides userIp if both are provided.
|
|
371
|
+
# @param [String] user_ip
|
|
372
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
373
|
+
# enforce per-user limits.
|
|
374
|
+
# @param [Google::Apis::RequestOptions] options
|
|
375
|
+
# Request-specific options
|
|
376
|
+
#
|
|
377
|
+
# @yield [result, err] Result & error if block supplied
|
|
378
|
+
# @yieldparam result [NilClass] No result returned for this method
|
|
379
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
380
|
+
#
|
|
381
|
+
# @return [void]
|
|
382
|
+
#
|
|
383
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
384
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
385
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
386
|
+
def delete_child(folder_id, child_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
387
|
+
command = make_simple_command(:delete, 'files/{folderId}/children/{childId}', options)
|
|
388
|
+
command.params['folderId'] = folder_id unless folder_id.nil?
|
|
389
|
+
command.params['childId'] = child_id unless child_id.nil?
|
|
390
|
+
command.query['fields'] = fields unless fields.nil?
|
|
391
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
392
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
393
|
+
execute_or_queue_command(command, &block)
|
|
394
|
+
end
|
|
395
|
+
|
|
396
|
+
# Gets a specific child reference.
|
|
397
|
+
# @param [String] folder_id
|
|
398
|
+
# The ID of the folder.
|
|
399
|
+
# @param [String] child_id
|
|
400
|
+
# The ID of the child.
|
|
401
|
+
# @param [String] fields
|
|
402
|
+
# Selector specifying which fields to include in a partial response.
|
|
403
|
+
# @param [String] quota_user
|
|
404
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
405
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
406
|
+
# Overrides userIp if both are provided.
|
|
407
|
+
# @param [String] user_ip
|
|
408
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
409
|
+
# enforce per-user limits.
|
|
410
|
+
# @param [Google::Apis::RequestOptions] options
|
|
411
|
+
# Request-specific options
|
|
412
|
+
#
|
|
413
|
+
# @yield [result, err] Result & error if block supplied
|
|
414
|
+
# @yieldparam result [Google::Apis::DriveV2::ChildReference] parsed result object
|
|
415
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
416
|
+
#
|
|
417
|
+
# @return [Google::Apis::DriveV2::ChildReference]
|
|
418
|
+
#
|
|
419
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
420
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
421
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
422
|
+
def get_child(folder_id, child_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
423
|
+
command = make_simple_command(:get, 'files/{folderId}/children/{childId}', options)
|
|
424
|
+
command.response_representation = Google::Apis::DriveV2::ChildReference::Representation
|
|
425
|
+
command.response_class = Google::Apis::DriveV2::ChildReference
|
|
426
|
+
command.params['folderId'] = folder_id unless folder_id.nil?
|
|
427
|
+
command.params['childId'] = child_id unless child_id.nil?
|
|
428
|
+
command.query['fields'] = fields unless fields.nil?
|
|
429
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
430
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
431
|
+
execute_or_queue_command(command, &block)
|
|
432
|
+
end
|
|
433
|
+
|
|
434
|
+
# Inserts a file into a folder.
|
|
435
|
+
# @param [String] folder_id
|
|
436
|
+
# The ID of the folder.
|
|
437
|
+
# @param [Google::Apis::DriveV2::ChildReference] child_reference_object
|
|
438
|
+
# @param [String] fields
|
|
439
|
+
# Selector specifying which fields to include in a partial response.
|
|
440
|
+
# @param [String] quota_user
|
|
441
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
442
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
443
|
+
# Overrides userIp if both are provided.
|
|
444
|
+
# @param [String] user_ip
|
|
445
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
446
|
+
# enforce per-user limits.
|
|
447
|
+
# @param [Google::Apis::RequestOptions] options
|
|
448
|
+
# Request-specific options
|
|
449
|
+
#
|
|
450
|
+
# @yield [result, err] Result & error if block supplied
|
|
451
|
+
# @yieldparam result [Google::Apis::DriveV2::ChildReference] parsed result object
|
|
452
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
453
|
+
#
|
|
454
|
+
# @return [Google::Apis::DriveV2::ChildReference]
|
|
455
|
+
#
|
|
456
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
457
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
458
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
459
|
+
def insert_child(folder_id, child_reference_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
460
|
+
command = make_simple_command(:post, 'files/{folderId}/children', options)
|
|
461
|
+
command.request_representation = Google::Apis::DriveV2::ChildReference::Representation
|
|
462
|
+
command.request_object = child_reference_object
|
|
463
|
+
command.response_representation = Google::Apis::DriveV2::ChildReference::Representation
|
|
464
|
+
command.response_class = Google::Apis::DriveV2::ChildReference
|
|
465
|
+
command.params['folderId'] = folder_id unless folder_id.nil?
|
|
466
|
+
command.query['fields'] = fields unless fields.nil?
|
|
467
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
468
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
469
|
+
execute_or_queue_command(command, &block)
|
|
470
|
+
end
|
|
471
|
+
|
|
472
|
+
# Lists a folder's children.
|
|
473
|
+
# @param [String] folder_id
|
|
474
|
+
# The ID of the folder.
|
|
475
|
+
# @param [Fixnum] max_results
|
|
476
|
+
# Maximum number of children to return.
|
|
477
|
+
# @param [String] order_by
|
|
478
|
+
# A comma-separated list of sort keys. Valid keys are 'createdDate', 'folder', '
|
|
479
|
+
# lastViewedByMeDate', 'modifiedByMeDate', 'modifiedDate', 'quotaBytesUsed', '
|
|
480
|
+
# recency', 'sharedWithMeDate', 'starred', and 'title'. Each key sorts ascending
|
|
481
|
+
# by default, but may be reversed with the 'desc' modifier. Example usage: ?
|
|
482
|
+
# orderBy=folder,modifiedDate desc,title. Please note that there is a current
|
|
483
|
+
# limitation for users with approximately one million files in which the
|
|
484
|
+
# requested sort order is ignored.
|
|
485
|
+
# @param [String] page_token
|
|
486
|
+
# Page token for children.
|
|
487
|
+
# @param [String] q
|
|
488
|
+
# Query string for searching children.
|
|
489
|
+
# @param [String] fields
|
|
490
|
+
# Selector specifying which fields to include in a partial response.
|
|
491
|
+
# @param [String] quota_user
|
|
492
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
493
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
494
|
+
# Overrides userIp if both are provided.
|
|
495
|
+
# @param [String] user_ip
|
|
496
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
497
|
+
# enforce per-user limits.
|
|
498
|
+
# @param [Google::Apis::RequestOptions] options
|
|
499
|
+
# Request-specific options
|
|
500
|
+
#
|
|
501
|
+
# @yield [result, err] Result & error if block supplied
|
|
502
|
+
# @yieldparam result [Google::Apis::DriveV2::ChildList] parsed result object
|
|
503
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
504
|
+
#
|
|
505
|
+
# @return [Google::Apis::DriveV2::ChildList]
|
|
506
|
+
#
|
|
507
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
508
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
509
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
510
|
+
def list_children(folder_id, max_results: nil, order_by: nil, page_token: nil, q: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
511
|
+
command = make_simple_command(:get, 'files/{folderId}/children', options)
|
|
512
|
+
command.response_representation = Google::Apis::DriveV2::ChildList::Representation
|
|
513
|
+
command.response_class = Google::Apis::DriveV2::ChildList
|
|
514
|
+
command.params['folderId'] = folder_id unless folder_id.nil?
|
|
515
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
|
516
|
+
command.query['orderBy'] = order_by unless order_by.nil?
|
|
517
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
518
|
+
command.query['q'] = q unless q.nil?
|
|
519
|
+
command.query['fields'] = fields unless fields.nil?
|
|
520
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
521
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
522
|
+
execute_or_queue_command(command, &block)
|
|
523
|
+
end
|
|
524
|
+
|
|
525
|
+
# Deletes a comment.
|
|
526
|
+
# @param [String] file_id
|
|
527
|
+
# The ID of the file.
|
|
528
|
+
# @param [String] comment_id
|
|
529
|
+
# The ID of the comment.
|
|
530
|
+
# @param [String] fields
|
|
531
|
+
# Selector specifying which fields to include in a partial response.
|
|
532
|
+
# @param [String] quota_user
|
|
533
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
534
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
535
|
+
# Overrides userIp if both are provided.
|
|
536
|
+
# @param [String] user_ip
|
|
537
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
538
|
+
# enforce per-user limits.
|
|
539
|
+
# @param [Google::Apis::RequestOptions] options
|
|
540
|
+
# Request-specific options
|
|
541
|
+
#
|
|
542
|
+
# @yield [result, err] Result & error if block supplied
|
|
543
|
+
# @yieldparam result [NilClass] No result returned for this method
|
|
544
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
545
|
+
#
|
|
546
|
+
# @return [void]
|
|
547
|
+
#
|
|
548
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
549
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
550
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
551
|
+
def delete_comment(file_id, comment_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
552
|
+
command = make_simple_command(:delete, 'files/{fileId}/comments/{commentId}', options)
|
|
553
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
554
|
+
command.params['commentId'] = comment_id unless comment_id.nil?
|
|
555
|
+
command.query['fields'] = fields unless fields.nil?
|
|
556
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
557
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
558
|
+
execute_or_queue_command(command, &block)
|
|
559
|
+
end
|
|
560
|
+
|
|
561
|
+
# Gets a comment by ID.
|
|
562
|
+
# @param [String] file_id
|
|
563
|
+
# The ID of the file.
|
|
564
|
+
# @param [String] comment_id
|
|
565
|
+
# The ID of the comment.
|
|
566
|
+
# @param [Boolean] include_deleted
|
|
567
|
+
# If set, this will succeed when retrieving a deleted comment, and will include
|
|
568
|
+
# any deleted replies.
|
|
569
|
+
# @param [String] fields
|
|
570
|
+
# Selector specifying which fields to include in a partial response.
|
|
571
|
+
# @param [String] quota_user
|
|
572
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
573
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
574
|
+
# Overrides userIp if both are provided.
|
|
575
|
+
# @param [String] user_ip
|
|
576
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
577
|
+
# enforce per-user limits.
|
|
578
|
+
# @param [Google::Apis::RequestOptions] options
|
|
579
|
+
# Request-specific options
|
|
580
|
+
#
|
|
581
|
+
# @yield [result, err] Result & error if block supplied
|
|
582
|
+
# @yieldparam result [Google::Apis::DriveV2::Comment] parsed result object
|
|
583
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
584
|
+
#
|
|
585
|
+
# @return [Google::Apis::DriveV2::Comment]
|
|
586
|
+
#
|
|
587
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
588
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
589
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
590
|
+
def get_comment(file_id, comment_id, include_deleted: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
591
|
+
command = make_simple_command(:get, 'files/{fileId}/comments/{commentId}', options)
|
|
592
|
+
command.response_representation = Google::Apis::DriveV2::Comment::Representation
|
|
593
|
+
command.response_class = Google::Apis::DriveV2::Comment
|
|
594
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
595
|
+
command.params['commentId'] = comment_id unless comment_id.nil?
|
|
596
|
+
command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
|
|
597
|
+
command.query['fields'] = fields unless fields.nil?
|
|
598
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
599
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
600
|
+
execute_or_queue_command(command, &block)
|
|
601
|
+
end
|
|
602
|
+
|
|
603
|
+
# Creates a new comment on the given file.
|
|
604
|
+
# @param [String] file_id
|
|
605
|
+
# The ID of the file.
|
|
606
|
+
# @param [Google::Apis::DriveV2::Comment] comment_object
|
|
607
|
+
# @param [String] fields
|
|
608
|
+
# Selector specifying which fields to include in a partial response.
|
|
609
|
+
# @param [String] quota_user
|
|
610
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
611
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
612
|
+
# Overrides userIp if both are provided.
|
|
613
|
+
# @param [String] user_ip
|
|
614
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
615
|
+
# enforce per-user limits.
|
|
616
|
+
# @param [Google::Apis::RequestOptions] options
|
|
617
|
+
# Request-specific options
|
|
618
|
+
#
|
|
619
|
+
# @yield [result, err] Result & error if block supplied
|
|
620
|
+
# @yieldparam result [Google::Apis::DriveV2::Comment] parsed result object
|
|
621
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
622
|
+
#
|
|
623
|
+
# @return [Google::Apis::DriveV2::Comment]
|
|
624
|
+
#
|
|
625
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
626
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
627
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
628
|
+
def insert_comment(file_id, comment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
629
|
+
command = make_simple_command(:post, 'files/{fileId}/comments', options)
|
|
630
|
+
command.request_representation = Google::Apis::DriveV2::Comment::Representation
|
|
631
|
+
command.request_object = comment_object
|
|
632
|
+
command.response_representation = Google::Apis::DriveV2::Comment::Representation
|
|
633
|
+
command.response_class = Google::Apis::DriveV2::Comment
|
|
634
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
635
|
+
command.query['fields'] = fields unless fields.nil?
|
|
636
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
637
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
638
|
+
execute_or_queue_command(command, &block)
|
|
639
|
+
end
|
|
640
|
+
|
|
641
|
+
# Lists a file's comments.
|
|
642
|
+
# @param [String] file_id
|
|
643
|
+
# The ID of the file.
|
|
644
|
+
# @param [Boolean] include_deleted
|
|
645
|
+
# If set, all comments and replies, including deleted comments and replies (with
|
|
646
|
+
# content stripped) will be returned.
|
|
647
|
+
# @param [Fixnum] max_results
|
|
648
|
+
# The maximum number of discussions to include in the response, used for paging.
|
|
649
|
+
# @param [String] page_token
|
|
650
|
+
# The continuation token, used to page through large result sets. To get the
|
|
651
|
+
# next page of results, set this parameter to the value of "nextPageToken" from
|
|
652
|
+
# the previous response.
|
|
653
|
+
# @param [String] updated_min
|
|
654
|
+
# Only discussions that were updated after this timestamp will be returned.
|
|
655
|
+
# Formatted as an RFC 3339 timestamp.
|
|
656
|
+
# @param [String] fields
|
|
657
|
+
# Selector specifying which fields to include in a partial response.
|
|
658
|
+
# @param [String] quota_user
|
|
659
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
660
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
661
|
+
# Overrides userIp if both are provided.
|
|
662
|
+
# @param [String] user_ip
|
|
663
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
664
|
+
# enforce per-user limits.
|
|
665
|
+
# @param [Google::Apis::RequestOptions] options
|
|
666
|
+
# Request-specific options
|
|
667
|
+
#
|
|
668
|
+
# @yield [result, err] Result & error if block supplied
|
|
669
|
+
# @yieldparam result [Google::Apis::DriveV2::CommentList] parsed result object
|
|
670
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
671
|
+
#
|
|
672
|
+
# @return [Google::Apis::DriveV2::CommentList]
|
|
673
|
+
#
|
|
674
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
675
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
676
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
677
|
+
def list_comments(file_id, include_deleted: nil, max_results: nil, page_token: nil, updated_min: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
678
|
+
command = make_simple_command(:get, 'files/{fileId}/comments', options)
|
|
679
|
+
command.response_representation = Google::Apis::DriveV2::CommentList::Representation
|
|
680
|
+
command.response_class = Google::Apis::DriveV2::CommentList
|
|
681
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
682
|
+
command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
|
|
683
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
|
684
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
685
|
+
command.query['updatedMin'] = updated_min unless updated_min.nil?
|
|
686
|
+
command.query['fields'] = fields unless fields.nil?
|
|
687
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
688
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
689
|
+
execute_or_queue_command(command, &block)
|
|
690
|
+
end
|
|
691
|
+
|
|
692
|
+
# Updates an existing comment. This method supports patch semantics.
|
|
693
|
+
# @param [String] file_id
|
|
694
|
+
# The ID of the file.
|
|
695
|
+
# @param [String] comment_id
|
|
696
|
+
# The ID of the comment.
|
|
697
|
+
# @param [Google::Apis::DriveV2::Comment] comment_object
|
|
698
|
+
# @param [String] fields
|
|
699
|
+
# Selector specifying which fields to include in a partial response.
|
|
700
|
+
# @param [String] quota_user
|
|
701
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
702
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
703
|
+
# Overrides userIp if both are provided.
|
|
704
|
+
# @param [String] user_ip
|
|
705
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
706
|
+
# enforce per-user limits.
|
|
707
|
+
# @param [Google::Apis::RequestOptions] options
|
|
708
|
+
# Request-specific options
|
|
709
|
+
#
|
|
710
|
+
# @yield [result, err] Result & error if block supplied
|
|
711
|
+
# @yieldparam result [Google::Apis::DriveV2::Comment] parsed result object
|
|
712
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
713
|
+
#
|
|
714
|
+
# @return [Google::Apis::DriveV2::Comment]
|
|
715
|
+
#
|
|
716
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
717
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
718
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
719
|
+
def patch_comment(file_id, comment_id, comment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
720
|
+
command = make_simple_command(:patch, 'files/{fileId}/comments/{commentId}', options)
|
|
721
|
+
command.request_representation = Google::Apis::DriveV2::Comment::Representation
|
|
722
|
+
command.request_object = comment_object
|
|
723
|
+
command.response_representation = Google::Apis::DriveV2::Comment::Representation
|
|
724
|
+
command.response_class = Google::Apis::DriveV2::Comment
|
|
725
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
726
|
+
command.params['commentId'] = comment_id unless comment_id.nil?
|
|
727
|
+
command.query['fields'] = fields unless fields.nil?
|
|
728
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
729
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
730
|
+
execute_or_queue_command(command, &block)
|
|
731
|
+
end
|
|
732
|
+
|
|
733
|
+
# Updates an existing comment.
|
|
734
|
+
# @param [String] file_id
|
|
735
|
+
# The ID of the file.
|
|
736
|
+
# @param [String] comment_id
|
|
737
|
+
# The ID of the comment.
|
|
738
|
+
# @param [Google::Apis::DriveV2::Comment] comment_object
|
|
739
|
+
# @param [String] fields
|
|
740
|
+
# Selector specifying which fields to include in a partial response.
|
|
741
|
+
# @param [String] quota_user
|
|
742
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
743
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
744
|
+
# Overrides userIp if both are provided.
|
|
745
|
+
# @param [String] user_ip
|
|
746
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
747
|
+
# enforce per-user limits.
|
|
748
|
+
# @param [Google::Apis::RequestOptions] options
|
|
749
|
+
# Request-specific options
|
|
750
|
+
#
|
|
751
|
+
# @yield [result, err] Result & error if block supplied
|
|
752
|
+
# @yieldparam result [Google::Apis::DriveV2::Comment] parsed result object
|
|
753
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
754
|
+
#
|
|
755
|
+
# @return [Google::Apis::DriveV2::Comment]
|
|
756
|
+
#
|
|
757
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
758
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
759
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
760
|
+
def update_comment(file_id, comment_id, comment_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
761
|
+
command = make_simple_command(:put, 'files/{fileId}/comments/{commentId}', options)
|
|
762
|
+
command.request_representation = Google::Apis::DriveV2::Comment::Representation
|
|
763
|
+
command.request_object = comment_object
|
|
764
|
+
command.response_representation = Google::Apis::DriveV2::Comment::Representation
|
|
765
|
+
command.response_class = Google::Apis::DriveV2::Comment
|
|
766
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
767
|
+
command.params['commentId'] = comment_id unless comment_id.nil?
|
|
768
|
+
command.query['fields'] = fields unless fields.nil?
|
|
769
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
770
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
771
|
+
execute_or_queue_command(command, &block)
|
|
772
|
+
end
|
|
773
|
+
|
|
774
|
+
# Creates a copy of the specified file.
|
|
775
|
+
# @param [String] file_id
|
|
776
|
+
# The ID of the file to copy.
|
|
777
|
+
# @param [Google::Apis::DriveV2::File] file_object
|
|
778
|
+
# @param [Boolean] convert
|
|
779
|
+
# Whether to convert this file to the corresponding Google Docs format.
|
|
780
|
+
# @param [Boolean] ocr
|
|
781
|
+
# Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
|
|
782
|
+
# @param [String] ocr_language
|
|
783
|
+
# If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
|
|
784
|
+
# @param [Boolean] pinned
|
|
785
|
+
# Whether to pin the head revision of the new copy. A file can have a maximum of
|
|
786
|
+
# 200 pinned revisions.
|
|
787
|
+
# @param [String] timed_text_language
|
|
788
|
+
# The language of the timed text.
|
|
789
|
+
# @param [String] timed_text_track_name
|
|
790
|
+
# The timed text track name.
|
|
791
|
+
# @param [String] visibility
|
|
792
|
+
# The visibility of the new file. This parameter is only relevant when the
|
|
793
|
+
# source is not a native Google Doc and convert=false.
|
|
794
|
+
# @param [String] fields
|
|
795
|
+
# Selector specifying which fields to include in a partial response.
|
|
796
|
+
# @param [String] quota_user
|
|
797
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
798
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
799
|
+
# Overrides userIp if both are provided.
|
|
800
|
+
# @param [String] user_ip
|
|
801
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
802
|
+
# enforce per-user limits.
|
|
803
|
+
# @param [Google::Apis::RequestOptions] options
|
|
804
|
+
# Request-specific options
|
|
805
|
+
#
|
|
806
|
+
# @yield [result, err] Result & error if block supplied
|
|
807
|
+
# @yieldparam result [Google::Apis::DriveV2::File] parsed result object
|
|
808
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
809
|
+
#
|
|
810
|
+
# @return [Google::Apis::DriveV2::File]
|
|
811
|
+
#
|
|
812
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
813
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
814
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
815
|
+
def copy_file(file_id, file_object = nil, convert: nil, ocr: nil, ocr_language: nil, pinned: nil, timed_text_language: nil, timed_text_track_name: nil, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
816
|
+
command = make_simple_command(:post, 'files/{fileId}/copy', options)
|
|
817
|
+
command.request_representation = Google::Apis::DriveV2::File::Representation
|
|
818
|
+
command.request_object = file_object
|
|
819
|
+
command.response_representation = Google::Apis::DriveV2::File::Representation
|
|
820
|
+
command.response_class = Google::Apis::DriveV2::File
|
|
821
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
822
|
+
command.query['convert'] = convert unless convert.nil?
|
|
823
|
+
command.query['ocr'] = ocr unless ocr.nil?
|
|
824
|
+
command.query['ocrLanguage'] = ocr_language unless ocr_language.nil?
|
|
825
|
+
command.query['pinned'] = pinned unless pinned.nil?
|
|
826
|
+
command.query['timedTextLanguage'] = timed_text_language unless timed_text_language.nil?
|
|
827
|
+
command.query['timedTextTrackName'] = timed_text_track_name unless timed_text_track_name.nil?
|
|
828
|
+
command.query['visibility'] = visibility unless visibility.nil?
|
|
829
|
+
command.query['fields'] = fields unless fields.nil?
|
|
830
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
831
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
832
|
+
execute_or_queue_command(command, &block)
|
|
833
|
+
end
|
|
834
|
+
|
|
835
|
+
# Permanently deletes a file by ID. Skips the trash. The currently authenticated
|
|
836
|
+
# user must own the file.
|
|
837
|
+
# @param [String] file_id
|
|
838
|
+
# The ID of the file to delete.
|
|
839
|
+
# @param [String] fields
|
|
840
|
+
# Selector specifying which fields to include in a partial response.
|
|
841
|
+
# @param [String] quota_user
|
|
842
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
843
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
844
|
+
# Overrides userIp if both are provided.
|
|
845
|
+
# @param [String] user_ip
|
|
846
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
847
|
+
# enforce per-user limits.
|
|
848
|
+
# @param [Google::Apis::RequestOptions] options
|
|
849
|
+
# Request-specific options
|
|
850
|
+
#
|
|
851
|
+
# @yield [result, err] Result & error if block supplied
|
|
852
|
+
# @yieldparam result [NilClass] No result returned for this method
|
|
853
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
854
|
+
#
|
|
855
|
+
# @return [void]
|
|
856
|
+
#
|
|
857
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
858
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
859
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
860
|
+
def delete_file(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
861
|
+
command = make_simple_command(:delete, 'files/{fileId}', options)
|
|
862
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
863
|
+
command.query['fields'] = fields unless fields.nil?
|
|
864
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
865
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
866
|
+
execute_or_queue_command(command, &block)
|
|
867
|
+
end
|
|
868
|
+
|
|
869
|
+
# Permanently deletes all of the user's trashed files.
|
|
870
|
+
# @param [String] fields
|
|
871
|
+
# Selector specifying which fields to include in a partial response.
|
|
872
|
+
# @param [String] quota_user
|
|
873
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
874
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
875
|
+
# Overrides userIp if both are provided.
|
|
876
|
+
# @param [String] user_ip
|
|
877
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
878
|
+
# enforce per-user limits.
|
|
879
|
+
# @param [Google::Apis::RequestOptions] options
|
|
880
|
+
# Request-specific options
|
|
881
|
+
#
|
|
882
|
+
# @yield [result, err] Result & error if block supplied
|
|
883
|
+
# @yieldparam result [NilClass] No result returned for this method
|
|
884
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
885
|
+
#
|
|
886
|
+
# @return [void]
|
|
887
|
+
#
|
|
888
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
889
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
890
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
891
|
+
def empty_trash(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
892
|
+
command = make_simple_command(:delete, 'files/trash', options)
|
|
893
|
+
command.query['fields'] = fields unless fields.nil?
|
|
894
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
895
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
896
|
+
execute_or_queue_command(command, &block)
|
|
897
|
+
end
|
|
898
|
+
|
|
899
|
+
# Generates a set of file IDs which can be provided in insert requests.
|
|
900
|
+
# @param [Fixnum] max_results
|
|
901
|
+
# Maximum number of IDs to return.
|
|
902
|
+
# @param [String] space
|
|
903
|
+
# The space in which the IDs can be used to create new files. Supported values
|
|
904
|
+
# are 'drive' and 'appDataFolder'.
|
|
905
|
+
# @param [String] fields
|
|
906
|
+
# Selector specifying which fields to include in a partial response.
|
|
907
|
+
# @param [String] quota_user
|
|
908
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
909
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
910
|
+
# Overrides userIp if both are provided.
|
|
911
|
+
# @param [String] user_ip
|
|
912
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
913
|
+
# enforce per-user limits.
|
|
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::DriveV2::GeneratedIds] parsed result object
|
|
919
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
920
|
+
#
|
|
921
|
+
# @return [Google::Apis::DriveV2::GeneratedIds]
|
|
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 generate_file_ids(max_results: nil, space: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
927
|
+
command = make_simple_command(:get, 'files/generateIds', options)
|
|
928
|
+
command.response_representation = Google::Apis::DriveV2::GeneratedIds::Representation
|
|
929
|
+
command.response_class = Google::Apis::DriveV2::GeneratedIds
|
|
930
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
|
931
|
+
command.query['space'] = space unless space.nil?
|
|
932
|
+
command.query['fields'] = fields unless fields.nil?
|
|
933
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
934
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
935
|
+
execute_or_queue_command(command, &block)
|
|
936
|
+
end
|
|
937
|
+
|
|
938
|
+
# Gets a file's metadata by ID.
|
|
939
|
+
# @param [String] file_id
|
|
940
|
+
# The ID for the file in question.
|
|
941
|
+
# @param [Boolean] acknowledge_abuse
|
|
942
|
+
# Whether the user is acknowledging the risk of downloading known malware or
|
|
943
|
+
# other abusive files.
|
|
944
|
+
# @param [String] projection
|
|
945
|
+
# This parameter is deprecated and has no function.
|
|
946
|
+
# @param [String] revision_id
|
|
947
|
+
# Specifies the Revision ID that should be downloaded. Ignored unless alt=media
|
|
948
|
+
# is specified.
|
|
949
|
+
# @param [Boolean] update_viewed_date
|
|
950
|
+
# Deprecated: Use files.update with modifiedDateBehavior=noChange,
|
|
951
|
+
# updateViewedDate=true and an empty request body.
|
|
952
|
+
# @param [String] fields
|
|
953
|
+
# Selector specifying which fields to include in a partial response.
|
|
954
|
+
# @param [String] quota_user
|
|
955
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
956
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
957
|
+
# Overrides userIp if both are provided.
|
|
958
|
+
# @param [String] user_ip
|
|
959
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
960
|
+
# enforce per-user limits.
|
|
961
|
+
# @param [IO, String] download_dest
|
|
962
|
+
# IO stream or filename to receive content download
|
|
963
|
+
# @param [Google::Apis::RequestOptions] options
|
|
964
|
+
# Request-specific options
|
|
965
|
+
#
|
|
966
|
+
# @yield [result, err] Result & error if block supplied
|
|
967
|
+
# @yieldparam result [Google::Apis::DriveV2::File] parsed result object
|
|
968
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
969
|
+
#
|
|
970
|
+
# @return [Google::Apis::DriveV2::File]
|
|
971
|
+
#
|
|
972
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
973
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
974
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
975
|
+
def get_file(file_id, acknowledge_abuse: nil, projection: nil, revision_id: nil, update_viewed_date: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
|
|
976
|
+
if download_dest.nil?
|
|
977
|
+
command = make_simple_command(:get, 'files/{fileId}', options)
|
|
978
|
+
else
|
|
979
|
+
command = make_download_command(:get, 'files/{fileId}', options)
|
|
980
|
+
command.download_dest = download_dest
|
|
981
|
+
end
|
|
982
|
+
command.response_representation = Google::Apis::DriveV2::File::Representation
|
|
983
|
+
command.response_class = Google::Apis::DriveV2::File
|
|
984
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
985
|
+
command.query['acknowledgeAbuse'] = acknowledge_abuse unless acknowledge_abuse.nil?
|
|
986
|
+
command.query['projection'] = projection unless projection.nil?
|
|
987
|
+
command.query['revisionId'] = revision_id unless revision_id.nil?
|
|
988
|
+
command.query['updateViewedDate'] = update_viewed_date unless update_viewed_date.nil?
|
|
989
|
+
command.query['fields'] = fields unless fields.nil?
|
|
990
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
991
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
992
|
+
execute_or_queue_command(command, &block)
|
|
993
|
+
end
|
|
994
|
+
|
|
995
|
+
# Insert a new file.
|
|
996
|
+
# @param [Google::Apis::DriveV2::File] file_object
|
|
997
|
+
# @param [Boolean] convert
|
|
998
|
+
# Whether to convert this file to the corresponding Google Docs format.
|
|
999
|
+
# @param [Boolean] ocr
|
|
1000
|
+
# Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
|
|
1001
|
+
# @param [String] ocr_language
|
|
1002
|
+
# If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
|
|
1003
|
+
# @param [Boolean] pinned
|
|
1004
|
+
# Whether to pin the head revision of the uploaded file. A file can have a
|
|
1005
|
+
# maximum of 200 pinned revisions.
|
|
1006
|
+
# @param [String] timed_text_language
|
|
1007
|
+
# The language of the timed text.
|
|
1008
|
+
# @param [String] timed_text_track_name
|
|
1009
|
+
# The timed text track name.
|
|
1010
|
+
# @param [Boolean] use_content_as_indexable_text
|
|
1011
|
+
# Whether to use the content as indexable text.
|
|
1012
|
+
# @param [String] visibility
|
|
1013
|
+
# The visibility of the new file. This parameter is only relevant when convert=
|
|
1014
|
+
# false.
|
|
1015
|
+
# @param [String] fields
|
|
1016
|
+
# Selector specifying which fields to include in a partial response.
|
|
1017
|
+
# @param [String] quota_user
|
|
1018
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1019
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1020
|
+
# Overrides userIp if both are provided.
|
|
1021
|
+
# @param [String] user_ip
|
|
1022
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1023
|
+
# enforce per-user limits.
|
|
1024
|
+
# @param [IO, String] upload_source
|
|
1025
|
+
# IO stream or filename containing content to upload
|
|
1026
|
+
# @param [String] content_type
|
|
1027
|
+
# Content type of the uploaded content.
|
|
1028
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1029
|
+
# Request-specific options
|
|
1030
|
+
#
|
|
1031
|
+
# @yield [result, err] Result & error if block supplied
|
|
1032
|
+
# @yieldparam result [Google::Apis::DriveV2::File] parsed result object
|
|
1033
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1034
|
+
#
|
|
1035
|
+
# @return [Google::Apis::DriveV2::File]
|
|
1036
|
+
#
|
|
1037
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1038
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1039
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1040
|
+
def insert_file(file_object = nil, convert: nil, ocr: nil, ocr_language: nil, pinned: nil, timed_text_language: nil, timed_text_track_name: nil, use_content_as_indexable_text: nil, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
|
|
1041
|
+
if upload_source.nil?
|
|
1042
|
+
command = make_simple_command(:post, 'files', options)
|
|
1043
|
+
else
|
|
1044
|
+
command = make_upload_command(:post, 'files', options)
|
|
1045
|
+
command.upload_source = upload_source
|
|
1046
|
+
command.upload_content_type = content_type
|
|
1047
|
+
end
|
|
1048
|
+
command.request_representation = Google::Apis::DriveV2::File::Representation
|
|
1049
|
+
command.request_object = file_object
|
|
1050
|
+
command.response_representation = Google::Apis::DriveV2::File::Representation
|
|
1051
|
+
command.response_class = Google::Apis::DriveV2::File
|
|
1052
|
+
command.query['convert'] = convert unless convert.nil?
|
|
1053
|
+
command.query['ocr'] = ocr unless ocr.nil?
|
|
1054
|
+
command.query['ocrLanguage'] = ocr_language unless ocr_language.nil?
|
|
1055
|
+
command.query['pinned'] = pinned unless pinned.nil?
|
|
1056
|
+
command.query['timedTextLanguage'] = timed_text_language unless timed_text_language.nil?
|
|
1057
|
+
command.query['timedTextTrackName'] = timed_text_track_name unless timed_text_track_name.nil?
|
|
1058
|
+
command.query['useContentAsIndexableText'] = use_content_as_indexable_text unless use_content_as_indexable_text.nil?
|
|
1059
|
+
command.query['visibility'] = visibility unless visibility.nil?
|
|
1060
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1061
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1062
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1063
|
+
execute_or_queue_command(command, &block)
|
|
1064
|
+
end
|
|
1065
|
+
|
|
1066
|
+
# Lists the user's files.
|
|
1067
|
+
# @param [String] corpus
|
|
1068
|
+
# The body of items (files/documents) to which the query applies.
|
|
1069
|
+
# @param [Fixnum] max_results
|
|
1070
|
+
# Maximum number of files to return.
|
|
1071
|
+
# @param [String] order_by
|
|
1072
|
+
# A comma-separated list of sort keys. Valid keys are 'createdDate', 'folder', '
|
|
1073
|
+
# lastViewedByMeDate', 'modifiedByMeDate', 'modifiedDate', 'quotaBytesUsed', '
|
|
1074
|
+
# recency', 'sharedWithMeDate', 'starred', and 'title'. Each key sorts ascending
|
|
1075
|
+
# by default, but may be reversed with the 'desc' modifier. Example usage: ?
|
|
1076
|
+
# orderBy=folder,modifiedDate desc,title. Please note that there is a current
|
|
1077
|
+
# limitation for users with approximately one million files in which the
|
|
1078
|
+
# requested sort order is ignored.
|
|
1079
|
+
# @param [String] page_token
|
|
1080
|
+
# Page token for files.
|
|
1081
|
+
# @param [String] projection
|
|
1082
|
+
# This parameter is deprecated and has no function.
|
|
1083
|
+
# @param [String] q
|
|
1084
|
+
# Query string for searching files.
|
|
1085
|
+
# @param [String] spaces
|
|
1086
|
+
# A comma-separated list of spaces to query. Supported values are 'drive', '
|
|
1087
|
+
# appDataFolder' and 'photos'.
|
|
1088
|
+
# @param [String] fields
|
|
1089
|
+
# Selector specifying which fields to include in a partial response.
|
|
1090
|
+
# @param [String] quota_user
|
|
1091
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1092
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1093
|
+
# Overrides userIp if both are provided.
|
|
1094
|
+
# @param [String] user_ip
|
|
1095
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1096
|
+
# enforce per-user limits.
|
|
1097
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1098
|
+
# Request-specific options
|
|
1099
|
+
#
|
|
1100
|
+
# @yield [result, err] Result & error if block supplied
|
|
1101
|
+
# @yieldparam result [Google::Apis::DriveV2::FileList] parsed result object
|
|
1102
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1103
|
+
#
|
|
1104
|
+
# @return [Google::Apis::DriveV2::FileList]
|
|
1105
|
+
#
|
|
1106
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1107
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1108
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1109
|
+
def list_files(corpus: nil, max_results: nil, order_by: nil, page_token: nil, projection: nil, q: nil, spaces: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
1110
|
+
command = make_simple_command(:get, 'files', options)
|
|
1111
|
+
command.response_representation = Google::Apis::DriveV2::FileList::Representation
|
|
1112
|
+
command.response_class = Google::Apis::DriveV2::FileList
|
|
1113
|
+
command.query['corpus'] = corpus unless corpus.nil?
|
|
1114
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
|
1115
|
+
command.query['orderBy'] = order_by unless order_by.nil?
|
|
1116
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
1117
|
+
command.query['projection'] = projection unless projection.nil?
|
|
1118
|
+
command.query['q'] = q unless q.nil?
|
|
1119
|
+
command.query['spaces'] = spaces unless spaces.nil?
|
|
1120
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1121
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1122
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1123
|
+
execute_or_queue_command(command, &block)
|
|
1124
|
+
end
|
|
1125
|
+
|
|
1126
|
+
# Updates file metadata and/or content. This method supports patch semantics.
|
|
1127
|
+
# @param [String] file_id
|
|
1128
|
+
# The ID of the file to update.
|
|
1129
|
+
# @param [Google::Apis::DriveV2::File] file_object
|
|
1130
|
+
# @param [String] add_parents
|
|
1131
|
+
# Comma-separated list of parent IDs to add.
|
|
1132
|
+
# @param [Boolean] convert
|
|
1133
|
+
# This parameter is deprecated and has no function.
|
|
1134
|
+
# @param [String] modified_date_behavior
|
|
1135
|
+
# Determines the behavior in which modifiedDate is updated. This overrides
|
|
1136
|
+
# setModifiedDate.
|
|
1137
|
+
# @param [Boolean] new_revision
|
|
1138
|
+
# Whether a blob upload should create a new revision. If false, the blob data in
|
|
1139
|
+
# the current head revision is replaced. If true or not set, a new blob is
|
|
1140
|
+
# created as head revision, and previous unpinned revisions are preserved for a
|
|
1141
|
+
# short period of time. Pinned revisions are stored indefinitely, using
|
|
1142
|
+
# additional storage quota, up to a maximum of 200 revisions. For details on how
|
|
1143
|
+
# revisions are retained, see the Drive Help Center.
|
|
1144
|
+
# @param [Boolean] ocr
|
|
1145
|
+
# Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
|
|
1146
|
+
# @param [String] ocr_language
|
|
1147
|
+
# If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
|
|
1148
|
+
# @param [Boolean] pinned
|
|
1149
|
+
# Whether to pin the new revision. A file can have a maximum of 200 pinned
|
|
1150
|
+
# revisions.
|
|
1151
|
+
# @param [String] remove_parents
|
|
1152
|
+
# Comma-separated list of parent IDs to remove.
|
|
1153
|
+
# @param [Boolean] set_modified_date
|
|
1154
|
+
# Whether to set the modified date with the supplied modified date.
|
|
1155
|
+
# @param [String] timed_text_language
|
|
1156
|
+
# The language of the timed text.
|
|
1157
|
+
# @param [String] timed_text_track_name
|
|
1158
|
+
# The timed text track name.
|
|
1159
|
+
# @param [Boolean] update_viewed_date
|
|
1160
|
+
# Whether to update the view date after successfully updating the file.
|
|
1161
|
+
# @param [Boolean] use_content_as_indexable_text
|
|
1162
|
+
# Whether to use the content as indexable text.
|
|
1163
|
+
# @param [String] fields
|
|
1164
|
+
# Selector specifying which fields to include in a partial response.
|
|
1165
|
+
# @param [String] quota_user
|
|
1166
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1167
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1168
|
+
# Overrides userIp if both are provided.
|
|
1169
|
+
# @param [String] user_ip
|
|
1170
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1171
|
+
# enforce per-user limits.
|
|
1172
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1173
|
+
# Request-specific options
|
|
1174
|
+
#
|
|
1175
|
+
# @yield [result, err] Result & error if block supplied
|
|
1176
|
+
# @yieldparam result [Google::Apis::DriveV2::File] parsed result object
|
|
1177
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1178
|
+
#
|
|
1179
|
+
# @return [Google::Apis::DriveV2::File]
|
|
1180
|
+
#
|
|
1181
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1182
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1183
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1184
|
+
def patch_file(file_id, file_object = nil, add_parents: nil, convert: nil, modified_date_behavior: nil, new_revision: nil, ocr: nil, ocr_language: nil, pinned: nil, remove_parents: nil, set_modified_date: nil, timed_text_language: nil, timed_text_track_name: nil, update_viewed_date: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
1185
|
+
command = make_simple_command(:patch, 'files/{fileId}', options)
|
|
1186
|
+
command.request_representation = Google::Apis::DriveV2::File::Representation
|
|
1187
|
+
command.request_object = file_object
|
|
1188
|
+
command.response_representation = Google::Apis::DriveV2::File::Representation
|
|
1189
|
+
command.response_class = Google::Apis::DriveV2::File
|
|
1190
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
1191
|
+
command.query['addParents'] = add_parents unless add_parents.nil?
|
|
1192
|
+
command.query['convert'] = convert unless convert.nil?
|
|
1193
|
+
command.query['modifiedDateBehavior'] = modified_date_behavior unless modified_date_behavior.nil?
|
|
1194
|
+
command.query['newRevision'] = new_revision unless new_revision.nil?
|
|
1195
|
+
command.query['ocr'] = ocr unless ocr.nil?
|
|
1196
|
+
command.query['ocrLanguage'] = ocr_language unless ocr_language.nil?
|
|
1197
|
+
command.query['pinned'] = pinned unless pinned.nil?
|
|
1198
|
+
command.query['removeParents'] = remove_parents unless remove_parents.nil?
|
|
1199
|
+
command.query['setModifiedDate'] = set_modified_date unless set_modified_date.nil?
|
|
1200
|
+
command.query['timedTextLanguage'] = timed_text_language unless timed_text_language.nil?
|
|
1201
|
+
command.query['timedTextTrackName'] = timed_text_track_name unless timed_text_track_name.nil?
|
|
1202
|
+
command.query['updateViewedDate'] = update_viewed_date unless update_viewed_date.nil?
|
|
1203
|
+
command.query['useContentAsIndexableText'] = use_content_as_indexable_text unless use_content_as_indexable_text.nil?
|
|
1204
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1205
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1206
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1207
|
+
execute_or_queue_command(command, &block)
|
|
1208
|
+
end
|
|
1209
|
+
|
|
1210
|
+
# Set the file's updated time to the current server time.
|
|
1211
|
+
# @param [String] file_id
|
|
1212
|
+
# The ID of the file to update.
|
|
1213
|
+
# @param [String] fields
|
|
1214
|
+
# Selector specifying which fields to include in a partial response.
|
|
1215
|
+
# @param [String] quota_user
|
|
1216
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1217
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1218
|
+
# Overrides userIp if both are provided.
|
|
1219
|
+
# @param [String] user_ip
|
|
1220
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1221
|
+
# enforce per-user limits.
|
|
1222
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1223
|
+
# Request-specific options
|
|
1224
|
+
#
|
|
1225
|
+
# @yield [result, err] Result & error if block supplied
|
|
1226
|
+
# @yieldparam result [Google::Apis::DriveV2::File] parsed result object
|
|
1227
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1228
|
+
#
|
|
1229
|
+
# @return [Google::Apis::DriveV2::File]
|
|
1230
|
+
#
|
|
1231
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1232
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1233
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1234
|
+
def touch_file(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
1235
|
+
command = make_simple_command(:post, 'files/{fileId}/touch', options)
|
|
1236
|
+
command.response_representation = Google::Apis::DriveV2::File::Representation
|
|
1237
|
+
command.response_class = Google::Apis::DriveV2::File
|
|
1238
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
1239
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1240
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1241
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1242
|
+
execute_or_queue_command(command, &block)
|
|
1243
|
+
end
|
|
1244
|
+
|
|
1245
|
+
# Moves a file to the trash. The currently authenticated user must own the file.
|
|
1246
|
+
# @param [String] file_id
|
|
1247
|
+
# The ID of the file to trash.
|
|
1248
|
+
# @param [String] fields
|
|
1249
|
+
# Selector specifying which fields to include in a partial response.
|
|
1250
|
+
# @param [String] quota_user
|
|
1251
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1252
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1253
|
+
# Overrides userIp if both are provided.
|
|
1254
|
+
# @param [String] user_ip
|
|
1255
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1256
|
+
# enforce per-user limits.
|
|
1257
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1258
|
+
# Request-specific options
|
|
1259
|
+
#
|
|
1260
|
+
# @yield [result, err] Result & error if block supplied
|
|
1261
|
+
# @yieldparam result [Google::Apis::DriveV2::File] parsed result object
|
|
1262
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1263
|
+
#
|
|
1264
|
+
# @return [Google::Apis::DriveV2::File]
|
|
1265
|
+
#
|
|
1266
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1267
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1268
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1269
|
+
def trash_file(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
1270
|
+
command = make_simple_command(:post, 'files/{fileId}/trash', options)
|
|
1271
|
+
command.response_representation = Google::Apis::DriveV2::File::Representation
|
|
1272
|
+
command.response_class = Google::Apis::DriveV2::File
|
|
1273
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
1274
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1275
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1276
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1277
|
+
execute_or_queue_command(command, &block)
|
|
1278
|
+
end
|
|
1279
|
+
|
|
1280
|
+
# Restores a file from the trash.
|
|
1281
|
+
# @param [String] file_id
|
|
1282
|
+
# The ID of the file to untrash.
|
|
1283
|
+
# @param [String] fields
|
|
1284
|
+
# Selector specifying which fields to include in a partial response.
|
|
1285
|
+
# @param [String] quota_user
|
|
1286
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1287
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1288
|
+
# Overrides userIp if both are provided.
|
|
1289
|
+
# @param [String] user_ip
|
|
1290
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1291
|
+
# enforce per-user limits.
|
|
1292
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1293
|
+
# Request-specific options
|
|
1294
|
+
#
|
|
1295
|
+
# @yield [result, err] Result & error if block supplied
|
|
1296
|
+
# @yieldparam result [Google::Apis::DriveV2::File] parsed result object
|
|
1297
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1298
|
+
#
|
|
1299
|
+
# @return [Google::Apis::DriveV2::File]
|
|
1300
|
+
#
|
|
1301
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1302
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1303
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1304
|
+
def untrash_file(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
1305
|
+
command = make_simple_command(:post, 'files/{fileId}/untrash', options)
|
|
1306
|
+
command.response_representation = Google::Apis::DriveV2::File::Representation
|
|
1307
|
+
command.response_class = Google::Apis::DriveV2::File
|
|
1308
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
1309
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1310
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1311
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1312
|
+
execute_or_queue_command(command, &block)
|
|
1313
|
+
end
|
|
1314
|
+
|
|
1315
|
+
# Updates file metadata and/or content.
|
|
1316
|
+
# @param [String] file_id
|
|
1317
|
+
# The ID of the file to update.
|
|
1318
|
+
# @param [Google::Apis::DriveV2::File] file_object
|
|
1319
|
+
# @param [String] add_parents
|
|
1320
|
+
# Comma-separated list of parent IDs to add.
|
|
1321
|
+
# @param [Boolean] convert
|
|
1322
|
+
# This parameter is deprecated and has no function.
|
|
1323
|
+
# @param [String] modified_date_behavior
|
|
1324
|
+
# Determines the behavior in which modifiedDate is updated. This overrides
|
|
1325
|
+
# setModifiedDate.
|
|
1326
|
+
# @param [Boolean] new_revision
|
|
1327
|
+
# Whether a blob upload should create a new revision. If false, the blob data in
|
|
1328
|
+
# the current head revision is replaced. If true or not set, a new blob is
|
|
1329
|
+
# created as head revision, and previous unpinned revisions are preserved for a
|
|
1330
|
+
# short period of time. Pinned revisions are stored indefinitely, using
|
|
1331
|
+
# additional storage quota, up to a maximum of 200 revisions. For details on how
|
|
1332
|
+
# revisions are retained, see the Drive Help Center.
|
|
1333
|
+
# @param [Boolean] ocr
|
|
1334
|
+
# Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
|
|
1335
|
+
# @param [String] ocr_language
|
|
1336
|
+
# If ocr is true, hints at the language to use. Valid values are BCP 47 codes.
|
|
1337
|
+
# @param [Boolean] pinned
|
|
1338
|
+
# Whether to pin the new revision. A file can have a maximum of 200 pinned
|
|
1339
|
+
# revisions.
|
|
1340
|
+
# @param [String] remove_parents
|
|
1341
|
+
# Comma-separated list of parent IDs to remove.
|
|
1342
|
+
# @param [Boolean] set_modified_date
|
|
1343
|
+
# Whether to set the modified date with the supplied modified date.
|
|
1344
|
+
# @param [String] timed_text_language
|
|
1345
|
+
# The language of the timed text.
|
|
1346
|
+
# @param [String] timed_text_track_name
|
|
1347
|
+
# The timed text track name.
|
|
1348
|
+
# @param [Boolean] update_viewed_date
|
|
1349
|
+
# Whether to update the view date after successfully updating the file.
|
|
1350
|
+
# @param [Boolean] use_content_as_indexable_text
|
|
1351
|
+
# Whether to use the content as indexable text.
|
|
1352
|
+
# @param [String] fields
|
|
1353
|
+
# Selector specifying which fields to include in a partial response.
|
|
1354
|
+
# @param [String] quota_user
|
|
1355
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1356
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1357
|
+
# Overrides userIp if both are provided.
|
|
1358
|
+
# @param [String] user_ip
|
|
1359
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1360
|
+
# enforce per-user limits.
|
|
1361
|
+
# @param [IO, String] upload_source
|
|
1362
|
+
# IO stream or filename containing content to upload
|
|
1363
|
+
# @param [String] content_type
|
|
1364
|
+
# Content type of the uploaded content.
|
|
1365
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1366
|
+
# Request-specific options
|
|
1367
|
+
#
|
|
1368
|
+
# @yield [result, err] Result & error if block supplied
|
|
1369
|
+
# @yieldparam result [Google::Apis::DriveV2::File] parsed result object
|
|
1370
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1371
|
+
#
|
|
1372
|
+
# @return [Google::Apis::DriveV2::File]
|
|
1373
|
+
#
|
|
1374
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1375
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1376
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1377
|
+
def update_file(file_id, file_object = nil, add_parents: nil, convert: nil, modified_date_behavior: nil, new_revision: nil, ocr: nil, ocr_language: nil, pinned: nil, remove_parents: nil, set_modified_date: nil, timed_text_language: nil, timed_text_track_name: nil, update_viewed_date: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
|
|
1378
|
+
if upload_source.nil?
|
|
1379
|
+
command = make_simple_command(:put, 'files/{fileId}', options)
|
|
1380
|
+
else
|
|
1381
|
+
command = make_upload_command(:put, 'files/{fileId}', options)
|
|
1382
|
+
command.upload_source = upload_source
|
|
1383
|
+
command.upload_content_type = content_type
|
|
1384
|
+
end
|
|
1385
|
+
command.request_representation = Google::Apis::DriveV2::File::Representation
|
|
1386
|
+
command.request_object = file_object
|
|
1387
|
+
command.response_representation = Google::Apis::DriveV2::File::Representation
|
|
1388
|
+
command.response_class = Google::Apis::DriveV2::File
|
|
1389
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
1390
|
+
command.query['addParents'] = add_parents unless add_parents.nil?
|
|
1391
|
+
command.query['convert'] = convert unless convert.nil?
|
|
1392
|
+
command.query['modifiedDateBehavior'] = modified_date_behavior unless modified_date_behavior.nil?
|
|
1393
|
+
command.query['newRevision'] = new_revision unless new_revision.nil?
|
|
1394
|
+
command.query['ocr'] = ocr unless ocr.nil?
|
|
1395
|
+
command.query['ocrLanguage'] = ocr_language unless ocr_language.nil?
|
|
1396
|
+
command.query['pinned'] = pinned unless pinned.nil?
|
|
1397
|
+
command.query['removeParents'] = remove_parents unless remove_parents.nil?
|
|
1398
|
+
command.query['setModifiedDate'] = set_modified_date unless set_modified_date.nil?
|
|
1399
|
+
command.query['timedTextLanguage'] = timed_text_language unless timed_text_language.nil?
|
|
1400
|
+
command.query['timedTextTrackName'] = timed_text_track_name unless timed_text_track_name.nil?
|
|
1401
|
+
command.query['updateViewedDate'] = update_viewed_date unless update_viewed_date.nil?
|
|
1402
|
+
command.query['useContentAsIndexableText'] = use_content_as_indexable_text unless use_content_as_indexable_text.nil?
|
|
1403
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1404
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1405
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1406
|
+
execute_or_queue_command(command, &block)
|
|
1407
|
+
end
|
|
1408
|
+
|
|
1409
|
+
# Subscribe to changes on a file
|
|
1410
|
+
# @param [String] file_id
|
|
1411
|
+
# The ID for the file in question.
|
|
1412
|
+
# @param [Google::Apis::DriveV2::Channel] channel_object
|
|
1413
|
+
# @param [Boolean] acknowledge_abuse
|
|
1414
|
+
# Whether the user is acknowledging the risk of downloading known malware or
|
|
1415
|
+
# other abusive files.
|
|
1416
|
+
# @param [String] projection
|
|
1417
|
+
# This parameter is deprecated and has no function.
|
|
1418
|
+
# @param [String] revision_id
|
|
1419
|
+
# Specifies the Revision ID that should be downloaded. Ignored unless alt=media
|
|
1420
|
+
# is specified.
|
|
1421
|
+
# @param [Boolean] update_viewed_date
|
|
1422
|
+
# Deprecated: Use files.update with modifiedDateBehavior=noChange,
|
|
1423
|
+
# updateViewedDate=true and an empty request body.
|
|
1424
|
+
# @param [String] fields
|
|
1425
|
+
# Selector specifying which fields to include in a partial response.
|
|
1426
|
+
# @param [String] quota_user
|
|
1427
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1428
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1429
|
+
# Overrides userIp if both are provided.
|
|
1430
|
+
# @param [String] user_ip
|
|
1431
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1432
|
+
# enforce per-user limits.
|
|
1433
|
+
# @param [IO, String] download_dest
|
|
1434
|
+
# IO stream or filename to receive content download
|
|
1435
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1436
|
+
# Request-specific options
|
|
1437
|
+
#
|
|
1438
|
+
# @yield [result, err] Result & error if block supplied
|
|
1439
|
+
# @yieldparam result [Google::Apis::DriveV2::Channel] parsed result object
|
|
1440
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1441
|
+
#
|
|
1442
|
+
# @return [Google::Apis::DriveV2::Channel]
|
|
1443
|
+
#
|
|
1444
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1445
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1446
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1447
|
+
def watch_file(file_id, channel_object = nil, acknowledge_abuse: nil, projection: nil, revision_id: nil, update_viewed_date: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
|
|
1448
|
+
if download_dest.nil?
|
|
1449
|
+
command = make_simple_command(:post, 'files/{fileId}/watch', options)
|
|
1450
|
+
else
|
|
1451
|
+
command = make_download_command(:post, 'files/{fileId}/watch', options)
|
|
1452
|
+
command.download_dest = download_dest
|
|
1453
|
+
end
|
|
1454
|
+
command.request_representation = Google::Apis::DriveV2::Channel::Representation
|
|
1455
|
+
command.request_object = channel_object
|
|
1456
|
+
command.response_representation = Google::Apis::DriveV2::Channel::Representation
|
|
1457
|
+
command.response_class = Google::Apis::DriveV2::Channel
|
|
1458
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
1459
|
+
command.query['acknowledgeAbuse'] = acknowledge_abuse unless acknowledge_abuse.nil?
|
|
1460
|
+
command.query['projection'] = projection unless projection.nil?
|
|
1461
|
+
command.query['revisionId'] = revision_id unless revision_id.nil?
|
|
1462
|
+
command.query['updateViewedDate'] = update_viewed_date unless update_viewed_date.nil?
|
|
1463
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1464
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1465
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1466
|
+
execute_or_queue_command(command, &block)
|
|
1467
|
+
end
|
|
1468
|
+
|
|
1469
|
+
# Removes a parent from a file.
|
|
1470
|
+
# @param [String] file_id
|
|
1471
|
+
# The ID of the file.
|
|
1472
|
+
# @param [String] parent_id
|
|
1473
|
+
# The ID of the parent.
|
|
1474
|
+
# @param [String] fields
|
|
1475
|
+
# Selector specifying which fields to include in a partial response.
|
|
1476
|
+
# @param [String] quota_user
|
|
1477
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1478
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1479
|
+
# Overrides userIp if both are provided.
|
|
1480
|
+
# @param [String] user_ip
|
|
1481
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1482
|
+
# enforce per-user limits.
|
|
1483
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1484
|
+
# Request-specific options
|
|
1485
|
+
#
|
|
1486
|
+
# @yield [result, err] Result & error if block supplied
|
|
1487
|
+
# @yieldparam result [NilClass] No result returned for this method
|
|
1488
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1489
|
+
#
|
|
1490
|
+
# @return [void]
|
|
1491
|
+
#
|
|
1492
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1493
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1494
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1495
|
+
def delete_parent(file_id, parent_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
1496
|
+
command = make_simple_command(:delete, 'files/{fileId}/parents/{parentId}', options)
|
|
1497
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
1498
|
+
command.params['parentId'] = parent_id unless parent_id.nil?
|
|
1499
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1500
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1501
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1502
|
+
execute_or_queue_command(command, &block)
|
|
1503
|
+
end
|
|
1504
|
+
|
|
1505
|
+
# Gets a specific parent reference.
|
|
1506
|
+
# @param [String] file_id
|
|
1507
|
+
# The ID of the file.
|
|
1508
|
+
# @param [String] parent_id
|
|
1509
|
+
# The ID of the parent.
|
|
1510
|
+
# @param [String] fields
|
|
1511
|
+
# Selector specifying which fields to include in a partial response.
|
|
1512
|
+
# @param [String] quota_user
|
|
1513
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1514
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1515
|
+
# Overrides userIp if both are provided.
|
|
1516
|
+
# @param [String] user_ip
|
|
1517
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1518
|
+
# enforce per-user limits.
|
|
1519
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1520
|
+
# Request-specific options
|
|
1521
|
+
#
|
|
1522
|
+
# @yield [result, err] Result & error if block supplied
|
|
1523
|
+
# @yieldparam result [Google::Apis::DriveV2::ParentReference] parsed result object
|
|
1524
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1525
|
+
#
|
|
1526
|
+
# @return [Google::Apis::DriveV2::ParentReference]
|
|
1527
|
+
#
|
|
1528
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1529
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1530
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1531
|
+
def get_parent(file_id, parent_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
1532
|
+
command = make_simple_command(:get, 'files/{fileId}/parents/{parentId}', options)
|
|
1533
|
+
command.response_representation = Google::Apis::DriveV2::ParentReference::Representation
|
|
1534
|
+
command.response_class = Google::Apis::DriveV2::ParentReference
|
|
1535
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
1536
|
+
command.params['parentId'] = parent_id unless parent_id.nil?
|
|
1537
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1538
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1539
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1540
|
+
execute_or_queue_command(command, &block)
|
|
1541
|
+
end
|
|
1542
|
+
|
|
1543
|
+
# Adds a parent folder for a file.
|
|
1544
|
+
# @param [String] file_id
|
|
1545
|
+
# The ID of the file.
|
|
1546
|
+
# @param [Google::Apis::DriveV2::ParentReference] parent_reference_object
|
|
1547
|
+
# @param [String] fields
|
|
1548
|
+
# Selector specifying which fields to include in a partial response.
|
|
1549
|
+
# @param [String] quota_user
|
|
1550
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1551
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1552
|
+
# Overrides userIp if both are provided.
|
|
1553
|
+
# @param [String] user_ip
|
|
1554
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1555
|
+
# enforce per-user limits.
|
|
1556
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1557
|
+
# Request-specific options
|
|
1558
|
+
#
|
|
1559
|
+
# @yield [result, err] Result & error if block supplied
|
|
1560
|
+
# @yieldparam result [Google::Apis::DriveV2::ParentReference] parsed result object
|
|
1561
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1562
|
+
#
|
|
1563
|
+
# @return [Google::Apis::DriveV2::ParentReference]
|
|
1564
|
+
#
|
|
1565
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1566
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1567
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1568
|
+
def insert_parent(file_id, parent_reference_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
1569
|
+
command = make_simple_command(:post, 'files/{fileId}/parents', options)
|
|
1570
|
+
command.request_representation = Google::Apis::DriveV2::ParentReference::Representation
|
|
1571
|
+
command.request_object = parent_reference_object
|
|
1572
|
+
command.response_representation = Google::Apis::DriveV2::ParentReference::Representation
|
|
1573
|
+
command.response_class = Google::Apis::DriveV2::ParentReference
|
|
1574
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
1575
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1576
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1577
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1578
|
+
execute_or_queue_command(command, &block)
|
|
1579
|
+
end
|
|
1580
|
+
|
|
1581
|
+
# Lists a file's parents.
|
|
1582
|
+
# @param [String] file_id
|
|
1583
|
+
# The ID of the file.
|
|
1584
|
+
# @param [String] fields
|
|
1585
|
+
# Selector specifying which fields to include in a partial response.
|
|
1586
|
+
# @param [String] quota_user
|
|
1587
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1588
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1589
|
+
# Overrides userIp if both are provided.
|
|
1590
|
+
# @param [String] user_ip
|
|
1591
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1592
|
+
# enforce per-user limits.
|
|
1593
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1594
|
+
# Request-specific options
|
|
1595
|
+
#
|
|
1596
|
+
# @yield [result, err] Result & error if block supplied
|
|
1597
|
+
# @yieldparam result [Google::Apis::DriveV2::ParentList] parsed result object
|
|
1598
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1599
|
+
#
|
|
1600
|
+
# @return [Google::Apis::DriveV2::ParentList]
|
|
1601
|
+
#
|
|
1602
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1603
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1604
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1605
|
+
def list_parents(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
1606
|
+
command = make_simple_command(:get, 'files/{fileId}/parents', options)
|
|
1607
|
+
command.response_representation = Google::Apis::DriveV2::ParentList::Representation
|
|
1608
|
+
command.response_class = Google::Apis::DriveV2::ParentList
|
|
1609
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
1610
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1611
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1612
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1613
|
+
execute_or_queue_command(command, &block)
|
|
1614
|
+
end
|
|
1615
|
+
|
|
1616
|
+
# Deletes a permission from a file.
|
|
1617
|
+
# @param [String] file_id
|
|
1618
|
+
# The ID for the file.
|
|
1619
|
+
# @param [String] permission_id
|
|
1620
|
+
# The ID for the permission.
|
|
1621
|
+
# @param [String] fields
|
|
1622
|
+
# Selector specifying which fields to include in a partial response.
|
|
1623
|
+
# @param [String] quota_user
|
|
1624
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1625
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1626
|
+
# Overrides userIp if both are provided.
|
|
1627
|
+
# @param [String] user_ip
|
|
1628
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1629
|
+
# enforce per-user limits.
|
|
1630
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1631
|
+
# Request-specific options
|
|
1632
|
+
#
|
|
1633
|
+
# @yield [result, err] Result & error if block supplied
|
|
1634
|
+
# @yieldparam result [NilClass] No result returned for this method
|
|
1635
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1636
|
+
#
|
|
1637
|
+
# @return [void]
|
|
1638
|
+
#
|
|
1639
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1640
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1641
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1642
|
+
def delete_permission(file_id, permission_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
1643
|
+
command = make_simple_command(:delete, 'files/{fileId}/permissions/{permissionId}', options)
|
|
1644
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
1645
|
+
command.params['permissionId'] = permission_id unless permission_id.nil?
|
|
1646
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1647
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1648
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1649
|
+
execute_or_queue_command(command, &block)
|
|
1650
|
+
end
|
|
1651
|
+
|
|
1652
|
+
# Gets a permission by ID.
|
|
1653
|
+
# @param [String] file_id
|
|
1654
|
+
# The ID for the file.
|
|
1655
|
+
# @param [String] permission_id
|
|
1656
|
+
# The ID for the permission.
|
|
1657
|
+
# @param [String] fields
|
|
1658
|
+
# Selector specifying which fields to include in a partial response.
|
|
1659
|
+
# @param [String] quota_user
|
|
1660
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1661
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1662
|
+
# Overrides userIp if both are provided.
|
|
1663
|
+
# @param [String] user_ip
|
|
1664
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1665
|
+
# enforce per-user limits.
|
|
1666
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1667
|
+
# Request-specific options
|
|
1668
|
+
#
|
|
1669
|
+
# @yield [result, err] Result & error if block supplied
|
|
1670
|
+
# @yieldparam result [Google::Apis::DriveV2::Permission] parsed result object
|
|
1671
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1672
|
+
#
|
|
1673
|
+
# @return [Google::Apis::DriveV2::Permission]
|
|
1674
|
+
#
|
|
1675
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1676
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1677
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1678
|
+
def get_permission(file_id, permission_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
1679
|
+
command = make_simple_command(:get, 'files/{fileId}/permissions/{permissionId}', options)
|
|
1680
|
+
command.response_representation = Google::Apis::DriveV2::Permission::Representation
|
|
1681
|
+
command.response_class = Google::Apis::DriveV2::Permission
|
|
1682
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
1683
|
+
command.params['permissionId'] = permission_id unless permission_id.nil?
|
|
1684
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1685
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1686
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1687
|
+
execute_or_queue_command(command, &block)
|
|
1688
|
+
end
|
|
1689
|
+
|
|
1690
|
+
# Returns the permission ID for an email address.
|
|
1691
|
+
# @param [String] email
|
|
1692
|
+
# The email address for which to return a permission ID
|
|
1693
|
+
# @param [String] fields
|
|
1694
|
+
# Selector specifying which fields to include in a partial response.
|
|
1695
|
+
# @param [String] quota_user
|
|
1696
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1697
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1698
|
+
# Overrides userIp if both are provided.
|
|
1699
|
+
# @param [String] user_ip
|
|
1700
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1701
|
+
# enforce per-user limits.
|
|
1702
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1703
|
+
# Request-specific options
|
|
1704
|
+
#
|
|
1705
|
+
# @yield [result, err] Result & error if block supplied
|
|
1706
|
+
# @yieldparam result [Google::Apis::DriveV2::PermissionId] parsed result object
|
|
1707
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1708
|
+
#
|
|
1709
|
+
# @return [Google::Apis::DriveV2::PermissionId]
|
|
1710
|
+
#
|
|
1711
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1712
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1713
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1714
|
+
def get_permission_id_for_email(email, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
1715
|
+
command = make_simple_command(:get, 'permissionIds/{email}', options)
|
|
1716
|
+
command.response_representation = Google::Apis::DriveV2::PermissionId::Representation
|
|
1717
|
+
command.response_class = Google::Apis::DriveV2::PermissionId
|
|
1718
|
+
command.params['email'] = email unless email.nil?
|
|
1719
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1720
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1721
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1722
|
+
execute_or_queue_command(command, &block)
|
|
1723
|
+
end
|
|
1724
|
+
|
|
1725
|
+
# Inserts a permission for a file.
|
|
1726
|
+
# @param [String] file_id
|
|
1727
|
+
# The ID for the file.
|
|
1728
|
+
# @param [Google::Apis::DriveV2::Permission] permission_object
|
|
1729
|
+
# @param [String] email_message
|
|
1730
|
+
# A custom message to include in notification emails.
|
|
1731
|
+
# @param [Boolean] send_notification_emails
|
|
1732
|
+
# Whether to send notification emails when sharing to users or groups. This
|
|
1733
|
+
# parameter is ignored and an email is sent if the role is owner.
|
|
1734
|
+
# @param [String] fields
|
|
1735
|
+
# Selector specifying which fields to include in a partial response.
|
|
1736
|
+
# @param [String] quota_user
|
|
1737
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1738
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1739
|
+
# Overrides userIp if both are provided.
|
|
1740
|
+
# @param [String] user_ip
|
|
1741
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1742
|
+
# enforce per-user limits.
|
|
1743
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1744
|
+
# Request-specific options
|
|
1745
|
+
#
|
|
1746
|
+
# @yield [result, err] Result & error if block supplied
|
|
1747
|
+
# @yieldparam result [Google::Apis::DriveV2::Permission] parsed result object
|
|
1748
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1749
|
+
#
|
|
1750
|
+
# @return [Google::Apis::DriveV2::Permission]
|
|
1751
|
+
#
|
|
1752
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1753
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1754
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1755
|
+
def insert_permission(file_id, permission_object = nil, email_message: nil, send_notification_emails: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
1756
|
+
command = make_simple_command(:post, 'files/{fileId}/permissions', options)
|
|
1757
|
+
command.request_representation = Google::Apis::DriveV2::Permission::Representation
|
|
1758
|
+
command.request_object = permission_object
|
|
1759
|
+
command.response_representation = Google::Apis::DriveV2::Permission::Representation
|
|
1760
|
+
command.response_class = Google::Apis::DriveV2::Permission
|
|
1761
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
1762
|
+
command.query['emailMessage'] = email_message unless email_message.nil?
|
|
1763
|
+
command.query['sendNotificationEmails'] = send_notification_emails unless send_notification_emails.nil?
|
|
1764
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1765
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1766
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1767
|
+
execute_or_queue_command(command, &block)
|
|
1768
|
+
end
|
|
1769
|
+
|
|
1770
|
+
# Lists a file's permissions.
|
|
1771
|
+
# @param [String] file_id
|
|
1772
|
+
# The ID for the file.
|
|
1773
|
+
# @param [String] fields
|
|
1774
|
+
# Selector specifying which fields to include in a partial response.
|
|
1775
|
+
# @param [String] quota_user
|
|
1776
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1777
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1778
|
+
# Overrides userIp if both are provided.
|
|
1779
|
+
# @param [String] user_ip
|
|
1780
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1781
|
+
# enforce per-user limits.
|
|
1782
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1783
|
+
# Request-specific options
|
|
1784
|
+
#
|
|
1785
|
+
# @yield [result, err] Result & error if block supplied
|
|
1786
|
+
# @yieldparam result [Google::Apis::DriveV2::PermissionList] parsed result object
|
|
1787
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1788
|
+
#
|
|
1789
|
+
# @return [Google::Apis::DriveV2::PermissionList]
|
|
1790
|
+
#
|
|
1791
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1792
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1793
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1794
|
+
def list_permissions(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
1795
|
+
command = make_simple_command(:get, 'files/{fileId}/permissions', options)
|
|
1796
|
+
command.response_representation = Google::Apis::DriveV2::PermissionList::Representation
|
|
1797
|
+
command.response_class = Google::Apis::DriveV2::PermissionList
|
|
1798
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
1799
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1800
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1801
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1802
|
+
execute_or_queue_command(command, &block)
|
|
1803
|
+
end
|
|
1804
|
+
|
|
1805
|
+
# Updates a permission using patch semantics.
|
|
1806
|
+
# @param [String] file_id
|
|
1807
|
+
# The ID for the file.
|
|
1808
|
+
# @param [String] permission_id
|
|
1809
|
+
# The ID for the permission.
|
|
1810
|
+
# @param [Google::Apis::DriveV2::Permission] permission_object
|
|
1811
|
+
# @param [Boolean] transfer_ownership
|
|
1812
|
+
# Whether changing a role to 'owner' downgrades the current owners to writers.
|
|
1813
|
+
# Does nothing if the specified role is not 'owner'.
|
|
1814
|
+
# @param [String] fields
|
|
1815
|
+
# Selector specifying which fields to include in a partial response.
|
|
1816
|
+
# @param [String] quota_user
|
|
1817
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1818
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1819
|
+
# Overrides userIp if both are provided.
|
|
1820
|
+
# @param [String] user_ip
|
|
1821
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1822
|
+
# enforce per-user limits.
|
|
1823
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1824
|
+
# Request-specific options
|
|
1825
|
+
#
|
|
1826
|
+
# @yield [result, err] Result & error if block supplied
|
|
1827
|
+
# @yieldparam result [Google::Apis::DriveV2::Permission] parsed result object
|
|
1828
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1829
|
+
#
|
|
1830
|
+
# @return [Google::Apis::DriveV2::Permission]
|
|
1831
|
+
#
|
|
1832
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1833
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1834
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1835
|
+
def patch_permission(file_id, permission_id, permission_object = nil, transfer_ownership: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
1836
|
+
command = make_simple_command(:patch, 'files/{fileId}/permissions/{permissionId}', options)
|
|
1837
|
+
command.request_representation = Google::Apis::DriveV2::Permission::Representation
|
|
1838
|
+
command.request_object = permission_object
|
|
1839
|
+
command.response_representation = Google::Apis::DriveV2::Permission::Representation
|
|
1840
|
+
command.response_class = Google::Apis::DriveV2::Permission
|
|
1841
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
1842
|
+
command.params['permissionId'] = permission_id unless permission_id.nil?
|
|
1843
|
+
command.query['transferOwnership'] = transfer_ownership unless transfer_ownership.nil?
|
|
1844
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1845
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1846
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1847
|
+
execute_or_queue_command(command, &block)
|
|
1848
|
+
end
|
|
1849
|
+
|
|
1850
|
+
# Updates a permission.
|
|
1851
|
+
# @param [String] file_id
|
|
1852
|
+
# The ID for the file.
|
|
1853
|
+
# @param [String] permission_id
|
|
1854
|
+
# The ID for the permission.
|
|
1855
|
+
# @param [Google::Apis::DriveV2::Permission] permission_object
|
|
1856
|
+
# @param [Boolean] transfer_ownership
|
|
1857
|
+
# Whether changing a role to 'owner' downgrades the current owners to writers.
|
|
1858
|
+
# Does nothing if the specified role is not 'owner'.
|
|
1859
|
+
# @param [String] fields
|
|
1860
|
+
# Selector specifying which fields to include in a partial response.
|
|
1861
|
+
# @param [String] quota_user
|
|
1862
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1863
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1864
|
+
# Overrides userIp if both are provided.
|
|
1865
|
+
# @param [String] user_ip
|
|
1866
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1867
|
+
# enforce per-user limits.
|
|
1868
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1869
|
+
# Request-specific options
|
|
1870
|
+
#
|
|
1871
|
+
# @yield [result, err] Result & error if block supplied
|
|
1872
|
+
# @yieldparam result [Google::Apis::DriveV2::Permission] parsed result object
|
|
1873
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1874
|
+
#
|
|
1875
|
+
# @return [Google::Apis::DriveV2::Permission]
|
|
1876
|
+
#
|
|
1877
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1878
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1879
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1880
|
+
def update_permission(file_id, permission_id, permission_object = nil, transfer_ownership: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
1881
|
+
command = make_simple_command(:put, 'files/{fileId}/permissions/{permissionId}', options)
|
|
1882
|
+
command.request_representation = Google::Apis::DriveV2::Permission::Representation
|
|
1883
|
+
command.request_object = permission_object
|
|
1884
|
+
command.response_representation = Google::Apis::DriveV2::Permission::Representation
|
|
1885
|
+
command.response_class = Google::Apis::DriveV2::Permission
|
|
1886
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
1887
|
+
command.params['permissionId'] = permission_id unless permission_id.nil?
|
|
1888
|
+
command.query['transferOwnership'] = transfer_ownership unless transfer_ownership.nil?
|
|
1889
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1890
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1891
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1892
|
+
execute_or_queue_command(command, &block)
|
|
1893
|
+
end
|
|
1894
|
+
|
|
1895
|
+
# Deletes a property.
|
|
1896
|
+
# @param [String] file_id
|
|
1897
|
+
# The ID of the file.
|
|
1898
|
+
# @param [String] property_key
|
|
1899
|
+
# The key of the property.
|
|
1900
|
+
# @param [String] visibility
|
|
1901
|
+
# The visibility of the property.
|
|
1902
|
+
# @param [String] fields
|
|
1903
|
+
# Selector specifying which fields to include in a partial response.
|
|
1904
|
+
# @param [String] quota_user
|
|
1905
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1906
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1907
|
+
# Overrides userIp if both are provided.
|
|
1908
|
+
# @param [String] user_ip
|
|
1909
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1910
|
+
# enforce per-user limits.
|
|
1911
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1912
|
+
# Request-specific options
|
|
1913
|
+
#
|
|
1914
|
+
# @yield [result, err] Result & error if block supplied
|
|
1915
|
+
# @yieldparam result [NilClass] No result returned for this method
|
|
1916
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1917
|
+
#
|
|
1918
|
+
# @return [void]
|
|
1919
|
+
#
|
|
1920
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1921
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1922
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1923
|
+
def delete_property(file_id, property_key, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
1924
|
+
command = make_simple_command(:delete, 'files/{fileId}/properties/{propertyKey}', options)
|
|
1925
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
1926
|
+
command.params['propertyKey'] = property_key unless property_key.nil?
|
|
1927
|
+
command.query['visibility'] = visibility unless visibility.nil?
|
|
1928
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1929
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1930
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1931
|
+
execute_or_queue_command(command, &block)
|
|
1932
|
+
end
|
|
1933
|
+
|
|
1934
|
+
# Gets a property by its key.
|
|
1935
|
+
# @param [String] file_id
|
|
1936
|
+
# The ID of the file.
|
|
1937
|
+
# @param [String] property_key
|
|
1938
|
+
# The key of the property.
|
|
1939
|
+
# @param [String] visibility
|
|
1940
|
+
# The visibility of the property.
|
|
1941
|
+
# @param [String] fields
|
|
1942
|
+
# Selector specifying which fields to include in a partial response.
|
|
1943
|
+
# @param [String] quota_user
|
|
1944
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1945
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1946
|
+
# Overrides userIp if both are provided.
|
|
1947
|
+
# @param [String] user_ip
|
|
1948
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1949
|
+
# enforce per-user limits.
|
|
1950
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1951
|
+
# Request-specific options
|
|
1952
|
+
#
|
|
1953
|
+
# @yield [result, err] Result & error if block supplied
|
|
1954
|
+
# @yieldparam result [Google::Apis::DriveV2::Property] parsed result object
|
|
1955
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1956
|
+
#
|
|
1957
|
+
# @return [Google::Apis::DriveV2::Property]
|
|
1958
|
+
#
|
|
1959
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1960
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1961
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1962
|
+
def get_property(file_id, property_key, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
1963
|
+
command = make_simple_command(:get, 'files/{fileId}/properties/{propertyKey}', options)
|
|
1964
|
+
command.response_representation = Google::Apis::DriveV2::Property::Representation
|
|
1965
|
+
command.response_class = Google::Apis::DriveV2::Property
|
|
1966
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
1967
|
+
command.params['propertyKey'] = property_key unless property_key.nil?
|
|
1968
|
+
command.query['visibility'] = visibility unless visibility.nil?
|
|
1969
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1970
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1971
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1972
|
+
execute_or_queue_command(command, &block)
|
|
1973
|
+
end
|
|
1974
|
+
|
|
1975
|
+
# Adds a property to a file, or updates it if it already exists.
|
|
1976
|
+
# @param [String] file_id
|
|
1977
|
+
# The ID of the file.
|
|
1978
|
+
# @param [Google::Apis::DriveV2::Property] property_object
|
|
1979
|
+
# @param [String] fields
|
|
1980
|
+
# Selector specifying which fields to include in a partial response.
|
|
1981
|
+
# @param [String] quota_user
|
|
1982
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1983
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1984
|
+
# Overrides userIp if both are provided.
|
|
1985
|
+
# @param [String] user_ip
|
|
1986
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1987
|
+
# enforce per-user limits.
|
|
1988
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1989
|
+
# Request-specific options
|
|
1990
|
+
#
|
|
1991
|
+
# @yield [result, err] Result & error if block supplied
|
|
1992
|
+
# @yieldparam result [Google::Apis::DriveV2::Property] parsed result object
|
|
1993
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1994
|
+
#
|
|
1995
|
+
# @return [Google::Apis::DriveV2::Property]
|
|
1996
|
+
#
|
|
1997
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1998
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1999
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
2000
|
+
def insert_property(file_id, property_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
2001
|
+
command = make_simple_command(:post, 'files/{fileId}/properties', options)
|
|
2002
|
+
command.request_representation = Google::Apis::DriveV2::Property::Representation
|
|
2003
|
+
command.request_object = property_object
|
|
2004
|
+
command.response_representation = Google::Apis::DriveV2::Property::Representation
|
|
2005
|
+
command.response_class = Google::Apis::DriveV2::Property
|
|
2006
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
2007
|
+
command.query['fields'] = fields unless fields.nil?
|
|
2008
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
2009
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
2010
|
+
execute_or_queue_command(command, &block)
|
|
2011
|
+
end
|
|
2012
|
+
|
|
2013
|
+
# Lists a file's properties.
|
|
2014
|
+
# @param [String] file_id
|
|
2015
|
+
# The ID of the file.
|
|
2016
|
+
# @param [String] fields
|
|
2017
|
+
# Selector specifying which fields to include in a partial response.
|
|
2018
|
+
# @param [String] quota_user
|
|
2019
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
2020
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
2021
|
+
# Overrides userIp if both are provided.
|
|
2022
|
+
# @param [String] user_ip
|
|
2023
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
2024
|
+
# enforce per-user limits.
|
|
2025
|
+
# @param [Google::Apis::RequestOptions] options
|
|
2026
|
+
# Request-specific options
|
|
2027
|
+
#
|
|
2028
|
+
# @yield [result, err] Result & error if block supplied
|
|
2029
|
+
# @yieldparam result [Google::Apis::DriveV2::PropertyList] parsed result object
|
|
2030
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
2031
|
+
#
|
|
2032
|
+
# @return [Google::Apis::DriveV2::PropertyList]
|
|
2033
|
+
#
|
|
2034
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
2035
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
2036
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
2037
|
+
def list_properties(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
2038
|
+
command = make_simple_command(:get, 'files/{fileId}/properties', options)
|
|
2039
|
+
command.response_representation = Google::Apis::DriveV2::PropertyList::Representation
|
|
2040
|
+
command.response_class = Google::Apis::DriveV2::PropertyList
|
|
2041
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
2042
|
+
command.query['fields'] = fields unless fields.nil?
|
|
2043
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
2044
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
2045
|
+
execute_or_queue_command(command, &block)
|
|
2046
|
+
end
|
|
2047
|
+
|
|
2048
|
+
# Updates a property, or adds it if it doesn't exist. This method supports patch
|
|
2049
|
+
# semantics.
|
|
2050
|
+
# @param [String] file_id
|
|
2051
|
+
# The ID of the file.
|
|
2052
|
+
# @param [String] property_key
|
|
2053
|
+
# The key of the property.
|
|
2054
|
+
# @param [Google::Apis::DriveV2::Property] property_object
|
|
2055
|
+
# @param [String] visibility
|
|
2056
|
+
# The visibility of the property.
|
|
2057
|
+
# @param [String] fields
|
|
2058
|
+
# Selector specifying which fields to include in a partial response.
|
|
2059
|
+
# @param [String] quota_user
|
|
2060
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
2061
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
2062
|
+
# Overrides userIp if both are provided.
|
|
2063
|
+
# @param [String] user_ip
|
|
2064
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
2065
|
+
# enforce per-user limits.
|
|
2066
|
+
# @param [Google::Apis::RequestOptions] options
|
|
2067
|
+
# Request-specific options
|
|
2068
|
+
#
|
|
2069
|
+
# @yield [result, err] Result & error if block supplied
|
|
2070
|
+
# @yieldparam result [Google::Apis::DriveV2::Property] parsed result object
|
|
2071
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
2072
|
+
#
|
|
2073
|
+
# @return [Google::Apis::DriveV2::Property]
|
|
2074
|
+
#
|
|
2075
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
2076
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
2077
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
2078
|
+
def patch_property(file_id, property_key, property_object = nil, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
2079
|
+
command = make_simple_command(:patch, 'files/{fileId}/properties/{propertyKey}', options)
|
|
2080
|
+
command.request_representation = Google::Apis::DriveV2::Property::Representation
|
|
2081
|
+
command.request_object = property_object
|
|
2082
|
+
command.response_representation = Google::Apis::DriveV2::Property::Representation
|
|
2083
|
+
command.response_class = Google::Apis::DriveV2::Property
|
|
2084
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
2085
|
+
command.params['propertyKey'] = property_key unless property_key.nil?
|
|
2086
|
+
command.query['visibility'] = visibility unless visibility.nil?
|
|
2087
|
+
command.query['fields'] = fields unless fields.nil?
|
|
2088
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
2089
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
2090
|
+
execute_or_queue_command(command, &block)
|
|
2091
|
+
end
|
|
2092
|
+
|
|
2093
|
+
# Updates a property, or adds it if it doesn't exist.
|
|
2094
|
+
# @param [String] file_id
|
|
2095
|
+
# The ID of the file.
|
|
2096
|
+
# @param [String] property_key
|
|
2097
|
+
# The key of the property.
|
|
2098
|
+
# @param [Google::Apis::DriveV2::Property] property_object
|
|
2099
|
+
# @param [String] visibility
|
|
2100
|
+
# The visibility of the property.
|
|
2101
|
+
# @param [String] fields
|
|
2102
|
+
# Selector specifying which fields to include in a partial response.
|
|
2103
|
+
# @param [String] quota_user
|
|
2104
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
2105
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
2106
|
+
# Overrides userIp if both are provided.
|
|
2107
|
+
# @param [String] user_ip
|
|
2108
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
2109
|
+
# enforce per-user limits.
|
|
2110
|
+
# @param [Google::Apis::RequestOptions] options
|
|
2111
|
+
# Request-specific options
|
|
2112
|
+
#
|
|
2113
|
+
# @yield [result, err] Result & error if block supplied
|
|
2114
|
+
# @yieldparam result [Google::Apis::DriveV2::Property] parsed result object
|
|
2115
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
2116
|
+
#
|
|
2117
|
+
# @return [Google::Apis::DriveV2::Property]
|
|
2118
|
+
#
|
|
2119
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
2120
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
2121
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
2122
|
+
def update_property(file_id, property_key, property_object = nil, visibility: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
2123
|
+
command = make_simple_command(:put, 'files/{fileId}/properties/{propertyKey}', options)
|
|
2124
|
+
command.request_representation = Google::Apis::DriveV2::Property::Representation
|
|
2125
|
+
command.request_object = property_object
|
|
2126
|
+
command.response_representation = Google::Apis::DriveV2::Property::Representation
|
|
2127
|
+
command.response_class = Google::Apis::DriveV2::Property
|
|
2128
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
2129
|
+
command.params['propertyKey'] = property_key unless property_key.nil?
|
|
2130
|
+
command.query['visibility'] = visibility unless visibility.nil?
|
|
2131
|
+
command.query['fields'] = fields unless fields.nil?
|
|
2132
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
2133
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
2134
|
+
execute_or_queue_command(command, &block)
|
|
2135
|
+
end
|
|
2136
|
+
|
|
2137
|
+
# Exports the contents of the Realtime API data model associated with this file
|
|
2138
|
+
# as JSON.
|
|
2139
|
+
# @param [String] file_id
|
|
2140
|
+
# The ID of the file that the Realtime API data model is associated with.
|
|
2141
|
+
# @param [Fixnum] revision
|
|
2142
|
+
# The revision of the Realtime API data model to export. Revisions start at 1 (
|
|
2143
|
+
# the initial empty data model) and are incremented with each change. If this
|
|
2144
|
+
# parameter is excluded, the most recent data model will be returned.
|
|
2145
|
+
# @param [String] fields
|
|
2146
|
+
# Selector specifying which fields to include in a partial response.
|
|
2147
|
+
# @param [String] quota_user
|
|
2148
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
2149
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
2150
|
+
# Overrides userIp if both are provided.
|
|
2151
|
+
# @param [String] user_ip
|
|
2152
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
2153
|
+
# enforce per-user limits.
|
|
2154
|
+
# @param [IO, String] download_dest
|
|
2155
|
+
# IO stream or filename to receive content download
|
|
2156
|
+
# @param [Google::Apis::RequestOptions] options
|
|
2157
|
+
# Request-specific options
|
|
2158
|
+
#
|
|
2159
|
+
# @yield [result, err] Result & error if block supplied
|
|
2160
|
+
# @yieldparam result [NilClass] No result returned for this method
|
|
2161
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
2162
|
+
#
|
|
2163
|
+
# @return [void]
|
|
2164
|
+
#
|
|
2165
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
2166
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
2167
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
2168
|
+
def get_realtime(file_id, revision: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
|
|
2169
|
+
if download_dest.nil?
|
|
2170
|
+
command = make_simple_command(:get, 'files/{fileId}/realtime', options)
|
|
2171
|
+
else
|
|
2172
|
+
command = make_download_command(:get, 'files/{fileId}/realtime', options)
|
|
2173
|
+
command.download_dest = download_dest
|
|
2174
|
+
end
|
|
2175
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
2176
|
+
command.query['revision'] = revision unless revision.nil?
|
|
2177
|
+
command.query['fields'] = fields unless fields.nil?
|
|
2178
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
2179
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
2180
|
+
execute_or_queue_command(command, &block)
|
|
2181
|
+
end
|
|
2182
|
+
|
|
2183
|
+
# Overwrites the Realtime API data model associated with this file with the
|
|
2184
|
+
# provided JSON data model.
|
|
2185
|
+
# @param [String] file_id
|
|
2186
|
+
# The ID of the file that the Realtime API data model is associated with.
|
|
2187
|
+
# @param [String] base_revision
|
|
2188
|
+
# The revision of the model to diff the uploaded model against. If set, the
|
|
2189
|
+
# uploaded model is diffed against the provided revision and those differences
|
|
2190
|
+
# are merged with any changes made to the model after the provided revision. If
|
|
2191
|
+
# not set, the uploaded model replaces the current model on the server.
|
|
2192
|
+
# @param [String] fields
|
|
2193
|
+
# Selector specifying which fields to include in a partial response.
|
|
2194
|
+
# @param [String] quota_user
|
|
2195
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
2196
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
2197
|
+
# Overrides userIp if both are provided.
|
|
2198
|
+
# @param [String] user_ip
|
|
2199
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
2200
|
+
# enforce per-user limits.
|
|
2201
|
+
# @param [IO, String] upload_source
|
|
2202
|
+
# IO stream or filename containing content to upload
|
|
2203
|
+
# @param [String] content_type
|
|
2204
|
+
# Content type of the uploaded content.
|
|
2205
|
+
# @param [Google::Apis::RequestOptions] options
|
|
2206
|
+
# Request-specific options
|
|
2207
|
+
#
|
|
2208
|
+
# @yield [result, err] Result & error if block supplied
|
|
2209
|
+
# @yieldparam result [NilClass] No result returned for this method
|
|
2210
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
2211
|
+
#
|
|
2212
|
+
# @return [void]
|
|
2213
|
+
#
|
|
2214
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
2215
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
2216
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
2217
|
+
def update_realtime(file_id, base_revision: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
|
|
2218
|
+
if upload_source.nil?
|
|
2219
|
+
command = make_simple_command(:put, 'files/{fileId}/realtime', options)
|
|
2220
|
+
else
|
|
2221
|
+
command = make_upload_command(:put, 'files/{fileId}/realtime', options)
|
|
2222
|
+
command.upload_source = upload_source
|
|
2223
|
+
command.upload_content_type = content_type
|
|
2224
|
+
end
|
|
2225
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
2226
|
+
command.query['baseRevision'] = base_revision unless base_revision.nil?
|
|
2227
|
+
command.query['fields'] = fields unless fields.nil?
|
|
2228
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
2229
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
2230
|
+
execute_or_queue_command(command, &block)
|
|
2231
|
+
end
|
|
2232
|
+
|
|
2233
|
+
# Deletes a reply.
|
|
2234
|
+
# @param [String] file_id
|
|
2235
|
+
# The ID of the file.
|
|
2236
|
+
# @param [String] comment_id
|
|
2237
|
+
# The ID of the comment.
|
|
2238
|
+
# @param [String] reply_id
|
|
2239
|
+
# The ID of the reply.
|
|
2240
|
+
# @param [String] fields
|
|
2241
|
+
# Selector specifying which fields to include in a partial response.
|
|
2242
|
+
# @param [String] quota_user
|
|
2243
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
2244
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
2245
|
+
# Overrides userIp if both are provided.
|
|
2246
|
+
# @param [String] user_ip
|
|
2247
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
2248
|
+
# enforce per-user limits.
|
|
2249
|
+
# @param [Google::Apis::RequestOptions] options
|
|
2250
|
+
# Request-specific options
|
|
2251
|
+
#
|
|
2252
|
+
# @yield [result, err] Result & error if block supplied
|
|
2253
|
+
# @yieldparam result [NilClass] No result returned for this method
|
|
2254
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
2255
|
+
#
|
|
2256
|
+
# @return [void]
|
|
2257
|
+
#
|
|
2258
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
2259
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
2260
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
2261
|
+
def delete_reply(file_id, comment_id, reply_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
2262
|
+
command = make_simple_command(:delete, 'files/{fileId}/comments/{commentId}/replies/{replyId}', options)
|
|
2263
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
2264
|
+
command.params['commentId'] = comment_id unless comment_id.nil?
|
|
2265
|
+
command.params['replyId'] = reply_id unless reply_id.nil?
|
|
2266
|
+
command.query['fields'] = fields unless fields.nil?
|
|
2267
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
2268
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
2269
|
+
execute_or_queue_command(command, &block)
|
|
2270
|
+
end
|
|
2271
|
+
|
|
2272
|
+
# Gets a reply.
|
|
2273
|
+
# @param [String] file_id
|
|
2274
|
+
# The ID of the file.
|
|
2275
|
+
# @param [String] comment_id
|
|
2276
|
+
# The ID of the comment.
|
|
2277
|
+
# @param [String] reply_id
|
|
2278
|
+
# The ID of the reply.
|
|
2279
|
+
# @param [Boolean] include_deleted
|
|
2280
|
+
# If set, this will succeed when retrieving a deleted reply.
|
|
2281
|
+
# @param [String] fields
|
|
2282
|
+
# Selector specifying which fields to include in a partial response.
|
|
2283
|
+
# @param [String] quota_user
|
|
2284
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
2285
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
2286
|
+
# Overrides userIp if both are provided.
|
|
2287
|
+
# @param [String] user_ip
|
|
2288
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
2289
|
+
# enforce per-user limits.
|
|
2290
|
+
# @param [Google::Apis::RequestOptions] options
|
|
2291
|
+
# Request-specific options
|
|
2292
|
+
#
|
|
2293
|
+
# @yield [result, err] Result & error if block supplied
|
|
2294
|
+
# @yieldparam result [Google::Apis::DriveV2::CommentReply] parsed result object
|
|
2295
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
2296
|
+
#
|
|
2297
|
+
# @return [Google::Apis::DriveV2::CommentReply]
|
|
2298
|
+
#
|
|
2299
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
2300
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
2301
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
2302
|
+
def get_reply(file_id, comment_id, reply_id, include_deleted: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
2303
|
+
command = make_simple_command(:get, 'files/{fileId}/comments/{commentId}/replies/{replyId}', options)
|
|
2304
|
+
command.response_representation = Google::Apis::DriveV2::CommentReply::Representation
|
|
2305
|
+
command.response_class = Google::Apis::DriveV2::CommentReply
|
|
2306
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
2307
|
+
command.params['commentId'] = comment_id unless comment_id.nil?
|
|
2308
|
+
command.params['replyId'] = reply_id unless reply_id.nil?
|
|
2309
|
+
command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
|
|
2310
|
+
command.query['fields'] = fields unless fields.nil?
|
|
2311
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
2312
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
2313
|
+
execute_or_queue_command(command, &block)
|
|
2314
|
+
end
|
|
2315
|
+
|
|
2316
|
+
# Creates a new reply to the given comment.
|
|
2317
|
+
# @param [String] file_id
|
|
2318
|
+
# The ID of the file.
|
|
2319
|
+
# @param [String] comment_id
|
|
2320
|
+
# The ID of the comment.
|
|
2321
|
+
# @param [Google::Apis::DriveV2::CommentReply] comment_reply_object
|
|
2322
|
+
# @param [String] fields
|
|
2323
|
+
# Selector specifying which fields to include in a partial response.
|
|
2324
|
+
# @param [String] quota_user
|
|
2325
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
2326
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
2327
|
+
# Overrides userIp if both are provided.
|
|
2328
|
+
# @param [String] user_ip
|
|
2329
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
2330
|
+
# enforce per-user limits.
|
|
2331
|
+
# @param [Google::Apis::RequestOptions] options
|
|
2332
|
+
# Request-specific options
|
|
2333
|
+
#
|
|
2334
|
+
# @yield [result, err] Result & error if block supplied
|
|
2335
|
+
# @yieldparam result [Google::Apis::DriveV2::CommentReply] parsed result object
|
|
2336
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
2337
|
+
#
|
|
2338
|
+
# @return [Google::Apis::DriveV2::CommentReply]
|
|
2339
|
+
#
|
|
2340
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
2341
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
2342
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
2343
|
+
def insert_reply(file_id, comment_id, comment_reply_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
2344
|
+
command = make_simple_command(:post, 'files/{fileId}/comments/{commentId}/replies', options)
|
|
2345
|
+
command.request_representation = Google::Apis::DriveV2::CommentReply::Representation
|
|
2346
|
+
command.request_object = comment_reply_object
|
|
2347
|
+
command.response_representation = Google::Apis::DriveV2::CommentReply::Representation
|
|
2348
|
+
command.response_class = Google::Apis::DriveV2::CommentReply
|
|
2349
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
2350
|
+
command.params['commentId'] = comment_id unless comment_id.nil?
|
|
2351
|
+
command.query['fields'] = fields unless fields.nil?
|
|
2352
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
2353
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
2354
|
+
execute_or_queue_command(command, &block)
|
|
2355
|
+
end
|
|
2356
|
+
|
|
2357
|
+
# Lists all of the replies to a comment.
|
|
2358
|
+
# @param [String] file_id
|
|
2359
|
+
# The ID of the file.
|
|
2360
|
+
# @param [String] comment_id
|
|
2361
|
+
# The ID of the comment.
|
|
2362
|
+
# @param [Boolean] include_deleted
|
|
2363
|
+
# If set, all replies, including deleted replies (with content stripped) will be
|
|
2364
|
+
# returned.
|
|
2365
|
+
# @param [Fixnum] max_results
|
|
2366
|
+
# The maximum number of replies to include in the response, used for paging.
|
|
2367
|
+
# @param [String] page_token
|
|
2368
|
+
# The continuation token, used to page through large result sets. To get the
|
|
2369
|
+
# next page of results, set this parameter to the value of "nextPageToken" from
|
|
2370
|
+
# the previous response.
|
|
2371
|
+
# @param [String] fields
|
|
2372
|
+
# Selector specifying which fields to include in a partial response.
|
|
2373
|
+
# @param [String] quota_user
|
|
2374
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
2375
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
2376
|
+
# Overrides userIp if both are provided.
|
|
2377
|
+
# @param [String] user_ip
|
|
2378
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
2379
|
+
# enforce per-user limits.
|
|
2380
|
+
# @param [Google::Apis::RequestOptions] options
|
|
2381
|
+
# Request-specific options
|
|
2382
|
+
#
|
|
2383
|
+
# @yield [result, err] Result & error if block supplied
|
|
2384
|
+
# @yieldparam result [Google::Apis::DriveV2::CommentReplyList] parsed result object
|
|
2385
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
2386
|
+
#
|
|
2387
|
+
# @return [Google::Apis::DriveV2::CommentReplyList]
|
|
2388
|
+
#
|
|
2389
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
2390
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
2391
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
2392
|
+
def list_replies(file_id, comment_id, include_deleted: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
2393
|
+
command = make_simple_command(:get, 'files/{fileId}/comments/{commentId}/replies', options)
|
|
2394
|
+
command.response_representation = Google::Apis::DriveV2::CommentReplyList::Representation
|
|
2395
|
+
command.response_class = Google::Apis::DriveV2::CommentReplyList
|
|
2396
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
2397
|
+
command.params['commentId'] = comment_id unless comment_id.nil?
|
|
2398
|
+
command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
|
|
2399
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
|
2400
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
2401
|
+
command.query['fields'] = fields unless fields.nil?
|
|
2402
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
2403
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
2404
|
+
execute_or_queue_command(command, &block)
|
|
2405
|
+
end
|
|
2406
|
+
|
|
2407
|
+
# Updates an existing reply. This method supports patch semantics.
|
|
2408
|
+
# @param [String] file_id
|
|
2409
|
+
# The ID of the file.
|
|
2410
|
+
# @param [String] comment_id
|
|
2411
|
+
# The ID of the comment.
|
|
2412
|
+
# @param [String] reply_id
|
|
2413
|
+
# The ID of the reply.
|
|
2414
|
+
# @param [Google::Apis::DriveV2::CommentReply] comment_reply_object
|
|
2415
|
+
# @param [String] fields
|
|
2416
|
+
# Selector specifying which fields to include in a partial response.
|
|
2417
|
+
# @param [String] quota_user
|
|
2418
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
2419
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
2420
|
+
# Overrides userIp if both are provided.
|
|
2421
|
+
# @param [String] user_ip
|
|
2422
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
2423
|
+
# enforce per-user limits.
|
|
2424
|
+
# @param [Google::Apis::RequestOptions] options
|
|
2425
|
+
# Request-specific options
|
|
2426
|
+
#
|
|
2427
|
+
# @yield [result, err] Result & error if block supplied
|
|
2428
|
+
# @yieldparam result [Google::Apis::DriveV2::CommentReply] parsed result object
|
|
2429
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
2430
|
+
#
|
|
2431
|
+
# @return [Google::Apis::DriveV2::CommentReply]
|
|
2432
|
+
#
|
|
2433
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
2434
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
2435
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
2436
|
+
def patch_reply(file_id, comment_id, reply_id, comment_reply_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
2437
|
+
command = make_simple_command(:patch, 'files/{fileId}/comments/{commentId}/replies/{replyId}', options)
|
|
2438
|
+
command.request_representation = Google::Apis::DriveV2::CommentReply::Representation
|
|
2439
|
+
command.request_object = comment_reply_object
|
|
2440
|
+
command.response_representation = Google::Apis::DriveV2::CommentReply::Representation
|
|
2441
|
+
command.response_class = Google::Apis::DriveV2::CommentReply
|
|
2442
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
2443
|
+
command.params['commentId'] = comment_id unless comment_id.nil?
|
|
2444
|
+
command.params['replyId'] = reply_id unless reply_id.nil?
|
|
2445
|
+
command.query['fields'] = fields unless fields.nil?
|
|
2446
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
2447
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
2448
|
+
execute_or_queue_command(command, &block)
|
|
2449
|
+
end
|
|
2450
|
+
|
|
2451
|
+
# Updates an existing reply.
|
|
2452
|
+
# @param [String] file_id
|
|
2453
|
+
# The ID of the file.
|
|
2454
|
+
# @param [String] comment_id
|
|
2455
|
+
# The ID of the comment.
|
|
2456
|
+
# @param [String] reply_id
|
|
2457
|
+
# The ID of the reply.
|
|
2458
|
+
# @param [Google::Apis::DriveV2::CommentReply] comment_reply_object
|
|
2459
|
+
# @param [String] fields
|
|
2460
|
+
# Selector specifying which fields to include in a partial response.
|
|
2461
|
+
# @param [String] quota_user
|
|
2462
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
2463
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
2464
|
+
# Overrides userIp if both are provided.
|
|
2465
|
+
# @param [String] user_ip
|
|
2466
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
2467
|
+
# enforce per-user limits.
|
|
2468
|
+
# @param [Google::Apis::RequestOptions] options
|
|
2469
|
+
# Request-specific options
|
|
2470
|
+
#
|
|
2471
|
+
# @yield [result, err] Result & error if block supplied
|
|
2472
|
+
# @yieldparam result [Google::Apis::DriveV2::CommentReply] parsed result object
|
|
2473
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
2474
|
+
#
|
|
2475
|
+
# @return [Google::Apis::DriveV2::CommentReply]
|
|
2476
|
+
#
|
|
2477
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
2478
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
2479
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
2480
|
+
def update_reply(file_id, comment_id, reply_id, comment_reply_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
2481
|
+
command = make_simple_command(:put, 'files/{fileId}/comments/{commentId}/replies/{replyId}', options)
|
|
2482
|
+
command.request_representation = Google::Apis::DriveV2::CommentReply::Representation
|
|
2483
|
+
command.request_object = comment_reply_object
|
|
2484
|
+
command.response_representation = Google::Apis::DriveV2::CommentReply::Representation
|
|
2485
|
+
command.response_class = Google::Apis::DriveV2::CommentReply
|
|
2486
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
2487
|
+
command.params['commentId'] = comment_id unless comment_id.nil?
|
|
2488
|
+
command.params['replyId'] = reply_id unless reply_id.nil?
|
|
2489
|
+
command.query['fields'] = fields unless fields.nil?
|
|
2490
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
2491
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
2492
|
+
execute_or_queue_command(command, &block)
|
|
2493
|
+
end
|
|
2494
|
+
|
|
2495
|
+
# Removes a revision.
|
|
2496
|
+
# @param [String] file_id
|
|
2497
|
+
# The ID of the file.
|
|
2498
|
+
# @param [String] revision_id
|
|
2499
|
+
# The ID of the revision.
|
|
2500
|
+
# @param [String] fields
|
|
2501
|
+
# Selector specifying which fields to include in a partial response.
|
|
2502
|
+
# @param [String] quota_user
|
|
2503
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
2504
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
2505
|
+
# Overrides userIp if both are provided.
|
|
2506
|
+
# @param [String] user_ip
|
|
2507
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
2508
|
+
# enforce per-user limits.
|
|
2509
|
+
# @param [Google::Apis::RequestOptions] options
|
|
2510
|
+
# Request-specific options
|
|
2511
|
+
#
|
|
2512
|
+
# @yield [result, err] Result & error if block supplied
|
|
2513
|
+
# @yieldparam result [NilClass] No result returned for this method
|
|
2514
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
2515
|
+
#
|
|
2516
|
+
# @return [void]
|
|
2517
|
+
#
|
|
2518
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
2519
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
2520
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
2521
|
+
def delete_revision(file_id, revision_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
2522
|
+
command = make_simple_command(:delete, 'files/{fileId}/revisions/{revisionId}', options)
|
|
2523
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
2524
|
+
command.params['revisionId'] = revision_id unless revision_id.nil?
|
|
2525
|
+
command.query['fields'] = fields unless fields.nil?
|
|
2526
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
2527
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
2528
|
+
execute_or_queue_command(command, &block)
|
|
2529
|
+
end
|
|
2530
|
+
|
|
2531
|
+
# Gets a specific revision.
|
|
2532
|
+
# @param [String] file_id
|
|
2533
|
+
# The ID of the file.
|
|
2534
|
+
# @param [String] revision_id
|
|
2535
|
+
# The ID of the revision.
|
|
2536
|
+
# @param [String] fields
|
|
2537
|
+
# Selector specifying which fields to include in a partial response.
|
|
2538
|
+
# @param [String] quota_user
|
|
2539
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
2540
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
2541
|
+
# Overrides userIp if both are provided.
|
|
2542
|
+
# @param [String] user_ip
|
|
2543
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
2544
|
+
# enforce per-user limits.
|
|
2545
|
+
# @param [Google::Apis::RequestOptions] options
|
|
2546
|
+
# Request-specific options
|
|
2547
|
+
#
|
|
2548
|
+
# @yield [result, err] Result & error if block supplied
|
|
2549
|
+
# @yieldparam result [Google::Apis::DriveV2::Revision] parsed result object
|
|
2550
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
2551
|
+
#
|
|
2552
|
+
# @return [Google::Apis::DriveV2::Revision]
|
|
2553
|
+
#
|
|
2554
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
2555
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
2556
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
2557
|
+
def get_revision(file_id, revision_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
2558
|
+
command = make_simple_command(:get, 'files/{fileId}/revisions/{revisionId}', options)
|
|
2559
|
+
command.response_representation = Google::Apis::DriveV2::Revision::Representation
|
|
2560
|
+
command.response_class = Google::Apis::DriveV2::Revision
|
|
2561
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
2562
|
+
command.params['revisionId'] = revision_id unless revision_id.nil?
|
|
2563
|
+
command.query['fields'] = fields unless fields.nil?
|
|
2564
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
2565
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
2566
|
+
execute_or_queue_command(command, &block)
|
|
2567
|
+
end
|
|
2568
|
+
|
|
2569
|
+
# Lists a file's revisions.
|
|
2570
|
+
# @param [String] file_id
|
|
2571
|
+
# The ID of the file.
|
|
2572
|
+
# @param [String] fields
|
|
2573
|
+
# Selector specifying which fields to include in a partial response.
|
|
2574
|
+
# @param [String] quota_user
|
|
2575
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
2576
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
2577
|
+
# Overrides userIp if both are provided.
|
|
2578
|
+
# @param [String] user_ip
|
|
2579
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
2580
|
+
# enforce per-user limits.
|
|
2581
|
+
# @param [Google::Apis::RequestOptions] options
|
|
2582
|
+
# Request-specific options
|
|
2583
|
+
#
|
|
2584
|
+
# @yield [result, err] Result & error if block supplied
|
|
2585
|
+
# @yieldparam result [Google::Apis::DriveV2::RevisionList] parsed result object
|
|
2586
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
2587
|
+
#
|
|
2588
|
+
# @return [Google::Apis::DriveV2::RevisionList]
|
|
2589
|
+
#
|
|
2590
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
2591
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
2592
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
2593
|
+
def list_revisions(file_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
2594
|
+
command = make_simple_command(:get, 'files/{fileId}/revisions', options)
|
|
2595
|
+
command.response_representation = Google::Apis::DriveV2::RevisionList::Representation
|
|
2596
|
+
command.response_class = Google::Apis::DriveV2::RevisionList
|
|
2597
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
2598
|
+
command.query['fields'] = fields unless fields.nil?
|
|
2599
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
2600
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
2601
|
+
execute_or_queue_command(command, &block)
|
|
2602
|
+
end
|
|
2603
|
+
|
|
2604
|
+
# Updates a revision. This method supports patch semantics.
|
|
2605
|
+
# @param [String] file_id
|
|
2606
|
+
# The ID for the file.
|
|
2607
|
+
# @param [String] revision_id
|
|
2608
|
+
# The ID for the revision.
|
|
2609
|
+
# @param [Google::Apis::DriveV2::Revision] revision_object
|
|
2610
|
+
# @param [String] fields
|
|
2611
|
+
# Selector specifying which fields to include in a partial response.
|
|
2612
|
+
# @param [String] quota_user
|
|
2613
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
2614
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
2615
|
+
# Overrides userIp if both are provided.
|
|
2616
|
+
# @param [String] user_ip
|
|
2617
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
2618
|
+
# enforce per-user limits.
|
|
2619
|
+
# @param [Google::Apis::RequestOptions] options
|
|
2620
|
+
# Request-specific options
|
|
2621
|
+
#
|
|
2622
|
+
# @yield [result, err] Result & error if block supplied
|
|
2623
|
+
# @yieldparam result [Google::Apis::DriveV2::Revision] parsed result object
|
|
2624
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
2625
|
+
#
|
|
2626
|
+
# @return [Google::Apis::DriveV2::Revision]
|
|
2627
|
+
#
|
|
2628
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
2629
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
2630
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
2631
|
+
def patch_revision(file_id, revision_id, revision_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
2632
|
+
command = make_simple_command(:patch, 'files/{fileId}/revisions/{revisionId}', options)
|
|
2633
|
+
command.request_representation = Google::Apis::DriveV2::Revision::Representation
|
|
2634
|
+
command.request_object = revision_object
|
|
2635
|
+
command.response_representation = Google::Apis::DriveV2::Revision::Representation
|
|
2636
|
+
command.response_class = Google::Apis::DriveV2::Revision
|
|
2637
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
2638
|
+
command.params['revisionId'] = revision_id unless revision_id.nil?
|
|
2639
|
+
command.query['fields'] = fields unless fields.nil?
|
|
2640
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
2641
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
2642
|
+
execute_or_queue_command(command, &block)
|
|
2643
|
+
end
|
|
2644
|
+
|
|
2645
|
+
# Updates a revision.
|
|
2646
|
+
# @param [String] file_id
|
|
2647
|
+
# The ID for the file.
|
|
2648
|
+
# @param [String] revision_id
|
|
2649
|
+
# The ID for the revision.
|
|
2650
|
+
# @param [Google::Apis::DriveV2::Revision] revision_object
|
|
2651
|
+
# @param [String] fields
|
|
2652
|
+
# Selector specifying which fields to include in a partial response.
|
|
2653
|
+
# @param [String] quota_user
|
|
2654
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
2655
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
2656
|
+
# Overrides userIp if both are provided.
|
|
2657
|
+
# @param [String] user_ip
|
|
2658
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
2659
|
+
# enforce per-user limits.
|
|
2660
|
+
# @param [Google::Apis::RequestOptions] options
|
|
2661
|
+
# Request-specific options
|
|
2662
|
+
#
|
|
2663
|
+
# @yield [result, err] Result & error if block supplied
|
|
2664
|
+
# @yieldparam result [Google::Apis::DriveV2::Revision] parsed result object
|
|
2665
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
2666
|
+
#
|
|
2667
|
+
# @return [Google::Apis::DriveV2::Revision]
|
|
2668
|
+
#
|
|
2669
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
2670
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
2671
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
2672
|
+
def update_revision(file_id, revision_id, revision_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
2673
|
+
command = make_simple_command(:put, 'files/{fileId}/revisions/{revisionId}', options)
|
|
2674
|
+
command.request_representation = Google::Apis::DriveV2::Revision::Representation
|
|
2675
|
+
command.request_object = revision_object
|
|
2676
|
+
command.response_representation = Google::Apis::DriveV2::Revision::Representation
|
|
2677
|
+
command.response_class = Google::Apis::DriveV2::Revision
|
|
2678
|
+
command.params['fileId'] = file_id unless file_id.nil?
|
|
2679
|
+
command.params['revisionId'] = revision_id unless revision_id.nil?
|
|
2680
|
+
command.query['fields'] = fields unless fields.nil?
|
|
2681
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
2682
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
2683
|
+
execute_or_queue_command(command, &block)
|
|
2684
|
+
end
|
|
2685
|
+
|
|
2686
|
+
protected
|
|
2687
|
+
|
|
2688
|
+
def apply_command_defaults(command)
|
|
2689
|
+
command.query['key'] = key unless key.nil?
|
|
2690
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
2691
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
2692
|
+
end
|
|
2693
|
+
end
|
|
2694
|
+
end
|
|
2695
|
+
end
|
|
2696
|
+
end
|