google-apis-civicinfo_v2 0.7.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/OVERVIEW.md +1 -1
- data/lib/google/apis/civicinfo_v2/classes.rb +115 -0
- data/lib/google/apis/civicinfo_v2/gem_version.rb +3 -3
- data/lib/google/apis/civicinfo_v2/representations.rb +29 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6cf2ba1952d553c4c409578782d2b16e4dc52a363a4962f3bc0f59a41412192c
|
4
|
+
data.tar.gz: 580d30aff0c670ce773600f3a6cd1753e79ce2f3a08717eb67e01e7792e4b015
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 502d83623535d01136053e0dc30fdd3a3c2d2ee20faa09b1376bed318f2d4b71515f3ccaa78150fe6d00fa0efddae49caa04575139db57959607ef25e6d2f915
|
7
|
+
data.tar.gz: 05b20486aefd7c8f05c4c18c8d341033ae55e675f3c909ca1e50116d3cecacde99c695279f53a79633472f637b90205450af05dd8c352ac9d83e96e316b1eff3
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# Release history for google-apis-civicinfo_v2
|
2
2
|
|
3
|
+
### v0.10.0 (2022-05-17)
|
4
|
+
|
5
|
+
* Regenerated from discovery document revision 20220516
|
6
|
+
|
7
|
+
### v0.9.0 (2022-04-13)
|
8
|
+
|
9
|
+
* Regenerated from discovery document revision 20220412
|
10
|
+
* Regenerated using generator version 0.4.1
|
11
|
+
|
12
|
+
### v0.8.0 (2021-12-14)
|
13
|
+
|
14
|
+
* Unspecified changes
|
15
|
+
|
3
16
|
### v0.7.0 (2021-12-10)
|
4
17
|
|
5
18
|
* Regenerated from discovery document revision 20211209
|
data/OVERVIEW.md
CHANGED
@@ -51,7 +51,7 @@ require "google/apis/civicinfo_v2"
|
|
51
51
|
client = Google::Apis::CivicinfoV2::CivicInfoService.new
|
52
52
|
|
53
53
|
# Authenticate calls
|
54
|
-
client.
|
54
|
+
client.authorization = # ... use the googleauth gem to create credentials
|
55
55
|
```
|
56
56
|
|
57
57
|
See the class reference docs for information on the methods you can call from a client.
|
@@ -537,6 +537,11 @@ module Google
|
|
537
537
|
# @return [String]
|
538
538
|
attr_accessor :ocd_division_id
|
539
539
|
|
540
|
+
#
|
541
|
+
# Corresponds to the JSON property `shapeLookupBehavior`
|
542
|
+
# @return [String]
|
543
|
+
attr_accessor :shape_lookup_behavior
|
544
|
+
|
540
545
|
def initialize(**args)
|
541
546
|
update!(**args)
|
542
547
|
end
|
@@ -547,6 +552,7 @@ module Google
|
|
547
552
|
@id = args[:id] if args.key?(:id)
|
548
553
|
@name = args[:name] if args.key?(:name)
|
549
554
|
@ocd_division_id = args[:ocd_division_id] if args.key?(:ocd_division_id)
|
555
|
+
@shape_lookup_behavior = args[:shape_lookup_behavior] if args.key?(:shape_lookup_behavior)
|
550
556
|
end
|
551
557
|
end
|
552
558
|
|
@@ -1035,6 +1041,108 @@ module Google
|
|
1035
1041
|
end
|
1036
1042
|
end
|
1037
1043
|
|
1044
|
+
#
|
1045
|
+
class Precinct
|
1046
|
+
include Google::Apis::Core::Hashable
|
1047
|
+
|
1048
|
+
# ID of the AdministrationRegion message for this precinct. Corresponds to
|
1049
|
+
# LocalityId xml tag.
|
1050
|
+
# Corresponds to the JSON property `administrationRegionId`
|
1051
|
+
# @return [String]
|
1052
|
+
attr_accessor :administration_region_id
|
1053
|
+
|
1054
|
+
# ID(s) of the Contest message(s) for this precinct.
|
1055
|
+
# Corresponds to the JSON property `contestId`
|
1056
|
+
# @return [Array<String>]
|
1057
|
+
attr_accessor :contest_id
|
1058
|
+
|
1059
|
+
# Required. Dataset ID. What datasets our Precincts come from.
|
1060
|
+
# Corresponds to the JSON property `datasetId`
|
1061
|
+
# @return [Fixnum]
|
1062
|
+
attr_accessor :dataset_id
|
1063
|
+
|
1064
|
+
# ID(s) of the PollingLocation message(s) for this precinct.
|
1065
|
+
# Corresponds to the JSON property `earlyVoteSiteId`
|
1066
|
+
# @return [Array<String>]
|
1067
|
+
attr_accessor :early_vote_site_id
|
1068
|
+
|
1069
|
+
# ID(s) of the ElectoralDistrict message(s) for this precinct.
|
1070
|
+
# Corresponds to the JSON property `electoralDistrictId`
|
1071
|
+
# @return [Array<String>]
|
1072
|
+
attr_accessor :electoral_district_id
|
1073
|
+
|
1074
|
+
# Required. A unique identifier for this precinct.
|
1075
|
+
# Corresponds to the JSON property `id`
|
1076
|
+
# @return [String]
|
1077
|
+
attr_accessor :id
|
1078
|
+
|
1079
|
+
# Specifies if the precinct runs mail-only elections.
|
1080
|
+
# Corresponds to the JSON property `mailOnly`
|
1081
|
+
# @return [Boolean]
|
1082
|
+
attr_accessor :mail_only
|
1083
|
+
alias_method :mail_only?, :mail_only
|
1084
|
+
|
1085
|
+
# Required. The name of the precinct.
|
1086
|
+
# Corresponds to the JSON property `name`
|
1087
|
+
# @return [String]
|
1088
|
+
attr_accessor :name
|
1089
|
+
|
1090
|
+
# The number of the precinct.
|
1091
|
+
# Corresponds to the JSON property `number`
|
1092
|
+
# @return [String]
|
1093
|
+
attr_accessor :number
|
1094
|
+
|
1095
|
+
# Encouraged. The OCD ID of the precinct
|
1096
|
+
# Corresponds to the JSON property `ocdId`
|
1097
|
+
# @return [Array<String>]
|
1098
|
+
attr_accessor :ocd_id
|
1099
|
+
|
1100
|
+
# ID(s) of the PollingLocation message(s) for this precinct.
|
1101
|
+
# Corresponds to the JSON property `pollingLocationId`
|
1102
|
+
# @return [Array<String>]
|
1103
|
+
attr_accessor :polling_location_id
|
1104
|
+
|
1105
|
+
# ID(s) of the SpatialBoundary message(s) for this precinct. Used to specify a
|
1106
|
+
# geometrical boundary of the precinct.
|
1107
|
+
# Corresponds to the JSON property `spatialBoundaryId`
|
1108
|
+
# @return [Array<String>]
|
1109
|
+
attr_accessor :spatial_boundary_id
|
1110
|
+
|
1111
|
+
# If present, this proto corresponds to one portion of split precinct. Other
|
1112
|
+
# portions of this precinct are guaranteed to have the same `name`. If not
|
1113
|
+
# present, this proto represents a full precicnt.
|
1114
|
+
# Corresponds to the JSON property `splitName`
|
1115
|
+
# @return [String]
|
1116
|
+
attr_accessor :split_name
|
1117
|
+
|
1118
|
+
# Specifies the ward the precinct is contained within.
|
1119
|
+
# Corresponds to the JSON property `ward`
|
1120
|
+
# @return [String]
|
1121
|
+
attr_accessor :ward
|
1122
|
+
|
1123
|
+
def initialize(**args)
|
1124
|
+
update!(**args)
|
1125
|
+
end
|
1126
|
+
|
1127
|
+
# Update properties of this object
|
1128
|
+
def update!(**args)
|
1129
|
+
@administration_region_id = args[:administration_region_id] if args.key?(:administration_region_id)
|
1130
|
+
@contest_id = args[:contest_id] if args.key?(:contest_id)
|
1131
|
+
@dataset_id = args[:dataset_id] if args.key?(:dataset_id)
|
1132
|
+
@early_vote_site_id = args[:early_vote_site_id] if args.key?(:early_vote_site_id)
|
1133
|
+
@electoral_district_id = args[:electoral_district_id] if args.key?(:electoral_district_id)
|
1134
|
+
@id = args[:id] if args.key?(:id)
|
1135
|
+
@mail_only = args[:mail_only] if args.key?(:mail_only)
|
1136
|
+
@name = args[:name] if args.key?(:name)
|
1137
|
+
@number = args[:number] if args.key?(:number)
|
1138
|
+
@ocd_id = args[:ocd_id] if args.key?(:ocd_id)
|
1139
|
+
@polling_location_id = args[:polling_location_id] if args.key?(:polling_location_id)
|
1140
|
+
@spatial_boundary_id = args[:spatial_boundary_id] if args.key?(:spatial_boundary_id)
|
1141
|
+
@split_name = args[:split_name] if args.key?(:split_name)
|
1142
|
+
@ward = args[:ward] if args.key?(:ward)
|
1143
|
+
end
|
1144
|
+
end
|
1145
|
+
|
1038
1146
|
#
|
1039
1147
|
class RepresentativeInfoData
|
1040
1148
|
include Google::Apis::Core::Hashable
|
@@ -1266,6 +1374,12 @@ module Google
|
|
1266
1374
|
# @return [String]
|
1267
1375
|
attr_accessor :precinct_id
|
1268
1376
|
|
1377
|
+
# The precincts that match this voter's address. Will only be returned for
|
1378
|
+
# project IDs which have been whitelisted as "partner projects".
|
1379
|
+
# Corresponds to the JSON property `precincts`
|
1380
|
+
# @return [Array<Google::Apis::CivicinfoV2::Precinct>]
|
1381
|
+
attr_accessor :precincts
|
1382
|
+
|
1269
1383
|
# Local Election Information for the state that the voter votes in. For the US,
|
1270
1384
|
# there will only be one element in this array.
|
1271
1385
|
# Corresponds to the JSON property `state`
|
@@ -1288,6 +1402,7 @@ module Google
|
|
1288
1402
|
@other_elections = args[:other_elections] if args.key?(:other_elections)
|
1289
1403
|
@polling_locations = args[:polling_locations] if args.key?(:polling_locations)
|
1290
1404
|
@precinct_id = args[:precinct_id] if args.key?(:precinct_id)
|
1405
|
+
@precincts = args[:precincts] if args.key?(:precincts)
|
1291
1406
|
@state = args[:state] if args.key?(:state)
|
1292
1407
|
end
|
1293
1408
|
end
|
@@ -16,13 +16,13 @@ module Google
|
|
16
16
|
module Apis
|
17
17
|
module CivicinfoV2
|
18
18
|
# Version of the google-apis-civicinfo_v2 gem
|
19
|
-
GEM_VERSION = "0.
|
19
|
+
GEM_VERSION = "0.10.0"
|
20
20
|
|
21
21
|
# Version of the code generator used to generate this client
|
22
|
-
GENERATOR_VERSION = "0.4.
|
22
|
+
GENERATOR_VERSION = "0.4.1"
|
23
23
|
|
24
24
|
# Revision of the discovery document this client was generated from
|
25
|
-
REVISION = "
|
25
|
+
REVISION = "20220516"
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -130,6 +130,12 @@ module Google
|
|
130
130
|
include Google::Apis::Core::JsonObjectSupport
|
131
131
|
end
|
132
132
|
|
133
|
+
class Precinct
|
134
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
135
|
+
|
136
|
+
include Google::Apis::Core::JsonObjectSupport
|
137
|
+
end
|
138
|
+
|
133
139
|
class RepresentativeInfoData
|
134
140
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
135
141
|
|
@@ -279,6 +285,7 @@ module Google
|
|
279
285
|
property :id, :numeric_string => true, as: 'id'
|
280
286
|
property :name, as: 'name'
|
281
287
|
property :ocd_division_id, as: 'ocdDivisionId'
|
288
|
+
property :shape_lookup_behavior, as: 'shapeLookupBehavior'
|
282
289
|
end
|
283
290
|
end
|
284
291
|
|
@@ -397,6 +404,26 @@ module Google
|
|
397
404
|
end
|
398
405
|
end
|
399
406
|
|
407
|
+
class Precinct
|
408
|
+
# @private
|
409
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
410
|
+
property :administration_region_id, as: 'administrationRegionId'
|
411
|
+
collection :contest_id, as: 'contestId'
|
412
|
+
property :dataset_id, :numeric_string => true, as: 'datasetId'
|
413
|
+
collection :early_vote_site_id, as: 'earlyVoteSiteId'
|
414
|
+
collection :electoral_district_id, as: 'electoralDistrictId'
|
415
|
+
property :id, as: 'id'
|
416
|
+
property :mail_only, as: 'mailOnly'
|
417
|
+
property :name, as: 'name'
|
418
|
+
property :number, as: 'number'
|
419
|
+
collection :ocd_id, as: 'ocdId'
|
420
|
+
collection :polling_location_id, as: 'pollingLocationId'
|
421
|
+
collection :spatial_boundary_id, as: 'spatialBoundaryId'
|
422
|
+
property :split_name, as: 'splitName'
|
423
|
+
property :ward, as: 'ward'
|
424
|
+
end
|
425
|
+
end
|
426
|
+
|
400
427
|
class RepresentativeInfoData
|
401
428
|
# @private
|
402
429
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -465,6 +492,8 @@ module Google
|
|
465
492
|
collection :polling_locations, as: 'pollingLocations', class: Google::Apis::CivicinfoV2::PollingLocation, decorator: Google::Apis::CivicinfoV2::PollingLocation::Representation
|
466
493
|
|
467
494
|
property :precinct_id, as: 'precinctId'
|
495
|
+
collection :precincts, as: 'precincts', class: Google::Apis::CivicinfoV2::Precinct, decorator: Google::Apis::CivicinfoV2::Precinct::Representation
|
496
|
+
|
468
497
|
collection :state, as: 'state', class: Google::Apis::CivicinfoV2::AdministrationRegion, decorator: Google::Apis::CivicinfoV2::AdministrationRegion::Representation
|
469
498
|
|
470
499
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-apis-civicinfo_v2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-apis-core
|
@@ -58,7 +58,7 @@ licenses:
|
|
58
58
|
metadata:
|
59
59
|
bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
|
60
60
|
changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-civicinfo_v2/CHANGELOG.md
|
61
|
-
documentation_uri: https://googleapis.dev/ruby/google-apis-civicinfo_v2/v0.
|
61
|
+
documentation_uri: https://googleapis.dev/ruby/google-apis-civicinfo_v2/v0.10.0
|
62
62
|
source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-civicinfo_v2
|
63
63
|
post_install_message:
|
64
64
|
rdoc_options: []
|
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
75
75
|
- !ruby/object:Gem::Version
|
76
76
|
version: '0'
|
77
77
|
requirements: []
|
78
|
-
rubygems_version: 3.
|
78
|
+
rubygems_version: 3.3.5
|
79
79
|
signing_key:
|
80
80
|
specification_version: 4
|
81
81
|
summary: Simple REST client for Google Civic Information API V2
|