google-apis-civicinfo_v2 0.23.0 → 0.25.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.
@@ -52,6 +52,35 @@ module Google
52
52
  @batch_path = 'batch'
53
53
  end
54
54
 
55
+ # Lookup OCDIDs and names for divisions related to an address.
56
+ # @param [String] address
57
+ # @param [String] fields
58
+ # Selector specifying which fields to include in a partial response.
59
+ # @param [String] quota_user
60
+ # Available to use for quota purposes for server-side applications. Can be any
61
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
62
+ # @param [Google::Apis::RequestOptions] options
63
+ # Request-specific options
64
+ #
65
+ # @yield [result, err] Result & error if block supplied
66
+ # @yieldparam result [Google::Apis::CivicinfoV2::CivicinfoApiprotosV2DivisionByAddressResponse] parsed result object
67
+ # @yieldparam err [StandardError] error object if request failed
68
+ #
69
+ # @return [Google::Apis::CivicinfoV2::CivicinfoApiprotosV2DivisionByAddressResponse]
70
+ #
71
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
72
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
73
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
74
+ def query_division_division_by_address(address: nil, fields: nil, quota_user: nil, options: nil, &block)
75
+ command = make_simple_command(:get, 'civicinfo/v2/divisionsByAddress', options)
76
+ command.response_representation = Google::Apis::CivicinfoV2::CivicinfoApiprotosV2DivisionByAddressResponse::Representation
77
+ command.response_class = Google::Apis::CivicinfoV2::CivicinfoApiprotosV2DivisionByAddressResponse
78
+ command.query['address'] = address unless address.nil?
79
+ command.query['fields'] = fields unless fields.nil?
80
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
81
+ execute_or_queue_command(command, &block)
82
+ end
83
+
55
84
  # Searches for political divisions by their natural name or OCD ID.
56
85
  # @param [String] query
57
86
  # The search query. Queries can cover any parts of a OCD ID or a human readable
@@ -67,18 +96,18 @@ module Google
67
96
  # Request-specific options
68
97
  #
69
98
  # @yield [result, err] Result & error if block supplied
70
- # @yieldparam result [Google::Apis::CivicinfoV2::SearchDivisionResponse] parsed result object
99
+ # @yieldparam result [Google::Apis::CivicinfoV2::CivicinfoApiprotosV2DivisionSearchResponse] parsed result object
71
100
  # @yieldparam err [StandardError] error object if request failed
72
101
  #
73
- # @return [Google::Apis::CivicinfoV2::SearchDivisionResponse]
102
+ # @return [Google::Apis::CivicinfoV2::CivicinfoApiprotosV2DivisionSearchResponse]
74
103
  #
75
104
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
76
105
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
77
106
  # @raise [Google::Apis::AuthorizationError] Authorization is required
78
107
  def search_divisions(query: nil, fields: nil, quota_user: nil, options: nil, &block)
79
108
  command = make_simple_command(:get, 'civicinfo/v2/divisions', options)
80
- command.response_representation = Google::Apis::CivicinfoV2::SearchDivisionResponse::Representation
81
- command.response_class = Google::Apis::CivicinfoV2::SearchDivisionResponse
109
+ command.response_representation = Google::Apis::CivicinfoV2::CivicinfoApiprotosV2DivisionSearchResponse::Representation
110
+ command.response_class = Google::Apis::CivicinfoV2::CivicinfoApiprotosV2DivisionSearchResponse
82
111
  command.query['query'] = query unless query.nil?
83
112
  command.query['fields'] = fields unless fields.nil?
84
113
  command.query['quotaUser'] = quota_user unless quota_user.nil?
@@ -97,18 +126,18 @@ module Google
97
126
  # Request-specific options
98
127
  #
99
128
  # @yield [result, err] Result & error if block supplied
100
- # @yieldparam result [Google::Apis::CivicinfoV2::QueryElectionsResponse] parsed result object
129
+ # @yieldparam result [Google::Apis::CivicinfoV2::CivicinfoApiprotosV2ElectionsQueryResponse] parsed result object
101
130
  # @yieldparam err [StandardError] error object if request failed
102
131
  #
103
- # @return [Google::Apis::CivicinfoV2::QueryElectionsResponse]
132
+ # @return [Google::Apis::CivicinfoV2::CivicinfoApiprotosV2ElectionsQueryResponse]
104
133
  #
105
134
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
106
135
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
107
136
  # @raise [Google::Apis::AuthorizationError] Authorization is required
108
137
  def query_election(production_data_only: nil, fields: nil, quota_user: nil, options: nil, &block)
109
138
  command = make_simple_command(:get, 'civicinfo/v2/elections', options)
110
- command.response_representation = Google::Apis::CivicinfoV2::QueryElectionsResponse::Representation
111
- command.response_class = Google::Apis::CivicinfoV2::QueryElectionsResponse
139
+ command.response_representation = Google::Apis::CivicinfoV2::CivicinfoApiprotosV2ElectionsQueryResponse::Representation
140
+ command.response_class = Google::Apis::CivicinfoV2::CivicinfoApiprotosV2ElectionsQueryResponse
112
141
  command.query['productionDataOnly'] = production_data_only unless production_data_only.nil?
113
142
  command.query['fields'] = fields unless fields.nil?
114
143
  command.query['quotaUser'] = quota_user unless quota_user.nil?
@@ -144,18 +173,18 @@ module Google
144
173
  # Request-specific options
145
174
  #
146
175
  # @yield [result, err] Result & error if block supplied
147
- # @yieldparam result [Google::Apis::CivicinfoV2::VoterInfoResponse] parsed result object
176
+ # @yieldparam result [Google::Apis::CivicinfoV2::CivicinfoApiprotosV2VoterInfoResponse] parsed result object
148
177
  # @yieldparam err [StandardError] error object if request failed
149
178
  #
150
- # @return [Google::Apis::CivicinfoV2::VoterInfoResponse]
179
+ # @return [Google::Apis::CivicinfoV2::CivicinfoApiprotosV2VoterInfoResponse]
151
180
  #
152
181
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
153
182
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
154
183
  # @raise [Google::Apis::AuthorizationError] Authorization is required
155
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)
156
185
  command = make_simple_command(:get, 'civicinfo/v2/voterinfo', options)
157
- command.response_representation = Google::Apis::CivicinfoV2::VoterInfoResponse::Representation
158
- command.response_class = Google::Apis::CivicinfoV2::VoterInfoResponse
186
+ command.response_representation = Google::Apis::CivicinfoV2::CivicinfoApiprotosV2VoterInfoResponse::Representation
187
+ command.response_class = Google::Apis::CivicinfoV2::CivicinfoApiprotosV2VoterInfoResponse
159
188
  command.query['address'] = address unless address.nil?
160
189
  command.query['electionId'] = election_id unless election_id.nil?
161
190
  command.query['officialOnly'] = official_only unless official_only.nil?
@@ -191,18 +220,18 @@ module Google
191
220
  # Request-specific options
192
221
  #
193
222
  # @yield [result, err] Result & error if block supplied
194
- # @yieldparam result [Google::Apis::CivicinfoV2::RepresentativeInfoResponse] parsed result object
223
+ # @yieldparam result [Google::Apis::CivicinfoV2::CivicinfoApiprotosV2RepresentativeInfoResponse] parsed result object
195
224
  # @yieldparam err [StandardError] error object if request failed
196
225
  #
197
- # @return [Google::Apis::CivicinfoV2::RepresentativeInfoResponse]
226
+ # @return [Google::Apis::CivicinfoV2::CivicinfoApiprotosV2RepresentativeInfoResponse]
198
227
  #
199
228
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
200
229
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
201
230
  # @raise [Google::Apis::AuthorizationError] Authorization is required
202
231
  def representative_info_by_address(address: nil, include_offices: nil, levels: nil, roles: nil, fields: nil, quota_user: nil, options: nil, &block)
203
232
  command = make_simple_command(:get, 'civicinfo/v2/representatives', options)
204
- command.response_representation = Google::Apis::CivicinfoV2::RepresentativeInfoResponse::Representation
205
- command.response_class = Google::Apis::CivicinfoV2::RepresentativeInfoResponse
233
+ command.response_representation = Google::Apis::CivicinfoV2::CivicinfoApiprotosV2RepresentativeInfoResponse::Representation
234
+ command.response_class = Google::Apis::CivicinfoV2::CivicinfoApiprotosV2RepresentativeInfoResponse
206
235
  command.query['address'] = address unless address.nil?
207
236
  command.query['includeOffices'] = include_offices unless include_offices.nil?
208
237
  command.query['levels'] = levels unless levels.nil?
@@ -236,18 +265,18 @@ module Google
236
265
  # Request-specific options
237
266
  #
238
267
  # @yield [result, err] Result & error if block supplied
239
- # @yieldparam result [Google::Apis::CivicinfoV2::RepresentativeInfoData] parsed result object
268
+ # @yieldparam result [Google::Apis::CivicinfoV2::CivicinfoApiprotosV2RepresentativeInfoData] parsed result object
240
269
  # @yieldparam err [StandardError] error object if request failed
241
270
  #
242
- # @return [Google::Apis::CivicinfoV2::RepresentativeInfoData]
271
+ # @return [Google::Apis::CivicinfoV2::CivicinfoApiprotosV2RepresentativeInfoData]
243
272
  #
244
273
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
245
274
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
246
275
  # @raise [Google::Apis::AuthorizationError] Authorization is required
247
276
  def representative_info_by_division(ocd_id, levels: nil, recursive: nil, roles: nil, fields: nil, quota_user: nil, options: nil, &block)
248
277
  command = make_simple_command(:get, 'civicinfo/v2/representatives/{ocdId}', options)
249
- command.response_representation = Google::Apis::CivicinfoV2::RepresentativeInfoData::Representation
250
- command.response_class = Google::Apis::CivicinfoV2::RepresentativeInfoData
278
+ command.response_representation = Google::Apis::CivicinfoV2::CivicinfoApiprotosV2RepresentativeInfoData::Representation
279
+ command.response_class = Google::Apis::CivicinfoV2::CivicinfoApiprotosV2RepresentativeInfoData
251
280
  command.params['ocdId'] = ocd_id unless ocd_id.nil?
252
281
  command.query['levels'] = levels unless levels.nil?
253
282
  command.query['recursive'] = recursive unless recursive.nil?
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.23.0
4
+ version: 0.25.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-06-16 00:00:00.000000000 Z
10
+ date: 2025-03-23 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.23.0
60
+ documentation_uri: https://googleapis.dev/ruby/google-apis-civicinfo_v2/v0.25.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
@@ -75,8 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
73
  - !ruby/object:Gem::Version
76
74
  version: '0'
77
75
  requirements: []
78
- rubygems_version: 3.5.6
79
- signing_key:
76
+ rubygems_version: 3.6.5
80
77
  specification_version: 4
81
78
  summary: Simple REST client for Google Civic Information API V2
82
79
  test_files: []