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
@@ -0,0 +1,31 @@
|
|
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/civicinfo_v2/service.rb'
|
16
|
+
require 'google/apis/civicinfo_v2/classes.rb'
|
17
|
+
require 'google/apis/civicinfo_v2/representations.rb'
|
18
|
+
|
19
|
+
module Google
|
20
|
+
module Apis
|
21
|
+
# Google Civic Information API
|
22
|
+
#
|
23
|
+
# An API for accessing civic information.
|
24
|
+
#
|
25
|
+
# @see https://developers.google.com/civic-information
|
26
|
+
module CivicinfoV2
|
27
|
+
VERSION = 'V2'
|
28
|
+
REVISION = '20150302'
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,1057 @@
|
|
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 CivicinfoV2
|
24
|
+
|
25
|
+
# Describes information about a regional election administrative area.
|
26
|
+
class AdministrationRegion
|
27
|
+
include Google::Apis::Core::Hashable
|
28
|
+
|
29
|
+
# Information about an election administrative body (e.g. County Board of
|
30
|
+
# Elections).
|
31
|
+
# Corresponds to the JSON property `electionAdministrationBody`
|
32
|
+
# @return [Google::Apis::CivicinfoV2::AdministrativeBody]
|
33
|
+
attr_accessor :election_administration_body
|
34
|
+
|
35
|
+
# An ID for this object. IDs may change in future requests and should not be
|
36
|
+
# cached. Access to this field requires special access that can be requested
|
37
|
+
# from the Request more link on the Quotas page.
|
38
|
+
# Corresponds to the JSON property `id`
|
39
|
+
# @return [String]
|
40
|
+
attr_accessor :id
|
41
|
+
|
42
|
+
# Describes information about a regional election administrative area.
|
43
|
+
# Corresponds to the JSON property `local_jurisdiction`
|
44
|
+
# @return [Google::Apis::CivicinfoV2::AdministrationRegion]
|
45
|
+
attr_accessor :local_jurisdiction
|
46
|
+
|
47
|
+
# The name of the jurisdiction.
|
48
|
+
# Corresponds to the JSON property `name`
|
49
|
+
# @return [String]
|
50
|
+
attr_accessor :name
|
51
|
+
|
52
|
+
# A list of sources for this area. If multiple sources are listed the data has
|
53
|
+
# been aggregated from those sources.
|
54
|
+
# Corresponds to the JSON property `sources`
|
55
|
+
# @return [Array<Google::Apis::CivicinfoV2::Source>]
|
56
|
+
attr_accessor :sources
|
57
|
+
|
58
|
+
def initialize(**args)
|
59
|
+
update!(**args)
|
60
|
+
end
|
61
|
+
|
62
|
+
# Update properties of this object
|
63
|
+
def update!(**args)
|
64
|
+
@election_administration_body = args[:election_administration_body] unless args[:election_administration_body].nil?
|
65
|
+
@id = args[:id] unless args[:id].nil?
|
66
|
+
@local_jurisdiction = args[:local_jurisdiction] unless args[:local_jurisdiction].nil?
|
67
|
+
@name = args[:name] unless args[:name].nil?
|
68
|
+
@sources = args[:sources] unless args[:sources].nil?
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
# Information about an election administrative body (e.g. County Board of
|
73
|
+
# Elections).
|
74
|
+
class AdministrativeBody
|
75
|
+
include Google::Apis::Core::Hashable
|
76
|
+
|
77
|
+
# A URL provided by this administrative body for information on absentee voting.
|
78
|
+
# Corresponds to the JSON property `absenteeVotingInfoUrl`
|
79
|
+
# @return [String]
|
80
|
+
attr_accessor :absentee_voting_info_url
|
81
|
+
|
82
|
+
# A URL provided by this administrative body to give contest information to the
|
83
|
+
# voter.
|
84
|
+
# Corresponds to the JSON property `ballotInfoUrl`
|
85
|
+
# @return [String]
|
86
|
+
attr_accessor :ballot_info_url
|
87
|
+
|
88
|
+
# A simple representation of an address.
|
89
|
+
# Corresponds to the JSON property `correspondenceAddress`
|
90
|
+
# @return [Google::Apis::CivicinfoV2::SimpleAddressType]
|
91
|
+
attr_accessor :correspondence_address
|
92
|
+
|
93
|
+
# A URL provided by this administrative body for looking up general election
|
94
|
+
# information.
|
95
|
+
# Corresponds to the JSON property `electionInfoUrl`
|
96
|
+
# @return [String]
|
97
|
+
attr_accessor :election_info_url
|
98
|
+
|
99
|
+
# The election officials for this election administrative body.
|
100
|
+
# Corresponds to the JSON property `electionOfficials`
|
101
|
+
# @return [Array<Google::Apis::CivicinfoV2::ElectionOfficial>]
|
102
|
+
attr_accessor :election_officials
|
103
|
+
|
104
|
+
# A URL provided by this administrative body for confirming that the voter is
|
105
|
+
# registered to vote.
|
106
|
+
# Corresponds to the JSON property `electionRegistrationConfirmationUrl`
|
107
|
+
# @return [String]
|
108
|
+
attr_accessor :election_registration_confirmation_url
|
109
|
+
|
110
|
+
# A URL provided by this administrative body for looking up how to register to
|
111
|
+
# vote.
|
112
|
+
# Corresponds to the JSON property `electionRegistrationUrl`
|
113
|
+
# @return [String]
|
114
|
+
attr_accessor :election_registration_url
|
115
|
+
|
116
|
+
# A URL provided by this administrative body describing election rules to the
|
117
|
+
# voter.
|
118
|
+
# Corresponds to the JSON property `electionRulesUrl`
|
119
|
+
# @return [String]
|
120
|
+
attr_accessor :election_rules_url
|
121
|
+
|
122
|
+
# A description of the hours of operation for this administrative body.
|
123
|
+
# Corresponds to the JSON property `hoursOfOperation`
|
124
|
+
# @return [String]
|
125
|
+
attr_accessor :hours_of_operation
|
126
|
+
|
127
|
+
# The name of this election administrative body.
|
128
|
+
# Corresponds to the JSON property `name`
|
129
|
+
# @return [String]
|
130
|
+
attr_accessor :name
|
131
|
+
|
132
|
+
# A simple representation of an address.
|
133
|
+
# Corresponds to the JSON property `physicalAddress`
|
134
|
+
# @return [Google::Apis::CivicinfoV2::SimpleAddressType]
|
135
|
+
attr_accessor :physical_address
|
136
|
+
|
137
|
+
# A description of the services this administrative body may provide.
|
138
|
+
# Corresponds to the JSON property `voter_services`
|
139
|
+
# @return [Array<String>]
|
140
|
+
attr_accessor :voter_services
|
141
|
+
|
142
|
+
# A URL provided by this administrative body for looking up where to vote.
|
143
|
+
# Corresponds to the JSON property `votingLocationFinderUrl`
|
144
|
+
# @return [String]
|
145
|
+
attr_accessor :voting_location_finder_url
|
146
|
+
|
147
|
+
def initialize(**args)
|
148
|
+
update!(**args)
|
149
|
+
end
|
150
|
+
|
151
|
+
# Update properties of this object
|
152
|
+
def update!(**args)
|
153
|
+
@absentee_voting_info_url = args[:absentee_voting_info_url] unless args[:absentee_voting_info_url].nil?
|
154
|
+
@ballot_info_url = args[:ballot_info_url] unless args[:ballot_info_url].nil?
|
155
|
+
@correspondence_address = args[:correspondence_address] unless args[:correspondence_address].nil?
|
156
|
+
@election_info_url = args[:election_info_url] unless args[:election_info_url].nil?
|
157
|
+
@election_officials = args[:election_officials] unless args[:election_officials].nil?
|
158
|
+
@election_registration_confirmation_url = args[:election_registration_confirmation_url] unless args[:election_registration_confirmation_url].nil?
|
159
|
+
@election_registration_url = args[:election_registration_url] unless args[:election_registration_url].nil?
|
160
|
+
@election_rules_url = args[:election_rules_url] unless args[:election_rules_url].nil?
|
161
|
+
@hours_of_operation = args[:hours_of_operation] unless args[:hours_of_operation].nil?
|
162
|
+
@name = args[:name] unless args[:name].nil?
|
163
|
+
@physical_address = args[:physical_address] unless args[:physical_address].nil?
|
164
|
+
@voter_services = args[:voter_services] unless args[:voter_services].nil?
|
165
|
+
@voting_location_finder_url = args[:voting_location_finder_url] unless args[:voting_location_finder_url].nil?
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
# Information about a candidate running for elected office.
|
170
|
+
class Candidate
|
171
|
+
include Google::Apis::Core::Hashable
|
172
|
+
|
173
|
+
# The URL for the candidate's campaign web site.
|
174
|
+
# Corresponds to the JSON property `candidateUrl`
|
175
|
+
# @return [String]
|
176
|
+
attr_accessor :candidate_url
|
177
|
+
|
178
|
+
# A list of known (social) media channels for this candidate.
|
179
|
+
# Corresponds to the JSON property `channels`
|
180
|
+
# @return [Array<Google::Apis::CivicinfoV2::Channel>]
|
181
|
+
attr_accessor :channels
|
182
|
+
|
183
|
+
# The email address for the candidate's campaign.
|
184
|
+
# Corresponds to the JSON property `email`
|
185
|
+
# @return [String]
|
186
|
+
attr_accessor :email
|
187
|
+
|
188
|
+
# The candidate's name.
|
189
|
+
# Corresponds to the JSON property `name`
|
190
|
+
# @return [String]
|
191
|
+
attr_accessor :name
|
192
|
+
|
193
|
+
# The order the candidate appears on the ballot for this contest.
|
194
|
+
# Corresponds to the JSON property `orderOnBallot`
|
195
|
+
# @return [String]
|
196
|
+
attr_accessor :order_on_ballot
|
197
|
+
|
198
|
+
# The full name of the party the candidate is a member of.
|
199
|
+
# Corresponds to the JSON property `party`
|
200
|
+
# @return [String]
|
201
|
+
attr_accessor :party
|
202
|
+
|
203
|
+
# The voice phone number for the candidate's campaign office.
|
204
|
+
# Corresponds to the JSON property `phone`
|
205
|
+
# @return [String]
|
206
|
+
attr_accessor :phone
|
207
|
+
|
208
|
+
# A URL for a photo of the candidate.
|
209
|
+
# Corresponds to the JSON property `photoUrl`
|
210
|
+
# @return [String]
|
211
|
+
attr_accessor :photo_url
|
212
|
+
|
213
|
+
def initialize(**args)
|
214
|
+
update!(**args)
|
215
|
+
end
|
216
|
+
|
217
|
+
# Update properties of this object
|
218
|
+
def update!(**args)
|
219
|
+
@candidate_url = args[:candidate_url] unless args[:candidate_url].nil?
|
220
|
+
@channels = args[:channels] unless args[:channels].nil?
|
221
|
+
@email = args[:email] unless args[:email].nil?
|
222
|
+
@name = args[:name] unless args[:name].nil?
|
223
|
+
@order_on_ballot = args[:order_on_ballot] unless args[:order_on_ballot].nil?
|
224
|
+
@party = args[:party] unless args[:party].nil?
|
225
|
+
@phone = args[:phone] unless args[:phone].nil?
|
226
|
+
@photo_url = args[:photo_url] unless args[:photo_url].nil?
|
227
|
+
end
|
228
|
+
end
|
229
|
+
|
230
|
+
# A social media or web channel for a candidate.
|
231
|
+
class Channel
|
232
|
+
include Google::Apis::Core::Hashable
|
233
|
+
|
234
|
+
# The unique public identifier for the candidate's channel.
|
235
|
+
# Corresponds to the JSON property `id`
|
236
|
+
# @return [String]
|
237
|
+
attr_accessor :id
|
238
|
+
|
239
|
+
# The type of channel. The following is a list of types of channels, but is not
|
240
|
+
# exhaustive. More channel types may be added at a later time. One of:
|
241
|
+
# GooglePlus, YouTube, Facebook, Twitter
|
242
|
+
# Corresponds to the JSON property `type`
|
243
|
+
# @return [String]
|
244
|
+
attr_accessor :type
|
245
|
+
|
246
|
+
def initialize(**args)
|
247
|
+
update!(**args)
|
248
|
+
end
|
249
|
+
|
250
|
+
# Update properties of this object
|
251
|
+
def update!(**args)
|
252
|
+
@id = args[:id] unless args[:id].nil?
|
253
|
+
@type = args[:type] unless args[:type].nil?
|
254
|
+
end
|
255
|
+
end
|
256
|
+
|
257
|
+
# Information about a contest that appears on a voter's ballot.
|
258
|
+
class Contest
|
259
|
+
include Google::Apis::Core::Hashable
|
260
|
+
|
261
|
+
# A number specifying the position of this contest on the voter's ballot.
|
262
|
+
# Corresponds to the JSON property `ballotPlacement`
|
263
|
+
# @return [String]
|
264
|
+
attr_accessor :ballot_placement
|
265
|
+
|
266
|
+
# The candidate choices for this contest.
|
267
|
+
# Corresponds to the JSON property `candidates`
|
268
|
+
# @return [Array<Google::Apis::CivicinfoV2::Candidate>]
|
269
|
+
attr_accessor :candidates
|
270
|
+
|
271
|
+
# Describes the geographic scope of a contest.
|
272
|
+
# Corresponds to the JSON property `district`
|
273
|
+
# @return [Google::Apis::CivicinfoV2::ElectoralDistrict]
|
274
|
+
attr_accessor :district
|
275
|
+
|
276
|
+
# A description of any additional eligibility requirements for voting in this
|
277
|
+
# contest.
|
278
|
+
# Corresponds to the JSON property `electorateSpecifications`
|
279
|
+
# @return [String]
|
280
|
+
attr_accessor :electorate_specifications
|
281
|
+
|
282
|
+
# An ID for this object. IDs may change in future requests and should not be
|
283
|
+
# cached. Access to this field requires special access that can be requested
|
284
|
+
# from the Request more link on the Quotas page.
|
285
|
+
# Corresponds to the JSON property `id`
|
286
|
+
# @return [String]
|
287
|
+
attr_accessor :id
|
288
|
+
|
289
|
+
# The levels of government of the office for this contest. There may be more
|
290
|
+
# than one in cases where a jurisdiction effectively acts at two different
|
291
|
+
# levels of government; for example, the mayor of the District of Columbia acts
|
292
|
+
# at "locality" level, but also effectively at both "administrative-area-2" and "
|
293
|
+
# administrative-area-1".
|
294
|
+
# Corresponds to the JSON property `level`
|
295
|
+
# @return [Array<String>]
|
296
|
+
attr_accessor :level
|
297
|
+
|
298
|
+
# The number of candidates that will be elected to office in this contest.
|
299
|
+
# Corresponds to the JSON property `numberElected`
|
300
|
+
# @return [String]
|
301
|
+
attr_accessor :number_elected
|
302
|
+
|
303
|
+
# The number of candidates that a voter may vote for in this contest.
|
304
|
+
# Corresponds to the JSON property `numberVotingFor`
|
305
|
+
# @return [String]
|
306
|
+
attr_accessor :number_voting_for
|
307
|
+
|
308
|
+
# The name of the office for this contest.
|
309
|
+
# Corresponds to the JSON property `office`
|
310
|
+
# @return [String]
|
311
|
+
attr_accessor :office
|
312
|
+
|
313
|
+
# If this is a partisan election, the name of the party it is for.
|
314
|
+
# Corresponds to the JSON property `primaryParty`
|
315
|
+
# @return [String]
|
316
|
+
attr_accessor :primary_party
|
317
|
+
|
318
|
+
# A brief description of the referendum. This field is only populated for
|
319
|
+
# contests of type 'Referendum'.
|
320
|
+
# Corresponds to the JSON property `referendumSubtitle`
|
321
|
+
# @return [String]
|
322
|
+
attr_accessor :referendum_subtitle
|
323
|
+
|
324
|
+
# The title of the referendum (e.g. 'Proposition 42'). This field is only
|
325
|
+
# populated for contests of type 'Referendum'.
|
326
|
+
# Corresponds to the JSON property `referendumTitle`
|
327
|
+
# @return [String]
|
328
|
+
attr_accessor :referendum_title
|
329
|
+
|
330
|
+
# A link to the referendum. This field is only populated for contests of type '
|
331
|
+
# Referendum'.
|
332
|
+
# Corresponds to the JSON property `referendumUrl`
|
333
|
+
# @return [String]
|
334
|
+
attr_accessor :referendum_url
|
335
|
+
|
336
|
+
# The roles which this office fulfills.
|
337
|
+
# Corresponds to the JSON property `roles`
|
338
|
+
# @return [Array<String>]
|
339
|
+
attr_accessor :roles
|
340
|
+
|
341
|
+
# A list of sources for this contest. If multiple sources are listed, the data
|
342
|
+
# has been aggregated from those sources.
|
343
|
+
# Corresponds to the JSON property `sources`
|
344
|
+
# @return [Array<Google::Apis::CivicinfoV2::Source>]
|
345
|
+
attr_accessor :sources
|
346
|
+
|
347
|
+
# "Yes" or "No" depending on whether this a contest being held outside the
|
348
|
+
# normal election cycle.
|
349
|
+
# Corresponds to the JSON property `special`
|
350
|
+
# @return [String]
|
351
|
+
attr_accessor :special
|
352
|
+
|
353
|
+
# The type of contest. Usually this will be 'General', 'Primary', or 'Run-off'
|
354
|
+
# for contests with candidates. For referenda this will be 'Referendum'.
|
355
|
+
# Corresponds to the JSON property `type`
|
356
|
+
# @return [String]
|
357
|
+
attr_accessor :type
|
358
|
+
|
359
|
+
def initialize(**args)
|
360
|
+
update!(**args)
|
361
|
+
end
|
362
|
+
|
363
|
+
# Update properties of this object
|
364
|
+
def update!(**args)
|
365
|
+
@ballot_placement = args[:ballot_placement] unless args[:ballot_placement].nil?
|
366
|
+
@candidates = args[:candidates] unless args[:candidates].nil?
|
367
|
+
@district = args[:district] unless args[:district].nil?
|
368
|
+
@electorate_specifications = args[:electorate_specifications] unless args[:electorate_specifications].nil?
|
369
|
+
@id = args[:id] unless args[:id].nil?
|
370
|
+
@level = args[:level] unless args[:level].nil?
|
371
|
+
@number_elected = args[:number_elected] unless args[:number_elected].nil?
|
372
|
+
@number_voting_for = args[:number_voting_for] unless args[:number_voting_for].nil?
|
373
|
+
@office = args[:office] unless args[:office].nil?
|
374
|
+
@primary_party = args[:primary_party] unless args[:primary_party].nil?
|
375
|
+
@referendum_subtitle = args[:referendum_subtitle] unless args[:referendum_subtitle].nil?
|
376
|
+
@referendum_title = args[:referendum_title] unless args[:referendum_title].nil?
|
377
|
+
@referendum_url = args[:referendum_url] unless args[:referendum_url].nil?
|
378
|
+
@roles = args[:roles] unless args[:roles].nil?
|
379
|
+
@sources = args[:sources] unless args[:sources].nil?
|
380
|
+
@special = args[:special] unless args[:special].nil?
|
381
|
+
@type = args[:type] unless args[:type].nil?
|
382
|
+
end
|
383
|
+
end
|
384
|
+
|
385
|
+
# The result of a division search query.
|
386
|
+
class SearchDivisionResponse
|
387
|
+
include Google::Apis::Core::Hashable
|
388
|
+
|
389
|
+
# Identifies what kind of resource this is. Value: the fixed string "civicinfo#
|
390
|
+
# divisionSearchResponse".
|
391
|
+
# Corresponds to the JSON property `kind`
|
392
|
+
# @return [String]
|
393
|
+
attr_accessor :kind
|
394
|
+
|
395
|
+
#
|
396
|
+
# Corresponds to the JSON property `results`
|
397
|
+
# @return [Array<Google::Apis::CivicinfoV2::DivisionSearchResult>]
|
398
|
+
attr_accessor :results
|
399
|
+
|
400
|
+
def initialize(**args)
|
401
|
+
update!(**args)
|
402
|
+
end
|
403
|
+
|
404
|
+
# Update properties of this object
|
405
|
+
def update!(**args)
|
406
|
+
@kind = args[:kind] unless args[:kind].nil?
|
407
|
+
@results = args[:results] unless args[:results].nil?
|
408
|
+
end
|
409
|
+
end
|
410
|
+
|
411
|
+
# Represents a political geographic division that matches the requested query.
|
412
|
+
class DivisionSearchResult
|
413
|
+
include Google::Apis::Core::Hashable
|
414
|
+
|
415
|
+
# Other Open Civic Data identifiers that refer to the same division -- for
|
416
|
+
# example, those that refer to other political divisions whose boundaries are
|
417
|
+
# defined to be coterminous with this one. For example, ocd-division/country:us/
|
418
|
+
# state:wy will include an alias of ocd-division/country:us/state:wy/cd:1, since
|
419
|
+
# Wyoming has only one Congressional district.
|
420
|
+
# Corresponds to the JSON property `aliases`
|
421
|
+
# @return [Array<String>]
|
422
|
+
attr_accessor :aliases
|
423
|
+
|
424
|
+
# The name of the division.
|
425
|
+
# Corresponds to the JSON property `name`
|
426
|
+
# @return [String]
|
427
|
+
attr_accessor :name
|
428
|
+
|
429
|
+
# The unique Open Civic Data identifier for this division.
|
430
|
+
# Corresponds to the JSON property `ocdId`
|
431
|
+
# @return [String]
|
432
|
+
attr_accessor :ocd_id
|
433
|
+
|
434
|
+
def initialize(**args)
|
435
|
+
update!(**args)
|
436
|
+
end
|
437
|
+
|
438
|
+
# Update properties of this object
|
439
|
+
def update!(**args)
|
440
|
+
@aliases = args[:aliases] unless args[:aliases].nil?
|
441
|
+
@name = args[:name] unless args[:name].nil?
|
442
|
+
@ocd_id = args[:ocd_id] unless args[:ocd_id].nil?
|
443
|
+
end
|
444
|
+
end
|
445
|
+
|
446
|
+
# Information about the election that was queried.
|
447
|
+
class Election
|
448
|
+
include Google::Apis::Core::Hashable
|
449
|
+
|
450
|
+
# Day of the election in YYYY-MM-DD format.
|
451
|
+
# Corresponds to the JSON property `electionDay`
|
452
|
+
# @return [String]
|
453
|
+
attr_accessor :election_day
|
454
|
+
|
455
|
+
# The unique ID of this election.
|
456
|
+
# Corresponds to the JSON property `id`
|
457
|
+
# @return [String]
|
458
|
+
attr_accessor :id
|
459
|
+
|
460
|
+
# A displayable name for the election.
|
461
|
+
# Corresponds to the JSON property `name`
|
462
|
+
# @return [String]
|
463
|
+
attr_accessor :name
|
464
|
+
|
465
|
+
def initialize(**args)
|
466
|
+
update!(**args)
|
467
|
+
end
|
468
|
+
|
469
|
+
# Update properties of this object
|
470
|
+
def update!(**args)
|
471
|
+
@election_day = args[:election_day] unless args[:election_day].nil?
|
472
|
+
@id = args[:id] unless args[:id].nil?
|
473
|
+
@name = args[:name] unless args[:name].nil?
|
474
|
+
end
|
475
|
+
end
|
476
|
+
|
477
|
+
# Information about individual election officials.
|
478
|
+
class ElectionOfficial
|
479
|
+
include Google::Apis::Core::Hashable
|
480
|
+
|
481
|
+
# The email address of the election official.
|
482
|
+
# Corresponds to the JSON property `emailAddress`
|
483
|
+
# @return [String]
|
484
|
+
attr_accessor :email_address
|
485
|
+
|
486
|
+
# The fax number of the election official.
|
487
|
+
# Corresponds to the JSON property `faxNumber`
|
488
|
+
# @return [String]
|
489
|
+
attr_accessor :fax_number
|
490
|
+
|
491
|
+
# The full name of the election official.
|
492
|
+
# Corresponds to the JSON property `name`
|
493
|
+
# @return [String]
|
494
|
+
attr_accessor :name
|
495
|
+
|
496
|
+
# The office phone number of the election official.
|
497
|
+
# Corresponds to the JSON property `officePhoneNumber`
|
498
|
+
# @return [String]
|
499
|
+
attr_accessor :office_phone_number
|
500
|
+
|
501
|
+
# The title of the election official.
|
502
|
+
# Corresponds to the JSON property `title`
|
503
|
+
# @return [String]
|
504
|
+
attr_accessor :title
|
505
|
+
|
506
|
+
def initialize(**args)
|
507
|
+
update!(**args)
|
508
|
+
end
|
509
|
+
|
510
|
+
# Update properties of this object
|
511
|
+
def update!(**args)
|
512
|
+
@email_address = args[:email_address] unless args[:email_address].nil?
|
513
|
+
@fax_number = args[:fax_number] unless args[:fax_number].nil?
|
514
|
+
@name = args[:name] unless args[:name].nil?
|
515
|
+
@office_phone_number = args[:office_phone_number] unless args[:office_phone_number].nil?
|
516
|
+
@title = args[:title] unless args[:title].nil?
|
517
|
+
end
|
518
|
+
end
|
519
|
+
|
520
|
+
# The list of elections available for this version of the API.
|
521
|
+
class QueryElectionsResponse
|
522
|
+
include Google::Apis::Core::Hashable
|
523
|
+
|
524
|
+
# A list of available elections
|
525
|
+
# Corresponds to the JSON property `elections`
|
526
|
+
# @return [Array<Google::Apis::CivicinfoV2::Election>]
|
527
|
+
attr_accessor :elections
|
528
|
+
|
529
|
+
# Identifies what kind of resource this is. Value: the fixed string "civicinfo#
|
530
|
+
# electionsQueryResponse".
|
531
|
+
# Corresponds to the JSON property `kind`
|
532
|
+
# @return [String]
|
533
|
+
attr_accessor :kind
|
534
|
+
|
535
|
+
def initialize(**args)
|
536
|
+
update!(**args)
|
537
|
+
end
|
538
|
+
|
539
|
+
# Update properties of this object
|
540
|
+
def update!(**args)
|
541
|
+
@elections = args[:elections] unless args[:elections].nil?
|
542
|
+
@kind = args[:kind] unless args[:kind].nil?
|
543
|
+
end
|
544
|
+
end
|
545
|
+
|
546
|
+
# Describes the geographic scope of a contest.
|
547
|
+
class ElectoralDistrict
|
548
|
+
include Google::Apis::Core::Hashable
|
549
|
+
|
550
|
+
# An identifier for this district, relative to its scope. For example, the 34th
|
551
|
+
# State Senate district would have id "34" and a scope of stateUpper.
|
552
|
+
# Corresponds to the JSON property `id`
|
553
|
+
# @return [String]
|
554
|
+
attr_accessor :id
|
555
|
+
|
556
|
+
# The name of the district.
|
557
|
+
# Corresponds to the JSON property `name`
|
558
|
+
# @return [String]
|
559
|
+
attr_accessor :name
|
560
|
+
|
561
|
+
# The geographic scope of this district. If unspecified the district's geography
|
562
|
+
# is not known. One of: national, statewide, congressional, stateUpper,
|
563
|
+
# stateLower, countywide, judicial, schoolBoard, cityWide, township,
|
564
|
+
# countyCouncil, cityCouncil, ward, special
|
565
|
+
# Corresponds to the JSON property `scope`
|
566
|
+
# @return [String]
|
567
|
+
attr_accessor :scope
|
568
|
+
|
569
|
+
def initialize(**args)
|
570
|
+
update!(**args)
|
571
|
+
end
|
572
|
+
|
573
|
+
# Update properties of this object
|
574
|
+
def update!(**args)
|
575
|
+
@id = args[:id] unless args[:id].nil?
|
576
|
+
@name = args[:name] unless args[:name].nil?
|
577
|
+
@scope = args[:scope] unless args[:scope].nil?
|
578
|
+
end
|
579
|
+
end
|
580
|
+
|
581
|
+
# Describes a political geography.
|
582
|
+
class GeographicDivision
|
583
|
+
include Google::Apis::Core::Hashable
|
584
|
+
|
585
|
+
# Any other valid OCD IDs that refer to the same division.
|
586
|
+
# Because OCD IDs are meant to be human-readable and at least somewhat
|
587
|
+
# predictable, there are occasionally several identifiers for a single division.
|
588
|
+
# These identifiers are defined to be equivalent to one another, and one is
|
589
|
+
# always indicated as the primary identifier. The primary identifier will be
|
590
|
+
# returned in ocd_id above, and any other equivalent valid identifiers will be
|
591
|
+
# returned in this list.
|
592
|
+
# For example, if this division's OCD ID is ocd-division/country:us/district:dc,
|
593
|
+
# this will contain ocd-division/country:us/state:dc.
|
594
|
+
# Corresponds to the JSON property `alsoKnownAs`
|
595
|
+
# @return [Array<String>]
|
596
|
+
attr_accessor :also_known_as
|
597
|
+
|
598
|
+
# The name of the division.
|
599
|
+
# Corresponds to the JSON property `name`
|
600
|
+
# @return [String]
|
601
|
+
attr_accessor :name
|
602
|
+
|
603
|
+
# List of indices in the offices array, one for each office elected from this
|
604
|
+
# division. Will only be present if includeOffices was true (or absent) in the
|
605
|
+
# request.
|
606
|
+
# Corresponds to the JSON property `officeIndices`
|
607
|
+
# @return [Array<Fixnum>]
|
608
|
+
attr_accessor :office_indices
|
609
|
+
|
610
|
+
def initialize(**args)
|
611
|
+
update!(**args)
|
612
|
+
end
|
613
|
+
|
614
|
+
# Update properties of this object
|
615
|
+
def update!(**args)
|
616
|
+
@also_known_as = args[:also_known_as] unless args[:also_known_as].nil?
|
617
|
+
@name = args[:name] unless args[:name].nil?
|
618
|
+
@office_indices = args[:office_indices] unless args[:office_indices].nil?
|
619
|
+
end
|
620
|
+
end
|
621
|
+
|
622
|
+
# Information about an Office held by one or more Officials.
|
623
|
+
class Office
|
624
|
+
include Google::Apis::Core::Hashable
|
625
|
+
|
626
|
+
# The OCD ID of the division with which this office is associated.
|
627
|
+
# Corresponds to the JSON property `divisionId`
|
628
|
+
# @return [String]
|
629
|
+
attr_accessor :division_id
|
630
|
+
|
631
|
+
# The levels of government of which this office is part. There may be more than
|
632
|
+
# one in cases where a jurisdiction effectively acts at two different levels of
|
633
|
+
# government; for example, the mayor of the District of Columbia acts at "
|
634
|
+
# locality" level, but also effectively at both "administrative-area-2" and "
|
635
|
+
# administrative-area-1".
|
636
|
+
# Corresponds to the JSON property `levels`
|
637
|
+
# @return [Array<String>]
|
638
|
+
attr_accessor :levels
|
639
|
+
|
640
|
+
# The human-readable name of the office.
|
641
|
+
# Corresponds to the JSON property `name`
|
642
|
+
# @return [String]
|
643
|
+
attr_accessor :name
|
644
|
+
|
645
|
+
# List of indices in the officials array of people who presently hold this
|
646
|
+
# office.
|
647
|
+
# Corresponds to the JSON property `officialIndices`
|
648
|
+
# @return [Array<Fixnum>]
|
649
|
+
attr_accessor :official_indices
|
650
|
+
|
651
|
+
# The roles which this office fulfills. Roles are not meant to be exhaustive, or
|
652
|
+
# to exactly specify the entire set of responsibilities of a given office, but
|
653
|
+
# are meant to be rough categories that are useful for general selection from or
|
654
|
+
# sorting of a list of offices.
|
655
|
+
# Corresponds to the JSON property `roles`
|
656
|
+
# @return [Array<String>]
|
657
|
+
attr_accessor :roles
|
658
|
+
|
659
|
+
# A list of sources for this office. If multiple sources are listed, the data
|
660
|
+
# has been aggregated from those sources.
|
661
|
+
# Corresponds to the JSON property `sources`
|
662
|
+
# @return [Array<Google::Apis::CivicinfoV2::Source>]
|
663
|
+
attr_accessor :sources
|
664
|
+
|
665
|
+
def initialize(**args)
|
666
|
+
update!(**args)
|
667
|
+
end
|
668
|
+
|
669
|
+
# Update properties of this object
|
670
|
+
def update!(**args)
|
671
|
+
@division_id = args[:division_id] unless args[:division_id].nil?
|
672
|
+
@levels = args[:levels] unless args[:levels].nil?
|
673
|
+
@name = args[:name] unless args[:name].nil?
|
674
|
+
@official_indices = args[:official_indices] unless args[:official_indices].nil?
|
675
|
+
@roles = args[:roles] unless args[:roles].nil?
|
676
|
+
@sources = args[:sources] unless args[:sources].nil?
|
677
|
+
end
|
678
|
+
end
|
679
|
+
|
680
|
+
# Information about a person holding an elected office.
|
681
|
+
class Official
|
682
|
+
include Google::Apis::Core::Hashable
|
683
|
+
|
684
|
+
# Addresses at which to contact the official.
|
685
|
+
# Corresponds to the JSON property `address`
|
686
|
+
# @return [Array<Google::Apis::CivicinfoV2::SimpleAddressType>]
|
687
|
+
attr_accessor :address
|
688
|
+
|
689
|
+
# A list of known (social) media channels for this official.
|
690
|
+
# Corresponds to the JSON property `channels`
|
691
|
+
# @return [Array<Google::Apis::CivicinfoV2::Channel>]
|
692
|
+
attr_accessor :channels
|
693
|
+
|
694
|
+
# The direct email addresses for the official.
|
695
|
+
# Corresponds to the JSON property `emails`
|
696
|
+
# @return [Array<String>]
|
697
|
+
attr_accessor :emails
|
698
|
+
|
699
|
+
# The official's name.
|
700
|
+
# Corresponds to the JSON property `name`
|
701
|
+
# @return [String]
|
702
|
+
attr_accessor :name
|
703
|
+
|
704
|
+
# The full name of the party the official belongs to.
|
705
|
+
# Corresponds to the JSON property `party`
|
706
|
+
# @return [String]
|
707
|
+
attr_accessor :party
|
708
|
+
|
709
|
+
# The official's public contact phone numbers.
|
710
|
+
# Corresponds to the JSON property `phones`
|
711
|
+
# @return [Array<String>]
|
712
|
+
attr_accessor :phones
|
713
|
+
|
714
|
+
# A URL for a photo of the official.
|
715
|
+
# Corresponds to the JSON property `photoUrl`
|
716
|
+
# @return [String]
|
717
|
+
attr_accessor :photo_url
|
718
|
+
|
719
|
+
# The official's public website URLs.
|
720
|
+
# Corresponds to the JSON property `urls`
|
721
|
+
# @return [Array<String>]
|
722
|
+
attr_accessor :urls
|
723
|
+
|
724
|
+
def initialize(**args)
|
725
|
+
update!(**args)
|
726
|
+
end
|
727
|
+
|
728
|
+
# Update properties of this object
|
729
|
+
def update!(**args)
|
730
|
+
@address = args[:address] unless args[:address].nil?
|
731
|
+
@channels = args[:channels] unless args[:channels].nil?
|
732
|
+
@emails = args[:emails] unless args[:emails].nil?
|
733
|
+
@name = args[:name] unless args[:name].nil?
|
734
|
+
@party = args[:party] unless args[:party].nil?
|
735
|
+
@phones = args[:phones] unless args[:phones].nil?
|
736
|
+
@photo_url = args[:photo_url] unless args[:photo_url].nil?
|
737
|
+
@urls = args[:urls] unless args[:urls].nil?
|
738
|
+
end
|
739
|
+
end
|
740
|
+
|
741
|
+
# A location where a voter can vote. This may be an early vote site, an election
|
742
|
+
# day voting location, or a drop off location for a completed ballot.
|
743
|
+
class PollingLocation
|
744
|
+
include Google::Apis::Core::Hashable
|
745
|
+
|
746
|
+
# A simple representation of an address.
|
747
|
+
# Corresponds to the JSON property `address`
|
748
|
+
# @return [Google::Apis::CivicinfoV2::SimpleAddressType]
|
749
|
+
attr_accessor :address
|
750
|
+
|
751
|
+
# The last date that this early vote site or drop off location may be used. This
|
752
|
+
# field is not populated for polling locations.
|
753
|
+
# Corresponds to the JSON property `endDate`
|
754
|
+
# @return [String]
|
755
|
+
attr_accessor :end_date
|
756
|
+
|
757
|
+
# An ID for this object. IDs may change in future requests and should not be
|
758
|
+
# cached. Access to this field requires special access that can be requested
|
759
|
+
# from the Request more link on the Quotas page.
|
760
|
+
# Corresponds to the JSON property `id`
|
761
|
+
# @return [String]
|
762
|
+
attr_accessor :id
|
763
|
+
|
764
|
+
# The name of the early vote site or drop off location. This field is not
|
765
|
+
# populated for polling locations.
|
766
|
+
# Corresponds to the JSON property `name`
|
767
|
+
# @return [String]
|
768
|
+
attr_accessor :name
|
769
|
+
|
770
|
+
# Notes about this location (e.g. accessibility ramp or entrance to use).
|
771
|
+
# Corresponds to the JSON property `notes`
|
772
|
+
# @return [String]
|
773
|
+
attr_accessor :notes
|
774
|
+
|
775
|
+
# A description of when this location is open.
|
776
|
+
# Corresponds to the JSON property `pollingHours`
|
777
|
+
# @return [String]
|
778
|
+
attr_accessor :polling_hours
|
779
|
+
|
780
|
+
# A list of sources for this location. If multiple sources are listed the data
|
781
|
+
# has been aggregated from those sources.
|
782
|
+
# Corresponds to the JSON property `sources`
|
783
|
+
# @return [Array<Google::Apis::CivicinfoV2::Source>]
|
784
|
+
attr_accessor :sources
|
785
|
+
|
786
|
+
# The first date that this early vote site or drop off location may be used.
|
787
|
+
# This field is not populated for polling locations.
|
788
|
+
# Corresponds to the JSON property `startDate`
|
789
|
+
# @return [String]
|
790
|
+
attr_accessor :start_date
|
791
|
+
|
792
|
+
# The services provided by this early vote site or drop off location. This field
|
793
|
+
# is not populated for polling locations.
|
794
|
+
# Corresponds to the JSON property `voterServices`
|
795
|
+
# @return [String]
|
796
|
+
attr_accessor :voter_services
|
797
|
+
|
798
|
+
def initialize(**args)
|
799
|
+
update!(**args)
|
800
|
+
end
|
801
|
+
|
802
|
+
# Update properties of this object
|
803
|
+
def update!(**args)
|
804
|
+
@address = args[:address] unless args[:address].nil?
|
805
|
+
@end_date = args[:end_date] unless args[:end_date].nil?
|
806
|
+
@id = args[:id] unless args[:id].nil?
|
807
|
+
@name = args[:name] unless args[:name].nil?
|
808
|
+
@notes = args[:notes] unless args[:notes].nil?
|
809
|
+
@polling_hours = args[:polling_hours] unless args[:polling_hours].nil?
|
810
|
+
@sources = args[:sources] unless args[:sources].nil?
|
811
|
+
@start_date = args[:start_date] unless args[:start_date].nil?
|
812
|
+
@voter_services = args[:voter_services] unless args[:voter_services].nil?
|
813
|
+
end
|
814
|
+
end
|
815
|
+
|
816
|
+
#
|
817
|
+
class RepresentativeInfoData
|
818
|
+
include Google::Apis::Core::Hashable
|
819
|
+
|
820
|
+
# Political geographic divisions that contain the requested address.
|
821
|
+
# Corresponds to the JSON property `divisions`
|
822
|
+
# @return [Hash<String,Google::Apis::CivicinfoV2::GeographicDivision>]
|
823
|
+
attr_accessor :divisions
|
824
|
+
|
825
|
+
# Elected offices referenced by the divisions listed above. Will only be present
|
826
|
+
# if includeOffices was true in the request.
|
827
|
+
# Corresponds to the JSON property `offices`
|
828
|
+
# @return [Array<Google::Apis::CivicinfoV2::Office>]
|
829
|
+
attr_accessor :offices
|
830
|
+
|
831
|
+
# Officials holding the offices listed above. Will only be present if
|
832
|
+
# includeOffices was true in the request.
|
833
|
+
# Corresponds to the JSON property `officials`
|
834
|
+
# @return [Array<Google::Apis::CivicinfoV2::Official>]
|
835
|
+
attr_accessor :officials
|
836
|
+
|
837
|
+
def initialize(**args)
|
838
|
+
update!(**args)
|
839
|
+
end
|
840
|
+
|
841
|
+
# Update properties of this object
|
842
|
+
def update!(**args)
|
843
|
+
@divisions = args[:divisions] unless args[:divisions].nil?
|
844
|
+
@offices = args[:offices] unless args[:offices].nil?
|
845
|
+
@officials = args[:officials] unless args[:officials].nil?
|
846
|
+
end
|
847
|
+
end
|
848
|
+
|
849
|
+
# The result of a representative info lookup query.
|
850
|
+
class RepresentativeInfoResponse
|
851
|
+
include Google::Apis::Core::Hashable
|
852
|
+
|
853
|
+
# Political geographic divisions that contain the requested address.
|
854
|
+
# Corresponds to the JSON property `divisions`
|
855
|
+
# @return [Hash<String,Google::Apis::CivicinfoV2::GeographicDivision>]
|
856
|
+
attr_accessor :divisions
|
857
|
+
|
858
|
+
# Identifies what kind of resource this is. Value: the fixed string "civicinfo#
|
859
|
+
# representativeInfoResponse".
|
860
|
+
# Corresponds to the JSON property `kind`
|
861
|
+
# @return [String]
|
862
|
+
attr_accessor :kind
|
863
|
+
|
864
|
+
# A simple representation of an address.
|
865
|
+
# Corresponds to the JSON property `normalizedInput`
|
866
|
+
# @return [Google::Apis::CivicinfoV2::SimpleAddressType]
|
867
|
+
attr_accessor :normalized_input
|
868
|
+
|
869
|
+
# Elected offices referenced by the divisions listed above. Will only be present
|
870
|
+
# if includeOffices was true in the request.
|
871
|
+
# Corresponds to the JSON property `offices`
|
872
|
+
# @return [Array<Google::Apis::CivicinfoV2::Office>]
|
873
|
+
attr_accessor :offices
|
874
|
+
|
875
|
+
# Officials holding the offices listed above. Will only be present if
|
876
|
+
# includeOffices was true in the request.
|
877
|
+
# Corresponds to the JSON property `officials`
|
878
|
+
# @return [Array<Google::Apis::CivicinfoV2::Official>]
|
879
|
+
attr_accessor :officials
|
880
|
+
|
881
|
+
def initialize(**args)
|
882
|
+
update!(**args)
|
883
|
+
end
|
884
|
+
|
885
|
+
# Update properties of this object
|
886
|
+
def update!(**args)
|
887
|
+
@divisions = args[:divisions] unless args[:divisions].nil?
|
888
|
+
@kind = args[:kind] unless args[:kind].nil?
|
889
|
+
@normalized_input = args[:normalized_input] unless args[:normalized_input].nil?
|
890
|
+
@offices = args[:offices] unless args[:offices].nil?
|
891
|
+
@officials = args[:officials] unless args[:officials].nil?
|
892
|
+
end
|
893
|
+
end
|
894
|
+
|
895
|
+
# A simple representation of an address.
|
896
|
+
class SimpleAddressType
|
897
|
+
include Google::Apis::Core::Hashable
|
898
|
+
|
899
|
+
# The city or town for the address.
|
900
|
+
# Corresponds to the JSON property `city`
|
901
|
+
# @return [String]
|
902
|
+
attr_accessor :city
|
903
|
+
|
904
|
+
# The street name and number of this address.
|
905
|
+
# Corresponds to the JSON property `line1`
|
906
|
+
# @return [String]
|
907
|
+
attr_accessor :line1
|
908
|
+
|
909
|
+
# The second line the address, if needed.
|
910
|
+
# Corresponds to the JSON property `line2`
|
911
|
+
# @return [String]
|
912
|
+
attr_accessor :line2
|
913
|
+
|
914
|
+
# The third line of the address, if needed.
|
915
|
+
# Corresponds to the JSON property `line3`
|
916
|
+
# @return [String]
|
917
|
+
attr_accessor :line3
|
918
|
+
|
919
|
+
# The name of the location.
|
920
|
+
# Corresponds to the JSON property `locationName`
|
921
|
+
# @return [String]
|
922
|
+
attr_accessor :location_name
|
923
|
+
|
924
|
+
# The US two letter state abbreviation of the address.
|
925
|
+
# Corresponds to the JSON property `state`
|
926
|
+
# @return [String]
|
927
|
+
attr_accessor :state
|
928
|
+
|
929
|
+
# The US Postal Zip Code of the address.
|
930
|
+
# Corresponds to the JSON property `zip`
|
931
|
+
# @return [String]
|
932
|
+
attr_accessor :zip
|
933
|
+
|
934
|
+
def initialize(**args)
|
935
|
+
update!(**args)
|
936
|
+
end
|
937
|
+
|
938
|
+
# Update properties of this object
|
939
|
+
def update!(**args)
|
940
|
+
@city = args[:city] unless args[:city].nil?
|
941
|
+
@line1 = args[:line1] unless args[:line1].nil?
|
942
|
+
@line2 = args[:line2] unless args[:line2].nil?
|
943
|
+
@line3 = args[:line3] unless args[:line3].nil?
|
944
|
+
@location_name = args[:location_name] unless args[:location_name].nil?
|
945
|
+
@state = args[:state] unless args[:state].nil?
|
946
|
+
@zip = args[:zip] unless args[:zip].nil?
|
947
|
+
end
|
948
|
+
end
|
949
|
+
|
950
|
+
# Contains information about the data source for the element containing it.
|
951
|
+
class Source
|
952
|
+
include Google::Apis::Core::Hashable
|
953
|
+
|
954
|
+
# The name of the data source.
|
955
|
+
# Corresponds to the JSON property `name`
|
956
|
+
# @return [String]
|
957
|
+
attr_accessor :name
|
958
|
+
|
959
|
+
# Whether this data comes from an official government source.
|
960
|
+
# Corresponds to the JSON property `official`
|
961
|
+
# @return [Boolean]
|
962
|
+
attr_accessor :official
|
963
|
+
alias_method :official?, :official
|
964
|
+
|
965
|
+
def initialize(**args)
|
966
|
+
update!(**args)
|
967
|
+
end
|
968
|
+
|
969
|
+
# Update properties of this object
|
970
|
+
def update!(**args)
|
971
|
+
@name = args[:name] unless args[:name].nil?
|
972
|
+
@official = args[:official] unless args[:official].nil?
|
973
|
+
end
|
974
|
+
end
|
975
|
+
|
976
|
+
# The result of a voter info lookup query.
|
977
|
+
class VoterInfoResponse
|
978
|
+
include Google::Apis::Core::Hashable
|
979
|
+
|
980
|
+
# Contests that will appear on the voter's ballot.
|
981
|
+
# Corresponds to the JSON property `contests`
|
982
|
+
# @return [Array<Google::Apis::CivicinfoV2::Contest>]
|
983
|
+
attr_accessor :contests
|
984
|
+
|
985
|
+
# Locations where a voter is eligible to drop off a completed ballot. The voter
|
986
|
+
# must have received and completed a ballot prior to arriving at the location.
|
987
|
+
# The location may not have ballots available on the premises. These locations
|
988
|
+
# could be open on or before election day as indicated in the pollingHours field.
|
989
|
+
# Corresponds to the JSON property `dropOffLocations`
|
990
|
+
# @return [Array<Google::Apis::CivicinfoV2::PollingLocation>]
|
991
|
+
attr_accessor :drop_off_locations
|
992
|
+
|
993
|
+
# Locations where the voter is eligible to vote early, prior to election day.
|
994
|
+
# Corresponds to the JSON property `earlyVoteSites`
|
995
|
+
# @return [Array<Google::Apis::CivicinfoV2::PollingLocation>]
|
996
|
+
attr_accessor :early_vote_sites
|
997
|
+
|
998
|
+
# Information about the election that was queried.
|
999
|
+
# Corresponds to the JSON property `election`
|
1000
|
+
# @return [Google::Apis::CivicinfoV2::Election]
|
1001
|
+
attr_accessor :election
|
1002
|
+
|
1003
|
+
# Identifies what kind of resource this is. Value: the fixed string "civicinfo#
|
1004
|
+
# voterInfoResponse".
|
1005
|
+
# Corresponds to the JSON property `kind`
|
1006
|
+
# @return [String]
|
1007
|
+
attr_accessor :kind
|
1008
|
+
|
1009
|
+
# A simple representation of an address.
|
1010
|
+
# Corresponds to the JSON property `normalizedInput`
|
1011
|
+
# @return [Google::Apis::CivicinfoV2::SimpleAddressType]
|
1012
|
+
attr_accessor :normalized_input
|
1013
|
+
|
1014
|
+
# If no election ID was specified in the query, and there was more than one
|
1015
|
+
# election with data for the given voter, this will contain information about
|
1016
|
+
# the other elections that could apply.
|
1017
|
+
# Corresponds to the JSON property `otherElections`
|
1018
|
+
# @return [Array<Google::Apis::CivicinfoV2::Election>]
|
1019
|
+
attr_accessor :other_elections
|
1020
|
+
|
1021
|
+
# Locations where the voter is eligible to vote on election day.
|
1022
|
+
# Corresponds to the JSON property `pollingLocations`
|
1023
|
+
# @return [Array<Google::Apis::CivicinfoV2::PollingLocation>]
|
1024
|
+
attr_accessor :polling_locations
|
1025
|
+
|
1026
|
+
#
|
1027
|
+
# Corresponds to the JSON property `precinctId`
|
1028
|
+
# @return [String]
|
1029
|
+
attr_accessor :precinct_id
|
1030
|
+
|
1031
|
+
# Local Election Information for the state that the voter votes in. For the US,
|
1032
|
+
# there will only be one element in this array.
|
1033
|
+
# Corresponds to the JSON property `state`
|
1034
|
+
# @return [Array<Google::Apis::CivicinfoV2::AdministrationRegion>]
|
1035
|
+
attr_accessor :state
|
1036
|
+
|
1037
|
+
def initialize(**args)
|
1038
|
+
update!(**args)
|
1039
|
+
end
|
1040
|
+
|
1041
|
+
# Update properties of this object
|
1042
|
+
def update!(**args)
|
1043
|
+
@contests = args[:contests] unless args[:contests].nil?
|
1044
|
+
@drop_off_locations = args[:drop_off_locations] unless args[:drop_off_locations].nil?
|
1045
|
+
@early_vote_sites = args[:early_vote_sites] unless args[:early_vote_sites].nil?
|
1046
|
+
@election = args[:election] unless args[:election].nil?
|
1047
|
+
@kind = args[:kind] unless args[:kind].nil?
|
1048
|
+
@normalized_input = args[:normalized_input] unless args[:normalized_input].nil?
|
1049
|
+
@other_elections = args[:other_elections] unless args[:other_elections].nil?
|
1050
|
+
@polling_locations = args[:polling_locations] unless args[:polling_locations].nil?
|
1051
|
+
@precinct_id = args[:precinct_id] unless args[:precinct_id].nil?
|
1052
|
+
@state = args[:state] unless args[:state].nil?
|
1053
|
+
end
|
1054
|
+
end
|
1055
|
+
end
|
1056
|
+
end
|
1057
|
+
end
|