google-api-client 0.8.7 → 0.9.pre1
Sign up to get free protection for your applications and to get access to all the features.
- 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 +21 -0
- data/.yardopts +12 -0
- data/CHANGELOG.md +6 -3
- data/CONTRIBUTING.md +31 -0
- data/Gemfile +28 -2
- data/MIGRATING.md +171 -0
- data/README.md +158 -150
- data/Rakefile +1 -40
- data/api_names.yaml +872 -0
- data/api_names_out.yaml +20843 -0
- data/bin/generate-api +93 -0
- data/generated/google/apis/adexchangebuyer_v1_3.rb +35 -0
- data/generated/google/apis/adexchangebuyer_v1_3/classes.rb +1124 -0
- data/generated/google/apis/adexchangebuyer_v1_3/representations.rb +375 -0
- data/generated/google/apis/adexchangebuyer_v1_3/service.rb +893 -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 +682 -0
- data/generated/google/apis/admin_directory_v1.rb +89 -0
- data/generated/google/apis/admin_directory_v1/classes.rb +2389 -0
- data/generated/google/apis/admin_directory_v1/representations.rb +780 -0
- data/generated/google/apis/admin_directory_v1/service.rb +2805 -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 +341 -0
- data/generated/google/apis/adsense_v1_4.rb +38 -0
- data/generated/google/apis/adsense_v1_4/classes.rb +1279 -0
- data/generated/google/apis/adsense_v1_4/representations.rb +493 -0
- data/generated/google/apis/adsense_v1_4/service.rb +1752 -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 +1190 -0
- data/generated/google/apis/analytics_v3.rb +49 -0
- data/generated/google/apis/analytics_v3/classes.rb +5113 -0
- data/generated/google/apis/analytics_v3/representations.rb +1661 -0
- data/generated/google/apis/analytics_v3/service.rb +3600 -0
- data/generated/google/apis/androidenterprise_v1.rb +34 -0
- data/generated/google/apis/androidenterprise_v1/classes.rb +1162 -0
- data/generated/google/apis/androidenterprise_v1/representations.rb +431 -0
- data/generated/google/apis/androidenterprise_v1/service.rb +1979 -0
- data/generated/google/apis/androidpublisher_v2.rb +34 -0
- data/generated/google/apis/androidpublisher_v2/classes.rb +1374 -0
- data/generated/google/apis/androidpublisher_v2/representations.rb +630 -0
- data/generated/google/apis/androidpublisher_v2/service.rb +2390 -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 +129 -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 +265 -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 +488 -0
- data/generated/google/apis/bigquery_v2.rb +49 -0
- data/generated/google/apis/bigquery_v2/classes.rb +2255 -0
- data/generated/google/apis/bigquery_v2/representations.rb +754 -0
- data/generated/google/apis/bigquery_v2/service.rb +1003 -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 +1620 -0
- data/generated/google/apis/books_v1.rb +34 -0
- data/generated/google/apis/books_v1/classes.rb +3515 -0
- data/generated/google/apis/books_v1/representations.rb +1361 -0
- data/generated/google/apis/books_v1/service.rb +2170 -0
- data/generated/google/apis/calendar_v3.rb +37 -0
- data/generated/google/apis/calendar_v3/classes.rb +1702 -0
- data/generated/google/apis/calendar_v3/representations.rb +566 -0
- data/generated/google/apis/calendar_v3/service.rb +1943 -0
- data/generated/google/apis/civicinfo_v2.rb +31 -0
- data/generated/google/apis/civicinfo_v2/classes.rb +1057 -0
- data/generated/google/apis/civicinfo_v2/representations.rb +374 -0
- data/generated/google/apis/civicinfo_v2/service.rb +284 -0
- data/generated/google/apis/cloudmonitoring_v2beta2.rb +34 -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 +458 -0
- data/generated/google/apis/cloudresourcemanager_v1beta1.rb +38 -0
- data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +139 -0
- data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +65 -0
- data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +301 -0
- data/generated/google/apis/compute_v1.rb +49 -0
- data/generated/google/apis/compute_v1/classes.rb +6391 -0
- data/generated/google/apis/compute_v1/representations.rb +2209 -0
- data/generated/google/apis/compute_v1/service.rb +6352 -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 +3780 -0
- data/generated/google/apis/content_v2/representations.rb +1456 -0
- data/generated/google/apis/content_v2/service.rb +1706 -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 +687 -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 +208 -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 +300 -0
- data/generated/google/apis/deploymentmanager_v2beta2.rb +41 -0
- data/generated/google/apis/deploymentmanager_v2beta2/classes.rb +820 -0
- data/generated/google/apis/deploymentmanager_v2beta2/representations.rb +303 -0
- data/generated/google/apis/deploymentmanager_v2beta2/service.rb +647 -0
- data/generated/google/apis/dfareporting_v2_1.rb +37 -0
- data/generated/google/apis/dfareporting_v2_1/classes.rb +10755 -0
- data/generated/google/apis/dfareporting_v2_1/representations.rb +3438 -0
- data/generated/google/apis/dfareporting_v2_1/service.rb +8775 -0
- data/generated/google/apis/discovery_v1.rb +32 -0
- data/generated/google/apis/discovery_v1/classes.rb +947 -0
- data/generated/google/apis/discovery_v1/representations.rb +355 -0
- data/generated/google/apis/discovery_v1/service.rb +144 -0
- data/generated/google/apis/dns_v1.rb +41 -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 +460 -0
- data/{spec/google/api_client/request_spec.rb → generated/google/apis/doubleclickbidmanager_v1.rb} +15 -13
- data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +709 -0
- data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +297 -0
- data/generated/google/apis/doubleclickbidmanager_v1/service.rb +349 -0
- data/generated/google/apis/doubleclicksearch_v2.rb +35 -0
- data/generated/google/apis/doubleclicksearch_v2/classes.rb +947 -0
- data/generated/google/apis/doubleclicksearch_v2/representations.rb +315 -0
- data/generated/google/apis/doubleclicksearch_v2/service.rb +490 -0
- data/generated/google/apis/drive_v2.rb +55 -0
- data/generated/google/apis/drive_v2/classes.rb +2519 -0
- data/generated/google/apis/drive_v2/representations.rb +781 -0
- data/generated/google/apis/drive_v2/service.rb +2685 -0
- data/generated/google/apis/fitness_v1.rb +49 -0
- data/generated/google/apis/fitness_v1/classes.rb +809 -0
- data/generated/google/apis/fitness_v1/representations.rb +295 -0
- data/generated/google/apis/fitness_v1/service.rb +684 -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 +1496 -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 +578 -0
- data/generated/google/apis/games_v1.rb +40 -0
- data/generated/google/apis/games_v1/classes.rb +4578 -0
- data/generated/google/apis/games_v1/representations.rb +1570 -0
- data/generated/google/apis/games_v1/service.rb +2306 -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 +692 -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 +2356 -0
- data/generated/google/apis/gmail_v1.rb +49 -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 +1502 -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 +111 -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 +1229 -0
- data/generated/google/apis/identitytoolkit_v3/representations.rb +422 -0
- data/generated/google/apis/identitytoolkit_v3/service.rb +491 -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 +376 -0
- data/generated/google/apis/logging_v1beta3.rb +35 -0
- data/generated/google/apis/logging_v1beta3/classes.rb +505 -0
- data/generated/google/apis/logging_v1beta3/representations.rb +222 -0
- data/generated/google/apis/logging_v1beta3/service.rb +670 -0
- data/generated/google/apis/manager_v1beta2.rb +50 -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 +380 -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 +3465 -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 +1001 -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 +203 -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 +120 -0
- data/generated/google/apis/plus_domains_v1.rb +61 -0
- data/generated/google/apis/plus_domains_v1/classes.rb +2402 -0
- data/generated/google/apis/plus_domains_v1/representations.rb +873 -0
- data/generated/google/apis/plus_domains_v1/service.rb +924 -0
- data/generated/google/apis/plus_v1.rb +43 -0
- data/generated/google/apis/plus_v1/classes.rb +2384 -0
- data/generated/google/apis/plus_v1/representations.rb +812 -0
- data/generated/google/apis/plus_v1/service.rb +616 -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 +388 -0
- data/generated/google/apis/pubsub_v1beta2.rb +37 -0
- data/generated/google/apis/pubsub_v1beta2/classes.rb +824 -0
- data/generated/google/apis/pubsub_v1beta2/representations.rb +366 -0
- data/generated/google/apis/pubsub_v1beta2/service.rb +778 -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 +101 -0
- data/generated/google/apis/replicapool_v1beta2.rb +41 -0
- data/generated/google/apis/replicapool_v1beta2/classes.rb +621 -0
- data/generated/google/apis/replicapool_v1beta2/representations.rb +235 -0
- data/generated/google/apis/replicapool_v1beta2/service.rb +620 -0
- data/generated/google/apis/replicapoolupdater_v1beta1.rb +41 -0
- data/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +682 -0
- data/generated/google/apis/replicapoolupdater_v1beta1/representations.rb +247 -0
- data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +472 -0
- data/generated/google/apis/reseller_v1.rb +37 -0
- data/generated/google/apis/reseller_v1/classes.rb +502 -0
- data/generated/google/apis/reseller_v1/representations.rb +199 -0
- data/generated/google/apis/reseller_v1/service.rb +637 -0
- data/generated/google/apis/resourceviews_v1beta2.rb +47 -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 +574 -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 +322 -0
- data/generated/google/apis/sqladmin_v1beta4.rb +37 -0
- data/generated/google/apis/sqladmin_v1beta4/classes.rb +1817 -0
- data/generated/google/apis/sqladmin_v1beta4/representations.rb +688 -0
- data/generated/google/apis/sqladmin_v1beta4/service.rb +1534 -0
- data/generated/google/apis/storage_v1.rb +43 -0
- data/generated/google/apis/storage_v1/classes.rb +1177 -0
- data/generated/google/apis/storage_v1/representations.rb +427 -0
- data/generated/google/apis/storage_v1/service.rb +1920 -0
- data/generated/google/apis/tagmanager_v1.rb +52 -0
- data/generated/google/apis/tagmanager_v1/classes.rb +1226 -0
- data/generated/google/apis/tagmanager_v1/representations.rb +461 -0
- data/generated/google/apis/tagmanager_v1/service.rb +1978 -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 +416 -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 +657 -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 +185 -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 +179 -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 +587 -0
- data/generated/google/apis/youtube_analytics_v1.rb +46 -0
- data/generated/google/apis/youtube_analytics_v1/classes.rb +540 -0
- data/generated/google/apis/youtube_analytics_v1/representations.rb +242 -0
- data/generated/google/apis/youtube_analytics_v1/service.rb +567 -0
- data/generated/google/apis/youtube_v3.rb +49 -0
- data/generated/google/apis/youtube_v3/classes.rb +7225 -0
- data/generated/google/apis/youtube_v3/representations.rb +2529 -0
- data/generated/google/apis/youtube_v3/service.rb +4051 -0
- data/google-api-client.gemspec +27 -39
- data/lib/google/api_client/auth/storage.rb +3 -2
- data/lib/google/api_client/auth/storages/file_store.rb +1 -3
- data/lib/google/api_client/auth/storages/redis_store.rb +6 -2
- data/lib/google/apis.rb +48 -0
- data/lib/google/apis/core/api_command.rb +128 -0
- data/lib/google/apis/core/base_service.rb +314 -0
- data/lib/google/apis/core/batch.rb +222 -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_command.rb +275 -0
- data/lib/google/apis/core/json_representation.rb +122 -0
- data/lib/google/{api_client/version.rb → apis/core/logging.rb} +12 -8
- data/lib/google/apis/core/multipart.rb +173 -0
- data/lib/google/apis/core/upload.rb +275 -0
- data/lib/google/{api_client → apis}/errors.rb +32 -28
- data/lib/google/apis/generator.rb +70 -0
- data/lib/google/apis/generator/annotator.rb +271 -0
- data/lib/google/apis/generator/helpers.rb +74 -0
- data/lib/google/apis/generator/model.rb +130 -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 +90 -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 +79 -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/calendar/calendar.rb +43 -0
- data/samples/drive/drive.rb +40 -0
- data/samples/pubsub/pubsub.rb +52 -0
- data/{lib/google/api_client/discovery.rb → samples/translate/translate.rb} +14 -5
- data/script/generate +79 -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/client_secrets.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/apis/core/api_command_spec.rb +170 -0
- data/spec/google/apis/core/batch_spec.rb +128 -0
- data/spec/google/apis/core/download_spec.rb +90 -0
- data/spec/google/apis/core/hashable_spec.rb +60 -0
- data/spec/google/apis/core/http_command_spec.rb +238 -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 +238 -0
- data/{lib/google/api_client/service_account.rb → spec/google/apis/generated_spec.rb} +14 -8
- 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/drive_spec.rb +35 -0
- data/spec/integration_tests/pubsub_spec.rb +48 -0
- data/spec/integration_tests/url_shortener_spec.rb +31 -0
- data/spec/spec_helper.rb +102 -46
- metadata +433 -178
- 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/key_utils.rb +0 -93
- 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
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2015 Google Inc.
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -12,17 +12,20 @@
|
|
12
12
|
# See the License for the specific language governing permissions and
|
13
13
|
# limitations under the License.
|
14
14
|
|
15
|
-
require '
|
16
|
-
require '
|
15
|
+
require 'google/apis/customsearch_v1/service.rb'
|
16
|
+
require 'google/apis/customsearch_v1/classes.rb'
|
17
|
+
require 'google/apis/customsearch_v1/representations.rb'
|
17
18
|
|
18
19
|
module Google
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
20
|
+
module Apis
|
21
|
+
# CustomSearch API
|
22
|
+
#
|
23
|
+
# Lets you search over a website or collection of websites
|
24
|
+
#
|
25
|
+
# @see https://developers.google.com/custom-search/v1/using_rest
|
26
|
+
module CustomsearchV1
|
27
|
+
VERSION = 'V1'
|
28
|
+
REVISION = '20131205'
|
26
29
|
end
|
27
30
|
end
|
28
31
|
end
|
@@ -0,0 +1,771 @@
|
|
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 'date'
|
16
|
+
require 'google/apis/core/base_service'
|
17
|
+
require 'google/apis/core/json_representation'
|
18
|
+
require 'google/apis/core/hashable'
|
19
|
+
require 'google/apis/errors'
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Apis
|
23
|
+
module CustomsearchV1
|
24
|
+
|
25
|
+
#
|
26
|
+
class Context
|
27
|
+
include Google::Apis::Core::Hashable
|
28
|
+
|
29
|
+
#
|
30
|
+
# Corresponds to the JSON property `facets`
|
31
|
+
# @return [Array<Array<Google::Apis::CustomsearchV1::Context::Facet>>]
|
32
|
+
attr_accessor :facets
|
33
|
+
|
34
|
+
#
|
35
|
+
# Corresponds to the JSON property `title`
|
36
|
+
# @return [String]
|
37
|
+
attr_accessor :title
|
38
|
+
|
39
|
+
def initialize(**args)
|
40
|
+
update!(**args)
|
41
|
+
end
|
42
|
+
|
43
|
+
# Update properties of this object
|
44
|
+
def update!(**args)
|
45
|
+
@facets = args[:facets] unless args[:facets].nil?
|
46
|
+
@title = args[:title] unless args[:title].nil?
|
47
|
+
end
|
48
|
+
|
49
|
+
#
|
50
|
+
class Facet
|
51
|
+
include Google::Apis::Core::Hashable
|
52
|
+
|
53
|
+
#
|
54
|
+
# Corresponds to the JSON property `anchor`
|
55
|
+
# @return [String]
|
56
|
+
attr_accessor :anchor
|
57
|
+
|
58
|
+
#
|
59
|
+
# Corresponds to the JSON property `label`
|
60
|
+
# @return [String]
|
61
|
+
attr_accessor :label
|
62
|
+
|
63
|
+
#
|
64
|
+
# Corresponds to the JSON property `label_with_op`
|
65
|
+
# @return [String]
|
66
|
+
attr_accessor :label_with_op
|
67
|
+
|
68
|
+
def initialize(**args)
|
69
|
+
update!(**args)
|
70
|
+
end
|
71
|
+
|
72
|
+
# Update properties of this object
|
73
|
+
def update!(**args)
|
74
|
+
@anchor = args[:anchor] unless args[:anchor].nil?
|
75
|
+
@label = args[:label] unless args[:label].nil?
|
76
|
+
@label_with_op = args[:label_with_op] unless args[:label_with_op].nil?
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
#
|
82
|
+
class Promotion
|
83
|
+
include Google::Apis::Core::Hashable
|
84
|
+
|
85
|
+
#
|
86
|
+
# Corresponds to the JSON property `bodyLines`
|
87
|
+
# @return [Array<Google::Apis::CustomsearchV1::Promotion::BodyLine>]
|
88
|
+
attr_accessor :body_lines
|
89
|
+
|
90
|
+
#
|
91
|
+
# Corresponds to the JSON property `displayLink`
|
92
|
+
# @return [String]
|
93
|
+
attr_accessor :display_link
|
94
|
+
|
95
|
+
#
|
96
|
+
# Corresponds to the JSON property `htmlTitle`
|
97
|
+
# @return [String]
|
98
|
+
attr_accessor :html_title
|
99
|
+
|
100
|
+
#
|
101
|
+
# Corresponds to the JSON property `image`
|
102
|
+
# @return [Google::Apis::CustomsearchV1::Promotion::Image]
|
103
|
+
attr_accessor :image
|
104
|
+
|
105
|
+
#
|
106
|
+
# Corresponds to the JSON property `link`
|
107
|
+
# @return [String]
|
108
|
+
attr_accessor :link
|
109
|
+
|
110
|
+
#
|
111
|
+
# Corresponds to the JSON property `title`
|
112
|
+
# @return [String]
|
113
|
+
attr_accessor :title
|
114
|
+
|
115
|
+
def initialize(**args)
|
116
|
+
update!(**args)
|
117
|
+
end
|
118
|
+
|
119
|
+
# Update properties of this object
|
120
|
+
def update!(**args)
|
121
|
+
@body_lines = args[:body_lines] unless args[:body_lines].nil?
|
122
|
+
@display_link = args[:display_link] unless args[:display_link].nil?
|
123
|
+
@html_title = args[:html_title] unless args[:html_title].nil?
|
124
|
+
@image = args[:image] unless args[:image].nil?
|
125
|
+
@link = args[:link] unless args[:link].nil?
|
126
|
+
@title = args[:title] unless args[:title].nil?
|
127
|
+
end
|
128
|
+
|
129
|
+
#
|
130
|
+
class BodyLine
|
131
|
+
include Google::Apis::Core::Hashable
|
132
|
+
|
133
|
+
#
|
134
|
+
# Corresponds to the JSON property `htmlTitle`
|
135
|
+
# @return [String]
|
136
|
+
attr_accessor :html_title
|
137
|
+
|
138
|
+
#
|
139
|
+
# Corresponds to the JSON property `link`
|
140
|
+
# @return [String]
|
141
|
+
attr_accessor :link
|
142
|
+
|
143
|
+
#
|
144
|
+
# Corresponds to the JSON property `title`
|
145
|
+
# @return [String]
|
146
|
+
attr_accessor :title
|
147
|
+
|
148
|
+
#
|
149
|
+
# Corresponds to the JSON property `url`
|
150
|
+
# @return [String]
|
151
|
+
attr_accessor :url
|
152
|
+
|
153
|
+
def initialize(**args)
|
154
|
+
update!(**args)
|
155
|
+
end
|
156
|
+
|
157
|
+
# Update properties of this object
|
158
|
+
def update!(**args)
|
159
|
+
@html_title = args[:html_title] unless args[:html_title].nil?
|
160
|
+
@link = args[:link] unless args[:link].nil?
|
161
|
+
@title = args[:title] unless args[:title].nil?
|
162
|
+
@url = args[:url] unless args[:url].nil?
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
#
|
167
|
+
class Image
|
168
|
+
include Google::Apis::Core::Hashable
|
169
|
+
|
170
|
+
#
|
171
|
+
# Corresponds to the JSON property `height`
|
172
|
+
# @return [Fixnum]
|
173
|
+
attr_accessor :height
|
174
|
+
|
175
|
+
#
|
176
|
+
# Corresponds to the JSON property `source`
|
177
|
+
# @return [String]
|
178
|
+
attr_accessor :source
|
179
|
+
|
180
|
+
#
|
181
|
+
# Corresponds to the JSON property `width`
|
182
|
+
# @return [Fixnum]
|
183
|
+
attr_accessor :width
|
184
|
+
|
185
|
+
def initialize(**args)
|
186
|
+
update!(**args)
|
187
|
+
end
|
188
|
+
|
189
|
+
# Update properties of this object
|
190
|
+
def update!(**args)
|
191
|
+
@height = args[:height] unless args[:height].nil?
|
192
|
+
@source = args[:source] unless args[:source].nil?
|
193
|
+
@width = args[:width] unless args[:width].nil?
|
194
|
+
end
|
195
|
+
end
|
196
|
+
end
|
197
|
+
|
198
|
+
#
|
199
|
+
class Query
|
200
|
+
include Google::Apis::Core::Hashable
|
201
|
+
|
202
|
+
#
|
203
|
+
# Corresponds to the JSON property `count`
|
204
|
+
# @return [Fixnum]
|
205
|
+
attr_accessor :count
|
206
|
+
|
207
|
+
#
|
208
|
+
# Corresponds to the JSON property `cr`
|
209
|
+
# @return [String]
|
210
|
+
attr_accessor :cr
|
211
|
+
|
212
|
+
#
|
213
|
+
# Corresponds to the JSON property `cref`
|
214
|
+
# @return [String]
|
215
|
+
attr_accessor :cref
|
216
|
+
|
217
|
+
#
|
218
|
+
# Corresponds to the JSON property `cx`
|
219
|
+
# @return [String]
|
220
|
+
attr_accessor :cx
|
221
|
+
|
222
|
+
#
|
223
|
+
# Corresponds to the JSON property `dateRestrict`
|
224
|
+
# @return [String]
|
225
|
+
attr_accessor :date_restrict
|
226
|
+
|
227
|
+
#
|
228
|
+
# Corresponds to the JSON property `disableCnTwTranslation`
|
229
|
+
# @return [String]
|
230
|
+
attr_accessor :disable_cn_tw_translation
|
231
|
+
|
232
|
+
#
|
233
|
+
# Corresponds to the JSON property `exactTerms`
|
234
|
+
# @return [String]
|
235
|
+
attr_accessor :exact_terms
|
236
|
+
|
237
|
+
#
|
238
|
+
# Corresponds to the JSON property `excludeTerms`
|
239
|
+
# @return [String]
|
240
|
+
attr_accessor :exclude_terms
|
241
|
+
|
242
|
+
#
|
243
|
+
# Corresponds to the JSON property `fileType`
|
244
|
+
# @return [String]
|
245
|
+
attr_accessor :file_type
|
246
|
+
|
247
|
+
#
|
248
|
+
# Corresponds to the JSON property `filter`
|
249
|
+
# @return [String]
|
250
|
+
attr_accessor :filter
|
251
|
+
|
252
|
+
#
|
253
|
+
# Corresponds to the JSON property `gl`
|
254
|
+
# @return [String]
|
255
|
+
attr_accessor :gl
|
256
|
+
|
257
|
+
#
|
258
|
+
# Corresponds to the JSON property `googleHost`
|
259
|
+
# @return [String]
|
260
|
+
attr_accessor :google_host
|
261
|
+
|
262
|
+
#
|
263
|
+
# Corresponds to the JSON property `highRange`
|
264
|
+
# @return [String]
|
265
|
+
attr_accessor :high_range
|
266
|
+
|
267
|
+
#
|
268
|
+
# Corresponds to the JSON property `hl`
|
269
|
+
# @return [String]
|
270
|
+
attr_accessor :hl
|
271
|
+
|
272
|
+
#
|
273
|
+
# Corresponds to the JSON property `hq`
|
274
|
+
# @return [String]
|
275
|
+
attr_accessor :hq
|
276
|
+
|
277
|
+
#
|
278
|
+
# Corresponds to the JSON property `imgColorType`
|
279
|
+
# @return [String]
|
280
|
+
attr_accessor :img_color_type
|
281
|
+
|
282
|
+
#
|
283
|
+
# Corresponds to the JSON property `imgDominantColor`
|
284
|
+
# @return [String]
|
285
|
+
attr_accessor :img_dominant_color
|
286
|
+
|
287
|
+
#
|
288
|
+
# Corresponds to the JSON property `imgSize`
|
289
|
+
# @return [String]
|
290
|
+
attr_accessor :img_size
|
291
|
+
|
292
|
+
#
|
293
|
+
# Corresponds to the JSON property `imgType`
|
294
|
+
# @return [String]
|
295
|
+
attr_accessor :img_type
|
296
|
+
|
297
|
+
#
|
298
|
+
# Corresponds to the JSON property `inputEncoding`
|
299
|
+
# @return [String]
|
300
|
+
attr_accessor :input_encoding
|
301
|
+
|
302
|
+
#
|
303
|
+
# Corresponds to the JSON property `language`
|
304
|
+
# @return [String]
|
305
|
+
attr_accessor :language
|
306
|
+
|
307
|
+
#
|
308
|
+
# Corresponds to the JSON property `linkSite`
|
309
|
+
# @return [String]
|
310
|
+
attr_accessor :link_site
|
311
|
+
|
312
|
+
#
|
313
|
+
# Corresponds to the JSON property `lowRange`
|
314
|
+
# @return [String]
|
315
|
+
attr_accessor :low_range
|
316
|
+
|
317
|
+
#
|
318
|
+
# Corresponds to the JSON property `orTerms`
|
319
|
+
# @return [String]
|
320
|
+
attr_accessor :or_terms
|
321
|
+
|
322
|
+
#
|
323
|
+
# Corresponds to the JSON property `outputEncoding`
|
324
|
+
# @return [String]
|
325
|
+
attr_accessor :output_encoding
|
326
|
+
|
327
|
+
#
|
328
|
+
# Corresponds to the JSON property `relatedSite`
|
329
|
+
# @return [String]
|
330
|
+
attr_accessor :related_site
|
331
|
+
|
332
|
+
#
|
333
|
+
# Corresponds to the JSON property `rights`
|
334
|
+
# @return [String]
|
335
|
+
attr_accessor :rights
|
336
|
+
|
337
|
+
#
|
338
|
+
# Corresponds to the JSON property `safe`
|
339
|
+
# @return [String]
|
340
|
+
attr_accessor :safe
|
341
|
+
|
342
|
+
#
|
343
|
+
# Corresponds to the JSON property `searchTerms`
|
344
|
+
# @return [String]
|
345
|
+
attr_accessor :search_terms
|
346
|
+
|
347
|
+
#
|
348
|
+
# Corresponds to the JSON property `searchType`
|
349
|
+
# @return [String]
|
350
|
+
attr_accessor :search_type
|
351
|
+
|
352
|
+
#
|
353
|
+
# Corresponds to the JSON property `siteSearch`
|
354
|
+
# @return [String]
|
355
|
+
attr_accessor :site_search
|
356
|
+
|
357
|
+
#
|
358
|
+
# Corresponds to the JSON property `siteSearchFilter`
|
359
|
+
# @return [String]
|
360
|
+
attr_accessor :site_search_filter
|
361
|
+
|
362
|
+
#
|
363
|
+
# Corresponds to the JSON property `sort`
|
364
|
+
# @return [String]
|
365
|
+
attr_accessor :sort
|
366
|
+
|
367
|
+
#
|
368
|
+
# Corresponds to the JSON property `startIndex`
|
369
|
+
# @return [Fixnum]
|
370
|
+
attr_accessor :start_index
|
371
|
+
|
372
|
+
#
|
373
|
+
# Corresponds to the JSON property `startPage`
|
374
|
+
# @return [Fixnum]
|
375
|
+
attr_accessor :start_page
|
376
|
+
|
377
|
+
#
|
378
|
+
# Corresponds to the JSON property `title`
|
379
|
+
# @return [String]
|
380
|
+
attr_accessor :title
|
381
|
+
|
382
|
+
#
|
383
|
+
# Corresponds to the JSON property `totalResults`
|
384
|
+
# @return [String]
|
385
|
+
attr_accessor :total_results
|
386
|
+
|
387
|
+
def initialize(**args)
|
388
|
+
update!(**args)
|
389
|
+
end
|
390
|
+
|
391
|
+
# Update properties of this object
|
392
|
+
def update!(**args)
|
393
|
+
@count = args[:count] unless args[:count].nil?
|
394
|
+
@cr = args[:cr] unless args[:cr].nil?
|
395
|
+
@cref = args[:cref] unless args[:cref].nil?
|
396
|
+
@cx = args[:cx] unless args[:cx].nil?
|
397
|
+
@date_restrict = args[:date_restrict] unless args[:date_restrict].nil?
|
398
|
+
@disable_cn_tw_translation = args[:disable_cn_tw_translation] unless args[:disable_cn_tw_translation].nil?
|
399
|
+
@exact_terms = args[:exact_terms] unless args[:exact_terms].nil?
|
400
|
+
@exclude_terms = args[:exclude_terms] unless args[:exclude_terms].nil?
|
401
|
+
@file_type = args[:file_type] unless args[:file_type].nil?
|
402
|
+
@filter = args[:filter] unless args[:filter].nil?
|
403
|
+
@gl = args[:gl] unless args[:gl].nil?
|
404
|
+
@google_host = args[:google_host] unless args[:google_host].nil?
|
405
|
+
@high_range = args[:high_range] unless args[:high_range].nil?
|
406
|
+
@hl = args[:hl] unless args[:hl].nil?
|
407
|
+
@hq = args[:hq] unless args[:hq].nil?
|
408
|
+
@img_color_type = args[:img_color_type] unless args[:img_color_type].nil?
|
409
|
+
@img_dominant_color = args[:img_dominant_color] unless args[:img_dominant_color].nil?
|
410
|
+
@img_size = args[:img_size] unless args[:img_size].nil?
|
411
|
+
@img_type = args[:img_type] unless args[:img_type].nil?
|
412
|
+
@input_encoding = args[:input_encoding] unless args[:input_encoding].nil?
|
413
|
+
@language = args[:language] unless args[:language].nil?
|
414
|
+
@link_site = args[:link_site] unless args[:link_site].nil?
|
415
|
+
@low_range = args[:low_range] unless args[:low_range].nil?
|
416
|
+
@or_terms = args[:or_terms] unless args[:or_terms].nil?
|
417
|
+
@output_encoding = args[:output_encoding] unless args[:output_encoding].nil?
|
418
|
+
@related_site = args[:related_site] unless args[:related_site].nil?
|
419
|
+
@rights = args[:rights] unless args[:rights].nil?
|
420
|
+
@safe = args[:safe] unless args[:safe].nil?
|
421
|
+
@search_terms = args[:search_terms] unless args[:search_terms].nil?
|
422
|
+
@search_type = args[:search_type] unless args[:search_type].nil?
|
423
|
+
@site_search = args[:site_search] unless args[:site_search].nil?
|
424
|
+
@site_search_filter = args[:site_search_filter] unless args[:site_search_filter].nil?
|
425
|
+
@sort = args[:sort] unless args[:sort].nil?
|
426
|
+
@start_index = args[:start_index] unless args[:start_index].nil?
|
427
|
+
@start_page = args[:start_page] unless args[:start_page].nil?
|
428
|
+
@title = args[:title] unless args[:title].nil?
|
429
|
+
@total_results = args[:total_results] unless args[:total_results].nil?
|
430
|
+
end
|
431
|
+
end
|
432
|
+
|
433
|
+
#
|
434
|
+
class Result
|
435
|
+
include Google::Apis::Core::Hashable
|
436
|
+
|
437
|
+
#
|
438
|
+
# Corresponds to the JSON property `cacheId`
|
439
|
+
# @return [String]
|
440
|
+
attr_accessor :cache_id
|
441
|
+
|
442
|
+
#
|
443
|
+
# Corresponds to the JSON property `displayLink`
|
444
|
+
# @return [String]
|
445
|
+
attr_accessor :display_link
|
446
|
+
|
447
|
+
#
|
448
|
+
# Corresponds to the JSON property `fileFormat`
|
449
|
+
# @return [String]
|
450
|
+
attr_accessor :file_format
|
451
|
+
|
452
|
+
#
|
453
|
+
# Corresponds to the JSON property `formattedUrl`
|
454
|
+
# @return [String]
|
455
|
+
attr_accessor :formatted_url
|
456
|
+
|
457
|
+
#
|
458
|
+
# Corresponds to the JSON property `htmlFormattedUrl`
|
459
|
+
# @return [String]
|
460
|
+
attr_accessor :html_formatted_url
|
461
|
+
|
462
|
+
#
|
463
|
+
# Corresponds to the JSON property `htmlSnippet`
|
464
|
+
# @return [String]
|
465
|
+
attr_accessor :html_snippet
|
466
|
+
|
467
|
+
#
|
468
|
+
# Corresponds to the JSON property `htmlTitle`
|
469
|
+
# @return [String]
|
470
|
+
attr_accessor :html_title
|
471
|
+
|
472
|
+
#
|
473
|
+
# Corresponds to the JSON property `image`
|
474
|
+
# @return [Google::Apis::CustomsearchV1::Result::Image]
|
475
|
+
attr_accessor :image
|
476
|
+
|
477
|
+
#
|
478
|
+
# Corresponds to the JSON property `kind`
|
479
|
+
# @return [String]
|
480
|
+
attr_accessor :kind
|
481
|
+
|
482
|
+
#
|
483
|
+
# Corresponds to the JSON property `labels`
|
484
|
+
# @return [Array<Google::Apis::CustomsearchV1::Result::Label>]
|
485
|
+
attr_accessor :labels
|
486
|
+
|
487
|
+
#
|
488
|
+
# Corresponds to the JSON property `link`
|
489
|
+
# @return [String]
|
490
|
+
attr_accessor :link
|
491
|
+
|
492
|
+
#
|
493
|
+
# Corresponds to the JSON property `mime`
|
494
|
+
# @return [String]
|
495
|
+
attr_accessor :mime
|
496
|
+
|
497
|
+
#
|
498
|
+
# Corresponds to the JSON property `pagemap`
|
499
|
+
# @return [Hash<String,Array<Hash<String,Object>>>]
|
500
|
+
attr_accessor :pagemap
|
501
|
+
|
502
|
+
#
|
503
|
+
# Corresponds to the JSON property `snippet`
|
504
|
+
# @return [String]
|
505
|
+
attr_accessor :snippet
|
506
|
+
|
507
|
+
#
|
508
|
+
# Corresponds to the JSON property `title`
|
509
|
+
# @return [String]
|
510
|
+
attr_accessor :title
|
511
|
+
|
512
|
+
def initialize(**args)
|
513
|
+
update!(**args)
|
514
|
+
end
|
515
|
+
|
516
|
+
# Update properties of this object
|
517
|
+
def update!(**args)
|
518
|
+
@cache_id = args[:cache_id] unless args[:cache_id].nil?
|
519
|
+
@display_link = args[:display_link] unless args[:display_link].nil?
|
520
|
+
@file_format = args[:file_format] unless args[:file_format].nil?
|
521
|
+
@formatted_url = args[:formatted_url] unless args[:formatted_url].nil?
|
522
|
+
@html_formatted_url = args[:html_formatted_url] unless args[:html_formatted_url].nil?
|
523
|
+
@html_snippet = args[:html_snippet] unless args[:html_snippet].nil?
|
524
|
+
@html_title = args[:html_title] unless args[:html_title].nil?
|
525
|
+
@image = args[:image] unless args[:image].nil?
|
526
|
+
@kind = args[:kind] unless args[:kind].nil?
|
527
|
+
@labels = args[:labels] unless args[:labels].nil?
|
528
|
+
@link = args[:link] unless args[:link].nil?
|
529
|
+
@mime = args[:mime] unless args[:mime].nil?
|
530
|
+
@pagemap = args[:pagemap] unless args[:pagemap].nil?
|
531
|
+
@snippet = args[:snippet] unless args[:snippet].nil?
|
532
|
+
@title = args[:title] unless args[:title].nil?
|
533
|
+
end
|
534
|
+
|
535
|
+
#
|
536
|
+
class Image
|
537
|
+
include Google::Apis::Core::Hashable
|
538
|
+
|
539
|
+
#
|
540
|
+
# Corresponds to the JSON property `byteSize`
|
541
|
+
# @return [Fixnum]
|
542
|
+
attr_accessor :byte_size
|
543
|
+
|
544
|
+
#
|
545
|
+
# Corresponds to the JSON property `contextLink`
|
546
|
+
# @return [String]
|
547
|
+
attr_accessor :context_link
|
548
|
+
|
549
|
+
#
|
550
|
+
# Corresponds to the JSON property `height`
|
551
|
+
# @return [Fixnum]
|
552
|
+
attr_accessor :height
|
553
|
+
|
554
|
+
#
|
555
|
+
# Corresponds to the JSON property `thumbnailHeight`
|
556
|
+
# @return [Fixnum]
|
557
|
+
attr_accessor :thumbnail_height
|
558
|
+
|
559
|
+
#
|
560
|
+
# Corresponds to the JSON property `thumbnailLink`
|
561
|
+
# @return [String]
|
562
|
+
attr_accessor :thumbnail_link
|
563
|
+
|
564
|
+
#
|
565
|
+
# Corresponds to the JSON property `thumbnailWidth`
|
566
|
+
# @return [Fixnum]
|
567
|
+
attr_accessor :thumbnail_width
|
568
|
+
|
569
|
+
#
|
570
|
+
# Corresponds to the JSON property `width`
|
571
|
+
# @return [Fixnum]
|
572
|
+
attr_accessor :width
|
573
|
+
|
574
|
+
def initialize(**args)
|
575
|
+
update!(**args)
|
576
|
+
end
|
577
|
+
|
578
|
+
# Update properties of this object
|
579
|
+
def update!(**args)
|
580
|
+
@byte_size = args[:byte_size] unless args[:byte_size].nil?
|
581
|
+
@context_link = args[:context_link] unless args[:context_link].nil?
|
582
|
+
@height = args[:height] unless args[:height].nil?
|
583
|
+
@thumbnail_height = args[:thumbnail_height] unless args[:thumbnail_height].nil?
|
584
|
+
@thumbnail_link = args[:thumbnail_link] unless args[:thumbnail_link].nil?
|
585
|
+
@thumbnail_width = args[:thumbnail_width] unless args[:thumbnail_width].nil?
|
586
|
+
@width = args[:width] unless args[:width].nil?
|
587
|
+
end
|
588
|
+
end
|
589
|
+
|
590
|
+
#
|
591
|
+
class Label
|
592
|
+
include Google::Apis::Core::Hashable
|
593
|
+
|
594
|
+
#
|
595
|
+
# Corresponds to the JSON property `displayName`
|
596
|
+
# @return [String]
|
597
|
+
attr_accessor :display_name
|
598
|
+
|
599
|
+
#
|
600
|
+
# Corresponds to the JSON property `label_with_op`
|
601
|
+
# @return [String]
|
602
|
+
attr_accessor :label_with_op
|
603
|
+
|
604
|
+
#
|
605
|
+
# Corresponds to the JSON property `name`
|
606
|
+
# @return [String]
|
607
|
+
attr_accessor :name
|
608
|
+
|
609
|
+
def initialize(**args)
|
610
|
+
update!(**args)
|
611
|
+
end
|
612
|
+
|
613
|
+
# Update properties of this object
|
614
|
+
def update!(**args)
|
615
|
+
@display_name = args[:display_name] unless args[:display_name].nil?
|
616
|
+
@label_with_op = args[:label_with_op] unless args[:label_with_op].nil?
|
617
|
+
@name = args[:name] unless args[:name].nil?
|
618
|
+
end
|
619
|
+
end
|
620
|
+
end
|
621
|
+
|
622
|
+
#
|
623
|
+
class Search
|
624
|
+
include Google::Apis::Core::Hashable
|
625
|
+
|
626
|
+
#
|
627
|
+
# Corresponds to the JSON property `context`
|
628
|
+
# @return [Google::Apis::CustomsearchV1::Context]
|
629
|
+
attr_accessor :context
|
630
|
+
|
631
|
+
#
|
632
|
+
# Corresponds to the JSON property `items`
|
633
|
+
# @return [Array<Google::Apis::CustomsearchV1::Result>]
|
634
|
+
attr_accessor :items
|
635
|
+
|
636
|
+
#
|
637
|
+
# Corresponds to the JSON property `kind`
|
638
|
+
# @return [String]
|
639
|
+
attr_accessor :kind
|
640
|
+
|
641
|
+
#
|
642
|
+
# Corresponds to the JSON property `promotions`
|
643
|
+
# @return [Array<Google::Apis::CustomsearchV1::Promotion>]
|
644
|
+
attr_accessor :promotions
|
645
|
+
|
646
|
+
#
|
647
|
+
# Corresponds to the JSON property `queries`
|
648
|
+
# @return [Hash<String,Array<Google::Apis::CustomsearchV1::Query>>]
|
649
|
+
attr_accessor :queries
|
650
|
+
|
651
|
+
#
|
652
|
+
# Corresponds to the JSON property `searchInformation`
|
653
|
+
# @return [Google::Apis::CustomsearchV1::Search::SearchInformation]
|
654
|
+
attr_accessor :search_information
|
655
|
+
|
656
|
+
#
|
657
|
+
# Corresponds to the JSON property `spelling`
|
658
|
+
# @return [Google::Apis::CustomsearchV1::Search::Spelling]
|
659
|
+
attr_accessor :spelling
|
660
|
+
|
661
|
+
#
|
662
|
+
# Corresponds to the JSON property `url`
|
663
|
+
# @return [Google::Apis::CustomsearchV1::Search::Url]
|
664
|
+
attr_accessor :url
|
665
|
+
|
666
|
+
def initialize(**args)
|
667
|
+
update!(**args)
|
668
|
+
end
|
669
|
+
|
670
|
+
# Update properties of this object
|
671
|
+
def update!(**args)
|
672
|
+
@context = args[:context] unless args[:context].nil?
|
673
|
+
@items = args[:items] unless args[:items].nil?
|
674
|
+
@kind = args[:kind] unless args[:kind].nil?
|
675
|
+
@promotions = args[:promotions] unless args[:promotions].nil?
|
676
|
+
@queries = args[:queries] unless args[:queries].nil?
|
677
|
+
@search_information = args[:search_information] unless args[:search_information].nil?
|
678
|
+
@spelling = args[:spelling] unless args[:spelling].nil?
|
679
|
+
@url = args[:url] unless args[:url].nil?
|
680
|
+
end
|
681
|
+
|
682
|
+
#
|
683
|
+
class SearchInformation
|
684
|
+
include Google::Apis::Core::Hashable
|
685
|
+
|
686
|
+
#
|
687
|
+
# Corresponds to the JSON property `formattedSearchTime`
|
688
|
+
# @return [String]
|
689
|
+
attr_accessor :formatted_search_time
|
690
|
+
|
691
|
+
#
|
692
|
+
# Corresponds to the JSON property `formattedTotalResults`
|
693
|
+
# @return [String]
|
694
|
+
attr_accessor :formatted_total_results
|
695
|
+
|
696
|
+
#
|
697
|
+
# Corresponds to the JSON property `searchTime`
|
698
|
+
# @return [Float]
|
699
|
+
attr_accessor :search_time
|
700
|
+
|
701
|
+
#
|
702
|
+
# Corresponds to the JSON property `totalResults`
|
703
|
+
# @return [String]
|
704
|
+
attr_accessor :total_results
|
705
|
+
|
706
|
+
def initialize(**args)
|
707
|
+
update!(**args)
|
708
|
+
end
|
709
|
+
|
710
|
+
# Update properties of this object
|
711
|
+
def update!(**args)
|
712
|
+
@formatted_search_time = args[:formatted_search_time] unless args[:formatted_search_time].nil?
|
713
|
+
@formatted_total_results = args[:formatted_total_results] unless args[:formatted_total_results].nil?
|
714
|
+
@search_time = args[:search_time] unless args[:search_time].nil?
|
715
|
+
@total_results = args[:total_results] unless args[:total_results].nil?
|
716
|
+
end
|
717
|
+
end
|
718
|
+
|
719
|
+
#
|
720
|
+
class Spelling
|
721
|
+
include Google::Apis::Core::Hashable
|
722
|
+
|
723
|
+
#
|
724
|
+
# Corresponds to the JSON property `correctedQuery`
|
725
|
+
# @return [String]
|
726
|
+
attr_accessor :corrected_query
|
727
|
+
|
728
|
+
#
|
729
|
+
# Corresponds to the JSON property `htmlCorrectedQuery`
|
730
|
+
# @return [String]
|
731
|
+
attr_accessor :html_corrected_query
|
732
|
+
|
733
|
+
def initialize(**args)
|
734
|
+
update!(**args)
|
735
|
+
end
|
736
|
+
|
737
|
+
# Update properties of this object
|
738
|
+
def update!(**args)
|
739
|
+
@corrected_query = args[:corrected_query] unless args[:corrected_query].nil?
|
740
|
+
@html_corrected_query = args[:html_corrected_query] unless args[:html_corrected_query].nil?
|
741
|
+
end
|
742
|
+
end
|
743
|
+
|
744
|
+
#
|
745
|
+
class Url
|
746
|
+
include Google::Apis::Core::Hashable
|
747
|
+
|
748
|
+
#
|
749
|
+
# Corresponds to the JSON property `template`
|
750
|
+
# @return [String]
|
751
|
+
attr_accessor :template
|
752
|
+
|
753
|
+
#
|
754
|
+
# Corresponds to the JSON property `type`
|
755
|
+
# @return [String]
|
756
|
+
attr_accessor :type
|
757
|
+
|
758
|
+
def initialize(**args)
|
759
|
+
update!(**args)
|
760
|
+
end
|
761
|
+
|
762
|
+
# Update properties of this object
|
763
|
+
def update!(**args)
|
764
|
+
@template = args[:template] unless args[:template].nil?
|
765
|
+
@type = args[:type] unless args[:type].nil?
|
766
|
+
end
|
767
|
+
end
|
768
|
+
end
|
769
|
+
end
|
770
|
+
end
|
771
|
+
end
|