Skip to content

Commit 6d726e5

Browse files
feat(civicinfo): update the api
#### civicinfo:v2 The following keys were added: - resources.divisions.methods.queryDivisionByAddress (Total Keys: 8) - schemas.DivisionByAddressResponse (Total Keys: 5)
1 parent 1fc953d commit 6d726e5

File tree

2 files changed

+75
-1
lines changed

2 files changed

+75
-1
lines changed

docs/dyn/civicinfo_v2.divisions.html

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ <h2>Instance Methods</h2>
7777
<p class="toc_element">
7878
<code><a href="#close">close()</a></code></p>
7979
<p class="firstline">Close httplib2 connections.</p>
80+
<p class="toc_element">
81+
<code><a href="#queryDivisionByAddress">queryDivisionByAddress(address=None, x__xgafv=None)</a></code></p>
82+
<p class="firstline">Lookup OCDIDs and names for divisions related to an address.</p>
8083
<p class="toc_element">
8184
<code><a href="#search">search(query=None, x__xgafv=None)</a></code></p>
8285
<p class="firstline">Searches for political divisions by their natural name or OCD ID.</p>
@@ -86,6 +89,44 @@ <h3>Method Details</h3>
8689
<pre>Close httplib2 connections.</pre>
8790
</div>
8891

92+
<div class="method">
93+
<code class="details" id="queryDivisionByAddress">queryDivisionByAddress(address=None, x__xgafv=None)</code>
94+
<pre>Lookup OCDIDs and names for divisions related to an address.
95+
96+
Args:
97+
address: string, A parameter
98+
x__xgafv: string, V1 error format.
99+
Allowed values
100+
1 - v1 error format
101+
2 - v2 error format
102+
103+
Returns:
104+
An object of the form:
105+
106+
{
107+
&quot;divisions&quot;: {
108+
&quot;a_key&quot;: { # Describes a political geography.
109+
&quot;alsoKnownAs&quot;: [ # Any other valid OCD IDs that refer to the same division.\n\nBecause OCD IDs are meant to be human-readable and at least somewhat predictable, there are occasionally several identifiers for a single division. These identifiers are defined to be equivalent to one another, and one is always indicated as the primary identifier. The primary identifier will be returned in ocd_id above, and any other equivalent valid identifiers will be returned in this list.\n\nFor example, if this division&#x27;s OCD ID is ocd-division/country:us/district:dc, this will contain ocd-division/country:us/state:dc.
110+
&quot;A String&quot;,
111+
],
112+
&quot;name&quot;: &quot;A String&quot;, # The name of the division.
113+
&quot;officeIndices&quot;: [ # List of indices in the offices array, one for each office elected from this division. Will only be present if includeOffices was true (or absent) in the request.
114+
42,
115+
],
116+
},
117+
},
118+
&quot;normalizedInput&quot;: { # A simple representation of an address. # The normalized version of the requested address.
119+
&quot;city&quot;: &quot;A String&quot;, # The city or town for the address.
120+
&quot;line1&quot;: &quot;A String&quot;, # The street name and number of this address.
121+
&quot;line2&quot;: &quot;A String&quot;, # The second line the address, if needed.
122+
&quot;line3&quot;: &quot;A String&quot;, # The third line of the address, if needed.
123+
&quot;locationName&quot;: &quot;A String&quot;, # The name of the location.
124+
&quot;state&quot;: &quot;A String&quot;, # The US two letter state abbreviation of the address.
125+
&quot;zip&quot;: &quot;A String&quot;, # The US Postal Zip Code of the address.
126+
},
127+
}</pre>
128+
</div>
129+
89130
<div class="method">
90131
<code class="details" id="search">search(query=None, x__xgafv=None)</code>
91132
<pre>Searches for political divisions by their natural name or OCD ID.

googleapiclient/discovery_cache/documents/civicinfo.v2.json

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,23 @@
9797
"resources": {
9898
"divisions": {
9999
"methods": {
100+
"queryDivisionByAddress": {
101+
"description": "Lookup OCDIDs and names for divisions related to an address.",
102+
"flatPath": "civicinfo/v2/divisionsByAddress",
103+
"httpMethod": "GET",
104+
"id": "civicinfo.divisions.queryDivisionByAddress",
105+
"parameterOrder": [],
106+
"parameters": {
107+
"address": {
108+
"location": "query",
109+
"type": "string"
110+
}
111+
},
112+
"path": "civicinfo/v2/divisionsByAddress",
113+
"response": {
114+
"$ref": "DivisionByAddressResponse"
115+
}
116+
},
100117
"search": {
101118
"description": "Searches for political divisions by their natural name or OCD ID.",
102119
"flatPath": "civicinfo/v2/divisions",
@@ -362,7 +379,7 @@
362379
}
363380
}
364381
},
365-
"revision": "20240620",
382+
"revision": "20240910",
366383
"rootUrl": "https://civicinfo.googleapis.com/",
367384
"schemas": {
368385
"AdministrationRegion": {
@@ -696,6 +713,22 @@
696713
},
697714
"type": "object"
698715
},
716+
"DivisionByAddressResponse": {
717+
"id": "DivisionByAddressResponse",
718+
"properties": {
719+
"divisions": {
720+
"additionalProperties": {
721+
"$ref": "GeographicDivision"
722+
},
723+
"type": "object"
724+
},
725+
"normalizedInput": {
726+
"$ref": "SimpleAddressType",
727+
"description": "The normalized version of the requested address."
728+
}
729+
},
730+
"type": "object"
731+
},
699732
"DivisionSearchResponse": {
700733
"description": "The result of a division search query.",
701734
"id": "DivisionSearchResponse",

0 commit comments

Comments
 (0)