blob: bc8ed80c8a97850c122fde1a252cdf479a5db4ea [file] [log] [blame]
Craig Citro0e5b9bf2014-10-15 10:26:14 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="civicinfo_v2.html">Google Civic Information API</a> . <a href="civicinfo_v2.representatives.html">representatives</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070078 <code><a href="#representativeInfoByAddress">representativeInfoByAddress(address=None, levels=None, roles=None, includeOffices=None, x__xgafv=None)</a></code></p>
Craig Citro0e5b9bf2014-10-15 10:26:14 -070079<p class="firstline">Looks up political geography and representative information for a single address.</p>
80<p class="toc_element">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070081 <code><a href="#representativeInfoByDivision">representativeInfoByDivision(ocdId, roles=None, recursive=None, levels=None, x__xgafv=None)</a></code></p>
Craig Citro0e5b9bf2014-10-15 10:26:14 -070082<p class="firstline">Looks up representative information for a single geographic division.</p>
83<h3>Method Details</h3>
84<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070085 <code class="details" id="representativeInfoByAddress">representativeInfoByAddress(address=None, levels=None, roles=None, includeOffices=None, x__xgafv=None)</code>
Craig Citro0e5b9bf2014-10-15 10:26:14 -070086 <pre>Looks up political geography and representative information for a single address.
87
88Args:
Bu Sun Kimd059ad82020-07-22 17:02:09 -070089 address: string, The address to look up. May only be specified if the field ocdId is not given in the URL
Bu Sun Kim65020912020-05-20 12:08:20 -070090 levels: string, A list of office levels to filter by. Only offices that serve at least one of these levels will be returned. Divisions that don&#x27;t contain a matching office will not be returned. (repeated)
Bu Sun Kim65020912020-05-20 12:08:20 -070091 roles: string, A list of office roles to filter by. Only offices fulfilling one of these roles will be returned. Divisions that don&#x27;t contain a matching office will not be returned. (repeated)
Bu Sun Kimd059ad82020-07-22 17:02:09 -070092 includeOffices: boolean, Whether to return information about offices and officials. If false, only the top-level district information will be returned.
93 x__xgafv: string, V1 error format.
Craig Citro0e5b9bf2014-10-15 10:26:14 -070094 Allowed values
Bu Sun Kimd059ad82020-07-22 17:02:09 -070095 1 - v1 error format
96 2 - v2 error format
Craig Citro0e5b9bf2014-10-15 10:26:14 -070097
98Returns:
99 An object of the form:
100
101 { # The result of a representative info lookup query.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700102 &quot;kind&quot;: &quot;civicinfo#representativeInfoResponse&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;civicinfo#representativeInfoResponse&quot;.
103 &quot;offices&quot;: [ # Elected offices referenced by the divisions listed above. Will only be present if includeOffices was true in the request.
104 { # Information about an Office held by one or more Officials.
105 &quot;levels&quot;: [ # The levels of government of which this office is part. There may be more than one in cases where a jurisdiction effectively acts at two different levels of government; for example, the mayor of the District of Columbia acts at &quot;locality&quot; level, but also effectively at both &quot;administrative-area-2&quot; and &quot;administrative-area-1&quot;.
Bu Sun Kim65020912020-05-20 12:08:20 -0700106 &quot;A String&quot;,
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700107 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700108 &quot;roles&quot;: [ # The roles which this office fulfills. Roles are not meant to be exhaustive, or to exactly specify the entire set of responsibilities of a given office, but are meant to be rough categories that are useful for general selection from or sorting of a list of offices.
109 &quot;A String&quot;,
110 ],
111 &quot;name&quot;: &quot;A String&quot;, # The human-readable name of the office.
112 &quot;sources&quot;: [ # A list of sources for this office. If multiple sources are listed, the data has been aggregated from those sources.
113 { # Contains information about the data source for the element containing it.
114 &quot;official&quot;: True or False, # Whether this data comes from an official government source.
115 &quot;name&quot;: &quot;A String&quot;, # The name of the data source.
116 },
117 ],
118 &quot;officialIndices&quot;: [ # List of indices in the officials array of people who presently hold this office.
119 42,
120 ],
121 &quot;divisionId&quot;: &quot;A String&quot;, # The OCD ID of the division with which this office is associated.
122 },
123 ],
124 &quot;divisions&quot;: { # A map of political geographic divisions that contain the requested address, keyed by the unique Open Civic Data identifier for this division.
125 &quot;a_key&quot;: { # Describes a political geography.
Bu Sun Kim65020912020-05-20 12:08:20 -0700126 &quot;name&quot;: &quot;A String&quot;, # The name of the division.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700127 &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.
128 &quot;A String&quot;,
129 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700130 &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.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700131 42,
132 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700133 },
134 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700135 &quot;normalizedInput&quot;: { # A simple representation of an address. # The normalized version of the requested address
Bu Sun Kim65020912020-05-20 12:08:20 -0700136 &quot;line3&quot;: &quot;A String&quot;, # The third line of the address, if needed.
Bu Sun Kim65020912020-05-20 12:08:20 -0700137 &quot;zip&quot;: &quot;A String&quot;, # The US Postal Zip Code of the address.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700138 &quot;locationName&quot;: &quot;A String&quot;, # The name of the location.
139 &quot;line1&quot;: &quot;A String&quot;, # The street name and number of this address.
140 &quot;city&quot;: &quot;A String&quot;, # The city or town for the address.
141 &quot;line2&quot;: &quot;A String&quot;, # The second line the address, if needed.
142 &quot;state&quot;: &quot;A String&quot;, # The US two letter state abbreviation of the address.
Bu Sun Kim65020912020-05-20 12:08:20 -0700143 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700144 &quot;officials&quot;: [ # Officials holding the offices listed above. Will only be present if includeOffices was true in the request.
145 { # Information about a person holding an elected office.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700146 &quot;emails&quot;: [ # The direct email addresses for the official.
147 &quot;A String&quot;,
Bu Sun Kim65020912020-05-20 12:08:20 -0700148 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700149 &quot;phones&quot;: [ # The official&#x27;s public contact phone numbers.
150 &quot;A String&quot;,
151 ],
152 &quot;name&quot;: &quot;A String&quot;, # The official&#x27;s name.
Bu Sun Kim65020912020-05-20 12:08:20 -0700153 &quot;channels&quot;: [ # A list of known (social) media channels for this official.
154 { # A social media or web channel for a candidate.
155 &quot;id&quot;: &quot;A String&quot;, # The unique public identifier for the candidate&#x27;s channel.
156 &quot;type&quot;: &quot;A String&quot;, # The type of channel. The following is a list of types of channels, but is not exhaustive. More channel types may be added at a later time. One of: GooglePlus, YouTube, Facebook, Twitter
157 },
158 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700159 &quot;party&quot;: &quot;A String&quot;, # The full name of the party the official belongs to.
Bu Sun Kim65020912020-05-20 12:08:20 -0700160 &quot;photoUrl&quot;: &quot;A String&quot;, # A URL for a photo of the official.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700161 &quot;address&quot;: [ # Addresses at which to contact the official.
162 { # A simple representation of an address.
163 &quot;line3&quot;: &quot;A String&quot;, # The third line of the address, if needed.
164 &quot;zip&quot;: &quot;A String&quot;, # The US Postal Zip Code of the address.
165 &quot;locationName&quot;: &quot;A String&quot;, # The name of the location.
166 &quot;line1&quot;: &quot;A String&quot;, # The street name and number of this address.
167 &quot;city&quot;: &quot;A String&quot;, # The city or town for the address.
168 &quot;line2&quot;: &quot;A String&quot;, # The second line the address, if needed.
169 &quot;state&quot;: &quot;A String&quot;, # The US two letter state abbreviation of the address.
170 },
171 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700172 &quot;urls&quot;: [ # The official&#x27;s public website URLs.
173 &quot;A String&quot;,
174 ],
175 },
176 ],
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700177 }</pre>
178</div>
179
180<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700181 <code class="details" id="representativeInfoByDivision">representativeInfoByDivision(ocdId, roles=None, recursive=None, levels=None, x__xgafv=None)</code>
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700182 <pre>Looks up representative information for a single geographic division.
183
184Args:
185 ocdId: string, The Open Civic Data division identifier of the division to look up. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700186 roles: string, A list of office roles to filter by. Only offices fulfilling one of these roles will be returned. Divisions that don&#x27;t contain a matching office will not be returned. (repeated)
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700187 recursive: boolean, If true, information about all divisions contained in the division requested will be included as well. For example, if querying ocd-division/country:us/district:dc, this would also return all DC&#x27;s wards and ANCs.
188 levels: string, A list of office levels to filter by. Only offices that serve at least one of these levels will be returned. Divisions that don&#x27;t contain a matching office will not be returned. (repeated)
189 x__xgafv: string, V1 error format.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700190 Allowed values
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700191 1 - v1 error format
192 2 - v2 error format
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700193
194Returns:
195 An object of the form:
196
197 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700198 &quot;offices&quot;: [ # Elected offices referenced by the divisions listed above. Will only be present if includeOffices was true in the request.
199 { # Information about an Office held by one or more Officials.
Bu Sun Kim65020912020-05-20 12:08:20 -0700200 &quot;levels&quot;: [ # The levels of government of which this office is part. There may be more than one in cases where a jurisdiction effectively acts at two different levels of government; for example, the mayor of the District of Columbia acts at &quot;locality&quot; level, but also effectively at both &quot;administrative-area-2&quot; and &quot;administrative-area-1&quot;.
201 &quot;A String&quot;,
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700202 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700203 &quot;roles&quot;: [ # The roles which this office fulfills. Roles are not meant to be exhaustive, or to exactly specify the entire set of responsibilities of a given office, but are meant to be rough categories that are useful for general selection from or sorting of a list of offices.
204 &quot;A String&quot;,
205 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700206 &quot;name&quot;: &quot;A String&quot;, # The human-readable name of the office.
Bu Sun Kim65020912020-05-20 12:08:20 -0700207 &quot;sources&quot;: [ # A list of sources for this office. If multiple sources are listed, the data has been aggregated from those sources.
208 { # Contains information about the data source for the element containing it.
Bu Sun Kim65020912020-05-20 12:08:20 -0700209 &quot;official&quot;: True or False, # Whether this data comes from an official government source.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700210 &quot;name&quot;: &quot;A String&quot;, # The name of the data source.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700211 },
212 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700213 &quot;officialIndices&quot;: [ # List of indices in the officials array of people who presently hold this office.
214 42,
215 ],
216 &quot;divisionId&quot;: &quot;A String&quot;, # The OCD ID of the division with which this office is associated.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700217 },
218 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700219 &quot;officials&quot;: [ # Officials holding the offices listed above. Will only be present if includeOffices was true in the request.
220 { # Information about a person holding an elected office.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700221 &quot;emails&quot;: [ # The direct email addresses for the official.
222 &quot;A String&quot;,
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700223 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700224 &quot;phones&quot;: [ # The official&#x27;s public contact phone numbers.
225 &quot;A String&quot;,
226 ],
227 &quot;name&quot;: &quot;A String&quot;, # The official&#x27;s name.
Bu Sun Kim65020912020-05-20 12:08:20 -0700228 &quot;channels&quot;: [ # A list of known (social) media channels for this official.
229 { # A social media or web channel for a candidate.
230 &quot;id&quot;: &quot;A String&quot;, # The unique public identifier for the candidate&#x27;s channel.
231 &quot;type&quot;: &quot;A String&quot;, # The type of channel. The following is a list of types of channels, but is not exhaustive. More channel types may be added at a later time. One of: GooglePlus, YouTube, Facebook, Twitter
232 },
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700233 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700234 &quot;party&quot;: &quot;A String&quot;, # The full name of the party the official belongs to.
Bu Sun Kim65020912020-05-20 12:08:20 -0700235 &quot;photoUrl&quot;: &quot;A String&quot;, # A URL for a photo of the official.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700236 &quot;address&quot;: [ # Addresses at which to contact the official.
237 { # A simple representation of an address.
238 &quot;line3&quot;: &quot;A String&quot;, # The third line of the address, if needed.
239 &quot;zip&quot;: &quot;A String&quot;, # The US Postal Zip Code of the address.
240 &quot;locationName&quot;: &quot;A String&quot;, # The name of the location.
241 &quot;line1&quot;: &quot;A String&quot;, # The street name and number of this address.
242 &quot;city&quot;: &quot;A String&quot;, # The city or town for the address.
243 &quot;line2&quot;: &quot;A String&quot;, # The second line the address, if needed.
244 &quot;state&quot;: &quot;A String&quot;, # The US two letter state abbreviation of the address.
245 },
246 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700247 &quot;urls&quot;: [ # The official&#x27;s public website URLs.
248 &quot;A String&quot;,
249 ],
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700250 },
251 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700252 &quot;divisions&quot;: { # A map of political geographic divisions that contain the requested address, keyed by the unique Open Civic Data identifier for this division.
253 &quot;a_key&quot;: { # Describes a political geography.
254 &quot;name&quot;: &quot;A String&quot;, # The name of the division.
255 &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.
256 &quot;A String&quot;,
257 ],
258 &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.
259 42,
260 ],
261 },
262 },
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700263 }</pre>
264</div>
265
266</body></html>