google-apis-civicinfo_v2 0.25.0 → 0.26.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 +5 -0
- data/OVERVIEW.md +1 -1
- data/lib/google/apis/civicinfo_v2/classes.rb +0 -200
- data/lib/google/apis/civicinfo_v2/gem_version.rb +3 -3
- data/lib/google/apis/civicinfo_v2/representations.rb +0 -80
- data/lib/google/apis/civicinfo_v2/service.rb +0 -91
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13aea2122df3ac7b49502bad2c2395f4e7c3ca7cc525248e74c1a588b22efb07
|
4
|
+
data.tar.gz: 5a669299e7a3b1be00262e689cf34300003c539f54358cb5ecbafb88d56ca318
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5de9ed6034571897ee745c1dba9215dcc466178b5ab9b960d865faadffb50d83970ea9ff96ded703c7cc7dbdcc90399e165cf44cf6fd33d385cb6cbb5fa56814
|
7
|
+
data.tar.gz: 6f220ea5813e7a2fa4d9cc4bfbf2ecf71ddbb6f60f26ed9fdea9deb1da0a7009970035d142f1f3152c11ef5d10e7419ae6adf51438c79ea684793fd4af28cdb0
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Release history for google-apis-civicinfo_v2
|
2
2
|
|
3
|
+
### v0.26.0 (2025-05-04)
|
4
|
+
|
5
|
+
* Regenerated from discovery document revision 20250430
|
6
|
+
* Regenerated using generator version 0.17.0
|
7
|
+
|
3
8
|
### v0.25.0 (2025-03-23)
|
4
9
|
|
5
10
|
* Regenerated from discovery document revision 20250320
|
data/OVERVIEW.md
CHANGED
@@ -83,7 +83,7 @@ The [product documentation](https://developers.google.com/civic-information/) ma
|
|
83
83
|
|
84
84
|
## Supported Ruby versions
|
85
85
|
|
86
|
-
This library is supported on Ruby
|
86
|
+
This library is supported on Ruby 3.1+.
|
87
87
|
|
88
88
|
Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.
|
89
89
|
|
@@ -134,87 +134,6 @@ module Google
|
|
134
134
|
end
|
135
135
|
end
|
136
136
|
|
137
|
-
#
|
138
|
-
class CivicinfoApiprotosV2RepresentativeInfoData
|
139
|
-
include Google::Apis::Core::Hashable
|
140
|
-
|
141
|
-
# A map of political geographic divisions that contain the requested address,
|
142
|
-
# keyed by the unique Open Civic Data identifier for this division.
|
143
|
-
# Corresponds to the JSON property `divisions`
|
144
|
-
# @return [Hash<String,Google::Apis::CivicinfoV2::CivicinfoSchemaV2GeographicDivision>]
|
145
|
-
attr_accessor :divisions
|
146
|
-
|
147
|
-
# Elected offices referenced by the divisions listed above. Will only be present
|
148
|
-
# if includeOffices was true in the request.
|
149
|
-
# Corresponds to the JSON property `offices`
|
150
|
-
# @return [Array<Google::Apis::CivicinfoV2::CivicinfoSchemaV2Office>]
|
151
|
-
attr_accessor :offices
|
152
|
-
|
153
|
-
# Officials holding the offices listed above. Will only be present if
|
154
|
-
# includeOffices was true in the request.
|
155
|
-
# Corresponds to the JSON property `officials`
|
156
|
-
# @return [Array<Google::Apis::CivicinfoV2::CivicinfoSchemaV2Official>]
|
157
|
-
attr_accessor :officials
|
158
|
-
|
159
|
-
def initialize(**args)
|
160
|
-
update!(**args)
|
161
|
-
end
|
162
|
-
|
163
|
-
# Update properties of this object
|
164
|
-
def update!(**args)
|
165
|
-
@divisions = args[:divisions] if args.key?(:divisions)
|
166
|
-
@offices = args[:offices] if args.key?(:offices)
|
167
|
-
@officials = args[:officials] if args.key?(:officials)
|
168
|
-
end
|
169
|
-
end
|
170
|
-
|
171
|
-
# The result of a representative info lookup query.
|
172
|
-
class CivicinfoApiprotosV2RepresentativeInfoResponse
|
173
|
-
include Google::Apis::Core::Hashable
|
174
|
-
|
175
|
-
# A map of political geographic divisions that contain the requested address,
|
176
|
-
# keyed by the unique Open Civic Data identifier for this division.
|
177
|
-
# Corresponds to the JSON property `divisions`
|
178
|
-
# @return [Hash<String,Google::Apis::CivicinfoV2::CivicinfoSchemaV2GeographicDivision>]
|
179
|
-
attr_accessor :divisions
|
180
|
-
|
181
|
-
# Identifies what kind of resource this is. Value: the fixed string "civicinfo#
|
182
|
-
# representativeInfoResponse".
|
183
|
-
# Corresponds to the JSON property `kind`
|
184
|
-
# @return [String]
|
185
|
-
attr_accessor :kind
|
186
|
-
|
187
|
-
# A simple representation of an address.
|
188
|
-
# Corresponds to the JSON property `normalizedInput`
|
189
|
-
# @return [Google::Apis::CivicinfoV2::CivicinfoSchemaV2SimpleAddressType]
|
190
|
-
attr_accessor :normalized_input
|
191
|
-
|
192
|
-
# Elected offices referenced by the divisions listed above. Will only be present
|
193
|
-
# if includeOffices was true in the request.
|
194
|
-
# Corresponds to the JSON property `offices`
|
195
|
-
# @return [Array<Google::Apis::CivicinfoV2::CivicinfoSchemaV2Office>]
|
196
|
-
attr_accessor :offices
|
197
|
-
|
198
|
-
# Officials holding the offices listed above. Will only be present if
|
199
|
-
# includeOffices was true in the request.
|
200
|
-
# Corresponds to the JSON property `officials`
|
201
|
-
# @return [Array<Google::Apis::CivicinfoV2::CivicinfoSchemaV2Official>]
|
202
|
-
attr_accessor :officials
|
203
|
-
|
204
|
-
def initialize(**args)
|
205
|
-
update!(**args)
|
206
|
-
end
|
207
|
-
|
208
|
-
# Update properties of this object
|
209
|
-
def update!(**args)
|
210
|
-
@divisions = args[:divisions] if args.key?(:divisions)
|
211
|
-
@kind = args[:kind] if args.key?(:kind)
|
212
|
-
@normalized_input = args[:normalized_input] if args.key?(:normalized_input)
|
213
|
-
@offices = args[:offices] if args.key?(:offices)
|
214
|
-
@officials = args[:officials] if args.key?(:officials)
|
215
|
-
end
|
216
|
-
end
|
217
|
-
|
218
137
|
# The result of a voter info lookup query.
|
219
138
|
class CivicinfoApiprotosV2VoterInfoResponse
|
220
139
|
include Google::Apis::Core::Hashable
|
@@ -900,125 +819,6 @@ module Google
|
|
900
819
|
end
|
901
820
|
end
|
902
821
|
|
903
|
-
# Information about an Office held by one or more Officials.
|
904
|
-
class CivicinfoSchemaV2Office
|
905
|
-
include Google::Apis::Core::Hashable
|
906
|
-
|
907
|
-
# The OCD ID of the division with which this office is associated.
|
908
|
-
# Corresponds to the JSON property `divisionId`
|
909
|
-
# @return [String]
|
910
|
-
attr_accessor :division_id
|
911
|
-
|
912
|
-
# The levels of government of which this office is part. There may be more than
|
913
|
-
# one in cases where a jurisdiction effectively acts at two different levels of
|
914
|
-
# government; for example, the mayor of the District of Columbia acts at "
|
915
|
-
# locality" level, but also effectively at both "administrative-area-2" and "
|
916
|
-
# administrative-area-1".
|
917
|
-
# Corresponds to the JSON property `levels`
|
918
|
-
# @return [Array<String>]
|
919
|
-
attr_accessor :levels
|
920
|
-
|
921
|
-
# The human-readable name of the office.
|
922
|
-
# Corresponds to the JSON property `name`
|
923
|
-
# @return [String]
|
924
|
-
attr_accessor :name
|
925
|
-
|
926
|
-
# List of indices in the officials array of people who presently hold this
|
927
|
-
# office.
|
928
|
-
# Corresponds to the JSON property `officialIndices`
|
929
|
-
# @return [Array<Fixnum>]
|
930
|
-
attr_accessor :official_indices
|
931
|
-
|
932
|
-
# The roles which this office fulfills. Roles are not meant to be exhaustive, or
|
933
|
-
# to exactly specify the entire set of responsibilities of a given office, but
|
934
|
-
# are meant to be rough categories that are useful for general selection from or
|
935
|
-
# sorting of a list of offices.
|
936
|
-
# Corresponds to the JSON property `roles`
|
937
|
-
# @return [Array<String>]
|
938
|
-
attr_accessor :roles
|
939
|
-
|
940
|
-
# A list of sources for this office. If multiple sources are listed, the data
|
941
|
-
# has been aggregated from those sources.
|
942
|
-
# Corresponds to the JSON property `sources`
|
943
|
-
# @return [Array<Google::Apis::CivicinfoV2::CivicinfoSchemaV2Source>]
|
944
|
-
attr_accessor :sources
|
945
|
-
|
946
|
-
def initialize(**args)
|
947
|
-
update!(**args)
|
948
|
-
end
|
949
|
-
|
950
|
-
# Update properties of this object
|
951
|
-
def update!(**args)
|
952
|
-
@division_id = args[:division_id] if args.key?(:division_id)
|
953
|
-
@levels = args[:levels] if args.key?(:levels)
|
954
|
-
@name = args[:name] if args.key?(:name)
|
955
|
-
@official_indices = args[:official_indices] if args.key?(:official_indices)
|
956
|
-
@roles = args[:roles] if args.key?(:roles)
|
957
|
-
@sources = args[:sources] if args.key?(:sources)
|
958
|
-
end
|
959
|
-
end
|
960
|
-
|
961
|
-
# Information about a person holding an elected office.
|
962
|
-
class CivicinfoSchemaV2Official
|
963
|
-
include Google::Apis::Core::Hashable
|
964
|
-
|
965
|
-
# Addresses at which to contact the official.
|
966
|
-
# Corresponds to the JSON property `address`
|
967
|
-
# @return [Array<Google::Apis::CivicinfoV2::CivicinfoSchemaV2SimpleAddressType>]
|
968
|
-
attr_accessor :address
|
969
|
-
|
970
|
-
# A list of known (social) media channels for this official.
|
971
|
-
# Corresponds to the JSON property `channels`
|
972
|
-
# @return [Array<Google::Apis::CivicinfoV2::CivicinfoSchemaV2Channel>]
|
973
|
-
attr_accessor :channels
|
974
|
-
|
975
|
-
# The direct email addresses for the official.
|
976
|
-
# Corresponds to the JSON property `emails`
|
977
|
-
# @return [Array<String>]
|
978
|
-
attr_accessor :emails
|
979
|
-
|
980
|
-
# The official's name.
|
981
|
-
# Corresponds to the JSON property `name`
|
982
|
-
# @return [String]
|
983
|
-
attr_accessor :name
|
984
|
-
|
985
|
-
# The full name of the party the official belongs to.
|
986
|
-
# Corresponds to the JSON property `party`
|
987
|
-
# @return [String]
|
988
|
-
attr_accessor :party
|
989
|
-
|
990
|
-
# The official's public contact phone numbers.
|
991
|
-
# Corresponds to the JSON property `phones`
|
992
|
-
# @return [Array<String>]
|
993
|
-
attr_accessor :phones
|
994
|
-
|
995
|
-
# A URL for a photo of the official.
|
996
|
-
# Corresponds to the JSON property `photoUrl`
|
997
|
-
# @return [String]
|
998
|
-
attr_accessor :photo_url
|
999
|
-
|
1000
|
-
# The official's public website URLs.
|
1001
|
-
# Corresponds to the JSON property `urls`
|
1002
|
-
# @return [Array<String>]
|
1003
|
-
attr_accessor :urls
|
1004
|
-
|
1005
|
-
def initialize(**args)
|
1006
|
-
update!(**args)
|
1007
|
-
end
|
1008
|
-
|
1009
|
-
# Update properties of this object
|
1010
|
-
def update!(**args)
|
1011
|
-
@address = args[:address] if args.key?(:address)
|
1012
|
-
@channels = args[:channels] if args.key?(:channels)
|
1013
|
-
@emails = args[:emails] if args.key?(:emails)
|
1014
|
-
@name = args[:name] if args.key?(:name)
|
1015
|
-
@party = args[:party] if args.key?(:party)
|
1016
|
-
@phones = args[:phones] if args.key?(:phones)
|
1017
|
-
@photo_url = args[:photo_url] if args.key?(:photo_url)
|
1018
|
-
@urls = args[:urls] if args.key?(:urls)
|
1019
|
-
end
|
1020
|
-
end
|
1021
|
-
|
1022
822
|
# A location where a voter can vote. This may be an early vote site, an election
|
1023
823
|
# day voting location, or a drop off location for a completed ballot.
|
1024
824
|
class CivicinfoSchemaV2PollingLocation
|
@@ -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.26.0"
|
20
20
|
|
21
21
|
# Version of the code generator used to generate this client
|
22
|
-
GENERATOR_VERSION = "0.
|
22
|
+
GENERATOR_VERSION = "0.17.0"
|
23
23
|
|
24
24
|
# Revision of the discovery document this client was generated from
|
25
|
-
REVISION = "
|
25
|
+
REVISION = "20250430"
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -46,18 +46,6 @@ module Google
|
|
46
46
|
include Google::Apis::Core::JsonObjectSupport
|
47
47
|
end
|
48
48
|
|
49
|
-
class CivicinfoApiprotosV2RepresentativeInfoData
|
50
|
-
class Representation < Google::Apis::Core::JsonRepresentation; end
|
51
|
-
|
52
|
-
include Google::Apis::Core::JsonObjectSupport
|
53
|
-
end
|
54
|
-
|
55
|
-
class CivicinfoApiprotosV2RepresentativeInfoResponse
|
56
|
-
class Representation < Google::Apis::Core::JsonRepresentation; end
|
57
|
-
|
58
|
-
include Google::Apis::Core::JsonObjectSupport
|
59
|
-
end
|
60
|
-
|
61
49
|
class CivicinfoApiprotosV2VoterInfoResponse
|
62
50
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
63
51
|
|
@@ -118,18 +106,6 @@ module Google
|
|
118
106
|
include Google::Apis::Core::JsonObjectSupport
|
119
107
|
end
|
120
108
|
|
121
|
-
class CivicinfoSchemaV2Office
|
122
|
-
class Representation < Google::Apis::Core::JsonRepresentation; end
|
123
|
-
|
124
|
-
include Google::Apis::Core::JsonObjectSupport
|
125
|
-
end
|
126
|
-
|
127
|
-
class CivicinfoSchemaV2Official
|
128
|
-
class Representation < Google::Apis::Core::JsonRepresentation; end
|
129
|
-
|
130
|
-
include Google::Apis::Core::JsonObjectSupport
|
131
|
-
end
|
132
|
-
|
133
109
|
class CivicinfoSchemaV2PollingLocation
|
134
110
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
135
111
|
|
@@ -191,33 +167,6 @@ module Google
|
|
191
167
|
end
|
192
168
|
end
|
193
169
|
|
194
|
-
class CivicinfoApiprotosV2RepresentativeInfoData
|
195
|
-
# @private
|
196
|
-
class Representation < Google::Apis::Core::JsonRepresentation
|
197
|
-
hash :divisions, as: 'divisions', class: Google::Apis::CivicinfoV2::CivicinfoSchemaV2GeographicDivision, decorator: Google::Apis::CivicinfoV2::CivicinfoSchemaV2GeographicDivision::Representation
|
198
|
-
|
199
|
-
collection :offices, as: 'offices', class: Google::Apis::CivicinfoV2::CivicinfoSchemaV2Office, decorator: Google::Apis::CivicinfoV2::CivicinfoSchemaV2Office::Representation
|
200
|
-
|
201
|
-
collection :officials, as: 'officials', class: Google::Apis::CivicinfoV2::CivicinfoSchemaV2Official, decorator: Google::Apis::CivicinfoV2::CivicinfoSchemaV2Official::Representation
|
202
|
-
|
203
|
-
end
|
204
|
-
end
|
205
|
-
|
206
|
-
class CivicinfoApiprotosV2RepresentativeInfoResponse
|
207
|
-
# @private
|
208
|
-
class Representation < Google::Apis::Core::JsonRepresentation
|
209
|
-
hash :divisions, as: 'divisions', class: Google::Apis::CivicinfoV2::CivicinfoSchemaV2GeographicDivision, decorator: Google::Apis::CivicinfoV2::CivicinfoSchemaV2GeographicDivision::Representation
|
210
|
-
|
211
|
-
property :kind, as: 'kind'
|
212
|
-
property :normalized_input, as: 'normalizedInput', class: Google::Apis::CivicinfoV2::CivicinfoSchemaV2SimpleAddressType, decorator: Google::Apis::CivicinfoV2::CivicinfoSchemaV2SimpleAddressType::Representation
|
213
|
-
|
214
|
-
collection :offices, as: 'offices', class: Google::Apis::CivicinfoV2::CivicinfoSchemaV2Office, decorator: Google::Apis::CivicinfoV2::CivicinfoSchemaV2Office::Representation
|
215
|
-
|
216
|
-
collection :officials, as: 'officials', class: Google::Apis::CivicinfoV2::CivicinfoSchemaV2Official, decorator: Google::Apis::CivicinfoV2::CivicinfoSchemaV2Official::Representation
|
217
|
-
|
218
|
-
end
|
219
|
-
end
|
220
|
-
|
221
170
|
class CivicinfoApiprotosV2VoterInfoResponse
|
222
171
|
# @private
|
223
172
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -378,35 +327,6 @@ module Google
|
|
378
327
|
end
|
379
328
|
end
|
380
329
|
|
381
|
-
class CivicinfoSchemaV2Office
|
382
|
-
# @private
|
383
|
-
class Representation < Google::Apis::Core::JsonRepresentation
|
384
|
-
property :division_id, as: 'divisionId'
|
385
|
-
collection :levels, as: 'levels'
|
386
|
-
property :name, as: 'name'
|
387
|
-
collection :official_indices, as: 'officialIndices'
|
388
|
-
collection :roles, as: 'roles'
|
389
|
-
collection :sources, as: 'sources', class: Google::Apis::CivicinfoV2::CivicinfoSchemaV2Source, decorator: Google::Apis::CivicinfoV2::CivicinfoSchemaV2Source::Representation
|
390
|
-
|
391
|
-
end
|
392
|
-
end
|
393
|
-
|
394
|
-
class CivicinfoSchemaV2Official
|
395
|
-
# @private
|
396
|
-
class Representation < Google::Apis::Core::JsonRepresentation
|
397
|
-
collection :address, as: 'address', class: Google::Apis::CivicinfoV2::CivicinfoSchemaV2SimpleAddressType, decorator: Google::Apis::CivicinfoV2::CivicinfoSchemaV2SimpleAddressType::Representation
|
398
|
-
|
399
|
-
collection :channels, as: 'channels', class: Google::Apis::CivicinfoV2::CivicinfoSchemaV2Channel, decorator: Google::Apis::CivicinfoV2::CivicinfoSchemaV2Channel::Representation
|
400
|
-
|
401
|
-
collection :emails, as: 'emails'
|
402
|
-
property :name, as: 'name'
|
403
|
-
property :party, as: 'party'
|
404
|
-
collection :phones, as: 'phones'
|
405
|
-
property :photo_url, as: 'photoUrl'
|
406
|
-
collection :urls, as: 'urls'
|
407
|
-
end
|
408
|
-
end
|
409
|
-
|
410
330
|
class CivicinfoSchemaV2PollingLocation
|
411
331
|
# @private
|
412
332
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -194,97 +194,6 @@ module Google
|
|
194
194
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
195
195
|
execute_or_queue_command(command, &block)
|
196
196
|
end
|
197
|
-
|
198
|
-
# Looks up political geography and representative information for a single
|
199
|
-
# address.
|
200
|
-
# @param [String] address
|
201
|
-
# The address to look up. May only be specified if the field ocdId is not given
|
202
|
-
# in the URL
|
203
|
-
# @param [Boolean] include_offices
|
204
|
-
# Whether to return information about offices and officials. If false, only the
|
205
|
-
# top-level district information will be returned.
|
206
|
-
# @param [Array<String>, String] levels
|
207
|
-
# A list of office levels to filter by. Only offices that serve at least one of
|
208
|
-
# these levels will be returned. Divisions that don't contain a matching office
|
209
|
-
# will not be returned.
|
210
|
-
# @param [Array<String>, String] roles
|
211
|
-
# A list of office roles to filter by. Only offices fulfilling one of these
|
212
|
-
# roles will be returned. Divisions that don't contain a matching office will
|
213
|
-
# not be returned.
|
214
|
-
# @param [String] fields
|
215
|
-
# Selector specifying which fields to include in a partial response.
|
216
|
-
# @param [String] quota_user
|
217
|
-
# Available to use for quota purposes for server-side applications. Can be any
|
218
|
-
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
219
|
-
# @param [Google::Apis::RequestOptions] options
|
220
|
-
# Request-specific options
|
221
|
-
#
|
222
|
-
# @yield [result, err] Result & error if block supplied
|
223
|
-
# @yieldparam result [Google::Apis::CivicinfoV2::CivicinfoApiprotosV2RepresentativeInfoResponse] parsed result object
|
224
|
-
# @yieldparam err [StandardError] error object if request failed
|
225
|
-
#
|
226
|
-
# @return [Google::Apis::CivicinfoV2::CivicinfoApiprotosV2RepresentativeInfoResponse]
|
227
|
-
#
|
228
|
-
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
229
|
-
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
230
|
-
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
231
|
-
def representative_info_by_address(address: nil, include_offices: nil, levels: nil, roles: nil, fields: nil, quota_user: nil, options: nil, &block)
|
232
|
-
command = make_simple_command(:get, 'civicinfo/v2/representatives', options)
|
233
|
-
command.response_representation = Google::Apis::CivicinfoV2::CivicinfoApiprotosV2RepresentativeInfoResponse::Representation
|
234
|
-
command.response_class = Google::Apis::CivicinfoV2::CivicinfoApiprotosV2RepresentativeInfoResponse
|
235
|
-
command.query['address'] = address unless address.nil?
|
236
|
-
command.query['includeOffices'] = include_offices unless include_offices.nil?
|
237
|
-
command.query['levels'] = levels unless levels.nil?
|
238
|
-
command.query['roles'] = roles unless roles.nil?
|
239
|
-
command.query['fields'] = fields unless fields.nil?
|
240
|
-
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
241
|
-
execute_or_queue_command(command, &block)
|
242
|
-
end
|
243
|
-
|
244
|
-
# Looks up representative information for a single geographic division.
|
245
|
-
# @param [String] ocd_id
|
246
|
-
# The Open Civic Data division identifier of the division to look up.
|
247
|
-
# @param [Array<String>, String] levels
|
248
|
-
# A list of office levels to filter by. Only offices that serve at least one of
|
249
|
-
# these levels will be returned. Divisions that don't contain a matching office
|
250
|
-
# will not be returned.
|
251
|
-
# @param [Boolean] recursive
|
252
|
-
# If true, information about all divisions contained in the division requested
|
253
|
-
# will be included as well. For example, if querying ocd-division/country:us/
|
254
|
-
# district:dc, this would also return all DC's wards and ANCs.
|
255
|
-
# @param [Array<String>, String] roles
|
256
|
-
# A list of office roles to filter by. Only offices fulfilling one of these
|
257
|
-
# roles will be returned. Divisions that don't contain a matching office will
|
258
|
-
# not be returned.
|
259
|
-
# @param [String] fields
|
260
|
-
# Selector specifying which fields to include in a partial response.
|
261
|
-
# @param [String] quota_user
|
262
|
-
# Available to use for quota purposes for server-side applications. Can be any
|
263
|
-
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
264
|
-
# @param [Google::Apis::RequestOptions] options
|
265
|
-
# Request-specific options
|
266
|
-
#
|
267
|
-
# @yield [result, err] Result & error if block supplied
|
268
|
-
# @yieldparam result [Google::Apis::CivicinfoV2::CivicinfoApiprotosV2RepresentativeInfoData] parsed result object
|
269
|
-
# @yieldparam err [StandardError] error object if request failed
|
270
|
-
#
|
271
|
-
# @return [Google::Apis::CivicinfoV2::CivicinfoApiprotosV2RepresentativeInfoData]
|
272
|
-
#
|
273
|
-
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
274
|
-
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
275
|
-
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
276
|
-
def representative_info_by_division(ocd_id, levels: nil, recursive: nil, roles: nil, fields: nil, quota_user: nil, options: nil, &block)
|
277
|
-
command = make_simple_command(:get, 'civicinfo/v2/representatives/{ocdId}', options)
|
278
|
-
command.response_representation = Google::Apis::CivicinfoV2::CivicinfoApiprotosV2RepresentativeInfoData::Representation
|
279
|
-
command.response_class = Google::Apis::CivicinfoV2::CivicinfoApiprotosV2RepresentativeInfoData
|
280
|
-
command.params['ocdId'] = ocd_id unless ocd_id.nil?
|
281
|
-
command.query['levels'] = levels unless levels.nil?
|
282
|
-
command.query['recursive'] = recursive unless recursive.nil?
|
283
|
-
command.query['roles'] = roles unless roles.nil?
|
284
|
-
command.query['fields'] = fields unless fields.nil?
|
285
|
-
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
286
|
-
execute_or_queue_command(command, &block)
|
287
|
-
end
|
288
197
|
|
289
198
|
protected
|
290
199
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
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.26.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: google-apis-core
|
@@ -57,7 +57,7 @@ licenses:
|
|
57
57
|
metadata:
|
58
58
|
bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
|
59
59
|
changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-civicinfo_v2/CHANGELOG.md
|
60
|
-
documentation_uri: https://googleapis.dev/ruby/google-apis-civicinfo_v2/v0.
|
60
|
+
documentation_uri: https://googleapis.dev/ruby/google-apis-civicinfo_v2/v0.26.0
|
61
61
|
source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-civicinfo_v2
|
62
62
|
rdoc_options: []
|
63
63
|
require_paths:
|
@@ -66,14 +66,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
66
66
|
requirements:
|
67
67
|
- - ">="
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: '
|
69
|
+
version: '3.1'
|
70
70
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
72
|
- - ">="
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '0'
|
75
75
|
requirements: []
|
76
|
-
rubygems_version: 3.6.
|
76
|
+
rubygems_version: 3.6.8
|
77
77
|
specification_version: 4
|
78
78
|
summary: Simple REST client for Google Civic Information API V2
|
79
79
|
test_files: []
|