google-apis-civicinfo_v2 0.24.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 +10 -0
- data/OVERVIEW.md +1 -1
- data/lib/google/apis/civicinfo_v2/classes.rb +239 -439
- data/lib/google/apis/civicinfo_v2/gem_version.rb +3 -3
- data/lib/google/apis/civicinfo_v2/representations.rb +95 -175
- data/lib/google/apis/civicinfo_v2/service.rb +16 -107
- metadata +5 -8
@@ -63,18 +63,18 @@ module Google
|
|
63
63
|
# Request-specific options
|
64
64
|
#
|
65
65
|
# @yield [result, err] Result & error if block supplied
|
66
|
-
# @yieldparam result [Google::Apis::CivicinfoV2::
|
66
|
+
# @yieldparam result [Google::Apis::CivicinfoV2::CivicinfoApiprotosV2DivisionByAddressResponse] parsed result object
|
67
67
|
# @yieldparam err [StandardError] error object if request failed
|
68
68
|
#
|
69
|
-
# @return [Google::Apis::CivicinfoV2::
|
69
|
+
# @return [Google::Apis::CivicinfoV2::CivicinfoApiprotosV2DivisionByAddressResponse]
|
70
70
|
#
|
71
71
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
72
72
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
73
73
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
74
74
|
def query_division_division_by_address(address: nil, fields: nil, quota_user: nil, options: nil, &block)
|
75
75
|
command = make_simple_command(:get, 'civicinfo/v2/divisionsByAddress', options)
|
76
|
-
command.response_representation = Google::Apis::CivicinfoV2::
|
77
|
-
command.response_class = Google::Apis::CivicinfoV2::
|
76
|
+
command.response_representation = Google::Apis::CivicinfoV2::CivicinfoApiprotosV2DivisionByAddressResponse::Representation
|
77
|
+
command.response_class = Google::Apis::CivicinfoV2::CivicinfoApiprotosV2DivisionByAddressResponse
|
78
78
|
command.query['address'] = address unless address.nil?
|
79
79
|
command.query['fields'] = fields unless fields.nil?
|
80
80
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
@@ -96,18 +96,18 @@ module Google
|
|
96
96
|
# Request-specific options
|
97
97
|
#
|
98
98
|
# @yield [result, err] Result & error if block supplied
|
99
|
-
# @yieldparam result [Google::Apis::CivicinfoV2::
|
99
|
+
# @yieldparam result [Google::Apis::CivicinfoV2::CivicinfoApiprotosV2DivisionSearchResponse] parsed result object
|
100
100
|
# @yieldparam err [StandardError] error object if request failed
|
101
101
|
#
|
102
|
-
# @return [Google::Apis::CivicinfoV2::
|
102
|
+
# @return [Google::Apis::CivicinfoV2::CivicinfoApiprotosV2DivisionSearchResponse]
|
103
103
|
#
|
104
104
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
105
105
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
106
106
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
107
107
|
def search_divisions(query: nil, fields: nil, quota_user: nil, options: nil, &block)
|
108
108
|
command = make_simple_command(:get, 'civicinfo/v2/divisions', options)
|
109
|
-
command.response_representation = Google::Apis::CivicinfoV2::
|
110
|
-
command.response_class = Google::Apis::CivicinfoV2::
|
109
|
+
command.response_representation = Google::Apis::CivicinfoV2::CivicinfoApiprotosV2DivisionSearchResponse::Representation
|
110
|
+
command.response_class = Google::Apis::CivicinfoV2::CivicinfoApiprotosV2DivisionSearchResponse
|
111
111
|
command.query['query'] = query unless query.nil?
|
112
112
|
command.query['fields'] = fields unless fields.nil?
|
113
113
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
@@ -126,18 +126,18 @@ module Google
|
|
126
126
|
# Request-specific options
|
127
127
|
#
|
128
128
|
# @yield [result, err] Result & error if block supplied
|
129
|
-
# @yieldparam result [Google::Apis::CivicinfoV2::
|
129
|
+
# @yieldparam result [Google::Apis::CivicinfoV2::CivicinfoApiprotosV2ElectionsQueryResponse] parsed result object
|
130
130
|
# @yieldparam err [StandardError] error object if request failed
|
131
131
|
#
|
132
|
-
# @return [Google::Apis::CivicinfoV2::
|
132
|
+
# @return [Google::Apis::CivicinfoV2::CivicinfoApiprotosV2ElectionsQueryResponse]
|
133
133
|
#
|
134
134
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
135
135
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
136
136
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
137
137
|
def query_election(production_data_only: nil, fields: nil, quota_user: nil, options: nil, &block)
|
138
138
|
command = make_simple_command(:get, 'civicinfo/v2/elections', options)
|
139
|
-
command.response_representation = Google::Apis::CivicinfoV2::
|
140
|
-
command.response_class = Google::Apis::CivicinfoV2::
|
139
|
+
command.response_representation = Google::Apis::CivicinfoV2::CivicinfoApiprotosV2ElectionsQueryResponse::Representation
|
140
|
+
command.response_class = Google::Apis::CivicinfoV2::CivicinfoApiprotosV2ElectionsQueryResponse
|
141
141
|
command.query['productionDataOnly'] = production_data_only unless production_data_only.nil?
|
142
142
|
command.query['fields'] = fields unless fields.nil?
|
143
143
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
@@ -173,18 +173,18 @@ module Google
|
|
173
173
|
# Request-specific options
|
174
174
|
#
|
175
175
|
# @yield [result, err] Result & error if block supplied
|
176
|
-
# @yieldparam result [Google::Apis::CivicinfoV2::
|
176
|
+
# @yieldparam result [Google::Apis::CivicinfoV2::CivicinfoApiprotosV2VoterInfoResponse] parsed result object
|
177
177
|
# @yieldparam err [StandardError] error object if request failed
|
178
178
|
#
|
179
|
-
# @return [Google::Apis::CivicinfoV2::
|
179
|
+
# @return [Google::Apis::CivicinfoV2::CivicinfoApiprotosV2VoterInfoResponse]
|
180
180
|
#
|
181
181
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
182
182
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
183
183
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
184
184
|
def query_voter_info(address: nil, election_id: nil, official_only: nil, production_data_only: nil, return_all_available_data: nil, fields: nil, quota_user: nil, options: nil, &block)
|
185
185
|
command = make_simple_command(:get, 'civicinfo/v2/voterinfo', options)
|
186
|
-
command.response_representation = Google::Apis::CivicinfoV2::
|
187
|
-
command.response_class = Google::Apis::CivicinfoV2::
|
186
|
+
command.response_representation = Google::Apis::CivicinfoV2::CivicinfoApiprotosV2VoterInfoResponse::Representation
|
187
|
+
command.response_class = Google::Apis::CivicinfoV2::CivicinfoApiprotosV2VoterInfoResponse
|
188
188
|
command.query['address'] = address unless address.nil?
|
189
189
|
command.query['electionId'] = election_id unless election_id.nil?
|
190
190
|
command.query['officialOnly'] = official_only unless official_only.nil?
|
@@ -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::RepresentativeInfoResponse] parsed result object
|
224
|
-
# @yieldparam err [StandardError] error object if request failed
|
225
|
-
#
|
226
|
-
# @return [Google::Apis::CivicinfoV2::RepresentativeInfoResponse]
|
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::RepresentativeInfoResponse::Representation
|
234
|
-
command.response_class = Google::Apis::CivicinfoV2::RepresentativeInfoResponse
|
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::RepresentativeInfoData] parsed result object
|
269
|
-
# @yieldparam err [StandardError] error object if request failed
|
270
|
-
#
|
271
|
-
# @return [Google::Apis::CivicinfoV2::RepresentativeInfoData]
|
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::RepresentativeInfoData::Representation
|
279
|
-
command.response_class = Google::Apis::CivicinfoV2::RepresentativeInfoData
|
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,14 +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
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: google-apis-core
|
@@ -58,9 +57,8 @@ licenses:
|
|
58
57
|
metadata:
|
59
58
|
bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
|
60
59
|
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.
|
60
|
+
documentation_uri: https://googleapis.dev/ruby/google-apis-civicinfo_v2/v0.26.0
|
62
61
|
source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-civicinfo_v2
|
63
|
-
post_install_message:
|
64
62
|
rdoc_options: []
|
65
63
|
require_paths:
|
66
64
|
- lib
|
@@ -68,15 +66,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
68
66
|
requirements:
|
69
67
|
- - ">="
|
70
68
|
- !ruby/object:Gem::Version
|
71
|
-
version: '
|
69
|
+
version: '3.1'
|
72
70
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
73
71
|
requirements:
|
74
72
|
- - ">="
|
75
73
|
- !ruby/object:Gem::Version
|
76
74
|
version: '0'
|
77
75
|
requirements: []
|
78
|
-
rubygems_version: 3.
|
79
|
-
signing_key:
|
76
|
+
rubygems_version: 3.6.8
|
80
77
|
specification_version: 4
|
81
78
|
summary: Simple REST client for Google Civic Information API V2
|
82
79
|
test_files: []
|