~nskaggs/+junk/xenial-test

« back to all changes in this revision

Viewing changes to src/google.golang.org/api/civicinfo/us_v1/civicinfo-api.json

  • Committer: Nicholas Skaggs
  • Date: 2016-10-24 20:56:05 UTC
  • Revision ID: nicholas.skaggs@canonical.com-20161024205605-z8lta0uvuhtxwzwl
Initi with beta15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
{
 
2
 "kind": "discovery#restDescription",
 
3
 "etag": "\"l66ggWbucbkBw9Lpos72oziyefE/ixlTlCZ6lprJQCHG1SmuBjDXiaM\"",
 
4
 "discoveryVersion": "v1",
 
5
 "id": "civicinfo:us_v1",
 
6
 "name": "civicinfo",
 
7
 "canonicalName": "Civic Info",
 
8
 "version": "us_v1",
 
9
 "revision": "20141023",
 
10
 "title": "Google Civic Information API",
 
11
 "description": "An API for accessing civic information.",
 
12
 "ownerDomain": "google.com",
 
13
 "ownerName": "Google",
 
14
 "icons": {
 
15
  "x16": "http://www.google.com/images/icons/product/search-16.gif",
 
16
  "x32": "http://www.google.com/images/icons/product/search-32.gif"
 
17
 },
 
18
 "documentationLink": "https://developers.google.com/civic-information",
 
19
 "protocol": "rest",
 
20
 "baseUrl": "https://www.googleapis.com/civicinfo/us_v1/",
 
21
 "basePath": "/civicinfo/us_v1/",
 
22
 "rootUrl": "https://www.googleapis.com/",
 
23
 "servicePath": "civicinfo/us_v1/",
 
24
 "batchPath": "batch",
 
25
 "parameters": {
 
26
  "alt": {
 
27
   "type": "string",
 
28
   "description": "Data format for the response.",
 
29
   "default": "json",
 
30
   "enum": [
 
31
    "json"
 
32
   ],
 
33
   "enumDescriptions": [
 
34
    "Responses with Content-Type of application/json"
 
35
   ],
 
36
   "location": "query"
 
37
  },
 
38
  "fields": {
 
39
   "type": "string",
 
40
   "description": "Selector specifying which fields to include in a partial response.",
 
41
   "location": "query"
 
42
  },
 
43
  "key": {
 
44
   "type": "string",
 
45
   "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
 
46
   "location": "query"
 
47
  },
 
48
  "oauth_token": {
 
49
   "type": "string",
 
50
   "description": "OAuth 2.0 token for the current user.",
 
51
   "location": "query"
 
52
  },
 
53
  "prettyPrint": {
 
54
   "type": "boolean",
 
55
   "description": "Returns response with indentations and line breaks.",
 
56
   "default": "true",
 
57
   "location": "query"
 
58
  },
 
59
  "quotaUser": {
 
60
   "type": "string",
 
61
   "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.",
 
62
   "location": "query"
 
63
  },
 
64
  "userIp": {
 
65
   "type": "string",
 
66
   "description": "IP address of the site where the request originates. Use this if you want to enforce per-user limits.",
 
67
   "location": "query"
 
68
  }
 
69
 },
 
70
 "schemas": {
 
71
  "AdministrationRegion": {
 
72
   "id": "AdministrationRegion",
 
73
   "type": "object",
 
74
   "description": "Describes information about a regional election administrative area.",
 
75
   "properties": {
 
76
    "electionAdministrationBody": {
 
77
     "$ref": "AdministrativeBody",
 
78
     "description": "The election administration body for this area."
 
79
    },
 
80
    "id": {
 
81
     "type": "string",
 
82
     "description": "An ID for this object. IDs may change in future requests and should not be cached. Access to this field requires special access that can be requested from the Request more link on the Quotas page."
 
83
    },
 
84
    "local_jurisdiction": {
 
85
     "$ref": "AdministrationRegion",
 
86
     "description": "The city or county that provides election information for this voter. This object can have the same elements as state."
 
87
    },
 
88
    "name": {
 
89
     "type": "string",
 
90
     "description": "The name of the jurisdiction."
 
91
    },
 
92
    "sources": {
 
93
     "type": "array",
 
94
     "description": "A list of sources for this area. If multiple sources are listed the data has been aggregated from those sources.",
 
95
     "items": {
 
96
      "$ref": "Source"
 
97
     }
 
98
    }
 
99
   }
 
100
  },
 
101
  "AdministrativeBody": {
 
102
   "id": "AdministrativeBody",
 
103
   "type": "object",
 
104
   "description": "Information about an election administrative body (e.g. County Board of Elections).",
 
105
   "properties": {
 
106
    "absenteeVotingInfoUrl": {
 
107
     "type": "string",
 
108
     "description": "A URL provided by this administrative body for information on absentee voting."
 
109
    },
 
110
    "ballotInfoUrl": {
 
111
     "type": "string",
 
112
     "description": "A URL provided by this administrative body to give contest information to the voter."
 
113
    },
 
114
    "correspondenceAddress": {
 
115
     "$ref": "SimpleAddressType",
 
116
     "description": "The mailing address of this administrative body."
 
117
    },
 
118
    "electionInfoUrl": {
 
119
     "type": "string",
 
120
     "description": "A URL provided by this administrative body for looking up general election information."
 
121
    },
 
122
    "electionOfficials": {
 
123
     "type": "array",
 
124
     "description": "The election officials for this election administrative body.",
 
125
     "items": {
 
126
      "$ref": "ElectionOfficial"
 
127
     }
 
128
    },
 
129
    "electionRegistrationConfirmationUrl": {
 
130
     "type": "string",
 
131
     "description": "A URL provided by this administrative body for confirming that the voter is registered to vote."
 
132
    },
 
133
    "electionRegistrationUrl": {
 
134
     "type": "string",
 
135
     "description": "A URL provided by this administrative body for looking up how to register to vote."
 
136
    },
 
137
    "electionRulesUrl": {
 
138
     "type": "string",
 
139
     "description": "A URL provided by this administrative body describing election rules to the voter."
 
140
    },
 
141
    "hoursOfOperation": {
 
142
     "type": "string",
 
143
     "description": "A description of the hours of operation for this administrative body."
 
144
    },
 
145
    "name": {
 
146
     "type": "string",
 
147
     "description": "The name of this election administrative body."
 
148
    },
 
149
    "physicalAddress": {
 
150
     "$ref": "SimpleAddressType",
 
151
     "description": "The physical address of this administrative body."
 
152
    },
 
153
    "voter_services": {
 
154
     "type": "array",
 
155
     "description": "A description of the services this administrative body may provide.",
 
156
     "items": {
 
157
      "type": "string"
 
158
     }
 
159
    },
 
160
    "votingLocationFinderUrl": {
 
161
     "type": "string",
 
162
     "description": "A URL provided by this administrative body for looking up where to vote."
 
163
    }
 
164
   }
 
165
  },
 
166
  "Candidate": {
 
167
   "id": "Candidate",
 
168
   "type": "object",
 
169
   "description": "Information about a candidate running for elected office.",
 
170
   "properties": {
 
171
    "candidateUrl": {
 
172
     "type": "string",
 
173
     "description": "The URL for the candidate's campaign web site."
 
174
    },
 
175
    "channels": {
 
176
     "type": "array",
 
177
     "description": "A list of known (social) media channels for this candidate.",
 
178
     "items": {
 
179
      "$ref": "Channel"
 
180
     }
 
181
    },
 
182
    "email": {
 
183
     "type": "string",
 
184
     "description": "The email address for the candidate's campaign."
 
185
    },
 
186
    "name": {
 
187
     "type": "string",
 
188
     "description": "The candidate's name."
 
189
    },
 
190
    "orderOnBallot": {
 
191
     "type": "string",
 
192
     "description": "The order the candidate appears on the ballot for this contest.",
 
193
     "format": "int64"
 
194
    },
 
195
    "party": {
 
196
     "type": "string",
 
197
     "description": "The full name of the party the candidate is a member of."
 
198
    },
 
199
    "phone": {
 
200
     "type": "string",
 
201
     "description": "The voice phone number for the candidate's campaign office."
 
202
    },
 
203
    "photoUrl": {
 
204
     "type": "string",
 
205
     "description": "A URL for a photo of the candidate."
 
206
    }
 
207
   }
 
208
  },
 
209
  "Channel": {
 
210
   "id": "Channel",
 
211
   "type": "object",
 
212
   "description": "A social media or web channel for a candidate.",
 
213
   "properties": {
 
214
    "id": {
 
215
     "type": "string",
 
216
     "description": "The unique public identifier for the candidate's channel."
 
217
    },
 
218
    "type": {
 
219
     "type": "string",
 
220
     "description": "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"
 
221
    }
 
222
   }
 
223
  },
 
224
  "Contest": {
 
225
   "id": "Contest",
 
226
   "type": "object",
 
227
   "description": "Information about a contest that appears on a voter's ballot.",
 
228
   "properties": {
 
229
    "ballotPlacement": {
 
230
     "type": "string",
 
231
     "description": "A number specifying the position of this contest on the voter's ballot.",
 
232
     "format": "int64"
 
233
    },
 
234
    "candidates": {
 
235
     "type": "array",
 
236
     "description": "The candidate choices for this contest.",
 
237
     "items": {
 
238
      "$ref": "Candidate"
 
239
     }
 
240
    },
 
241
    "district": {
 
242
     "$ref": "ElectoralDistrict",
 
243
     "description": "Information about the electoral district that this contest is in."
 
244
    },
 
245
    "electorateSpecifications": {
 
246
     "type": "string",
 
247
     "description": "A description of any additional eligibility requirements for voting in this contest."
 
248
    },
 
249
    "id": {
 
250
     "type": "string",
 
251
     "description": "An ID for this object. IDs may change in future requests and should not be cached. Access to this field requires special access that can be requested from the Request more link on the Quotas page."
 
252
    },
 
253
    "level": {
 
254
     "type": "string",
 
255
     "description": "The level of office for this contest. One of: federal, state, county, city, other"
 
256
    },
 
257
    "numberElected": {
 
258
     "type": "string",
 
259
     "description": "The number of candidates that will be elected to office in this contest.",
 
260
     "format": "int64"
 
261
    },
 
262
    "numberVotingFor": {
 
263
     "type": "string",
 
264
     "description": "The number of candidates that a voter may vote for in this contest.",
 
265
     "format": "int64"
 
266
    },
 
267
    "office": {
 
268
     "type": "string",
 
269
     "description": "The name of the office for this contest."
 
270
    },
 
271
    "primaryParty": {
 
272
     "type": "string",
 
273
     "description": "If this is a partisan election, the name of the party it is for."
 
274
    },
 
275
    "referendumSubtitle": {
 
276
     "type": "string",
 
277
     "description": "A brief description of the referendum. This field is only populated for contests of type 'Referendum'."
 
278
    },
 
279
    "referendumTitle": {
 
280
     "type": "string",
 
281
     "description": "The title of the referendum (e.g. 'Proposition 42'). This field is only populated for contests of type 'Referendum'."
 
282
    },
 
283
    "referendumUrl": {
 
284
     "type": "string",
 
285
     "description": "A link to the referendum. This field is only populated for contests of type 'Referendum'."
 
286
    },
 
287
    "sources": {
 
288
     "type": "array",
 
289
     "description": "A list of sources for this contest. If multiple sources are listed, the data has been aggregated from those sources.",
 
290
     "items": {
 
291
      "$ref": "Source"
 
292
     }
 
293
    },
 
294
    "special": {
 
295
     "type": "string",
 
296
     "description": "\"Yes\" or \"No\" depending on whether this a contest being held outside the normal election cycle."
 
297
    },
 
298
    "type": {
 
299
     "type": "string",
 
300
     "description": "The type of contest. Usually this will be 'General', 'Primary', or 'Run-off' for contests with candidates. For referenda this will be 'Referendum'."
 
301
    }
 
302
   }
 
303
  },
 
304
  "DivisionSearchResponse": {
 
305
   "id": "DivisionSearchResponse",
 
306
   "type": "object",
 
307
   "description": "The result of a division search query.",
 
308
   "properties": {
 
309
    "kind": {
 
310
     "type": "string",
 
311
     "description": "Identifies what kind of resource this is. Value: the fixed string \"civicinfo#divisionSearchResponse\".",
 
312
     "default": "civicinfo#divisionSearchResponse"
 
313
    },
 
314
    "results": {
 
315
     "type": "array",
 
316
     "items": {
 
317
      "$ref": "DivisionSearchResult"
 
318
     }
 
319
    },
 
320
    "status": {
 
321
     "type": "string",
 
322
     "description": "The result of the request. One of: success, addressUnparseable, noAddressParameter, internalLookupFailure"
 
323
    }
 
324
   }
 
325
  },
 
326
  "DivisionSearchResult": {
 
327
   "id": "DivisionSearchResult",
 
328
   "type": "object",
 
329
   "description": "Represents a political geographic division that matches the requested query.",
 
330
   "properties": {
 
331
    "aliases": {
 
332
     "type": "array",
 
333
     "description": "Other Open Civic Data identifiers that refer to the same division -- for example, those that refer to other political divisions whose boundaries are defined to be coterminous with this one. For example, ocd-division/country:us/state:wy will include an alias of ocd-division/country:us/state:wy/cd:1, since Wyoming has only one Congressional district.",
 
334
     "items": {
 
335
      "type": "string"
 
336
     }
 
337
    },
 
338
    "name": {
 
339
     "type": "string",
 
340
     "description": "The name of the division."
 
341
    },
 
342
    "ocdId": {
 
343
     "type": "string",
 
344
     "description": "The unique Open Civic Data identifier for this division."
 
345
    }
 
346
   }
 
347
  },
 
348
  "Election": {
 
349
   "id": "Election",
 
350
   "type": "object",
 
351
   "description": "Information about the election that was queried.",
 
352
   "properties": {
 
353
    "electionDay": {
 
354
     "type": "string",
 
355
     "description": "Day of the election in YYYY-MM-DD format."
 
356
    },
 
357
    "id": {
 
358
     "type": "string",
 
359
     "description": "The unique ID of this election.",
 
360
     "format": "int64"
 
361
    },
 
362
    "name": {
 
363
     "type": "string",
 
364
     "description": "A displayable name for the election."
 
365
    }
 
366
   }
 
367
  },
 
368
  "ElectionOfficial": {
 
369
   "id": "ElectionOfficial",
 
370
   "type": "object",
 
371
   "description": "Information about individual election officials.",
 
372
   "properties": {
 
373
    "emailAddress": {
 
374
     "type": "string",
 
375
     "description": "The email address of the election official."
 
376
    },
 
377
    "faxNumber": {
 
378
     "type": "string",
 
379
     "description": "The fax number of the election official."
 
380
    },
 
381
    "name": {
 
382
     "type": "string",
 
383
     "description": "The full name of the election official."
 
384
    },
 
385
    "officePhoneNumber": {
 
386
     "type": "string",
 
387
     "description": "The office phone number of the election official."
 
388
    },
 
389
    "title": {
 
390
     "type": "string",
 
391
     "description": "The title of the election official."
 
392
    }
 
393
   }
 
394
  },
 
395
  "ElectionsQueryResponse": {
 
396
   "id": "ElectionsQueryResponse",
 
397
   "type": "object",
 
398
   "description": "The list of elections available for this version of the API.",
 
399
   "properties": {
 
400
    "elections": {
 
401
     "type": "array",
 
402
     "description": "A list of available elections",
 
403
     "items": {
 
404
      "$ref": "Election"
 
405
     }
 
406
    },
 
407
    "kind": {
 
408
     "type": "string",
 
409
     "description": "Identifies what kind of resource this is. Value: the fixed string \"civicinfo#electionsQueryResponse\".",
 
410
     "default": "civicinfo#electionsQueryResponse"
 
411
    }
 
412
   }
 
413
  },
 
414
  "ElectoralDistrict": {
 
415
   "id": "ElectoralDistrict",
 
416
   "type": "object",
 
417
   "description": "Describes the geographic scope of a contest.",
 
418
   "properties": {
 
419
    "id": {
 
420
     "type": "string",
 
421
     "description": "An identifier for this district, relative to its scope. For example, the 34th State Senate district would have id \"34\" and a scope of stateUpper."
 
422
    },
 
423
    "name": {
 
424
     "type": "string",
 
425
     "description": "The name of the district."
 
426
    },
 
427
    "scope": {
 
428
     "type": "string",
 
429
     "description": "The geographic scope of this district. If unspecified the district's geography is not known. One of: national, statewide, congressional, stateUpper, stateLower, countywide, judicial, schoolBoard, cityWide, township, countyCouncil, cityCouncil, ward, special"
 
430
    }
 
431
   }
 
432
  },
 
433
  "GeographicDivision": {
 
434
   "id": "GeographicDivision",
 
435
   "type": "object",
 
436
   "description": "Describes a political geography.",
 
437
   "properties": {
 
438
    "alsoKnownAs": {
 
439
     "type": "array",
 
440
     "description": "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's OCD ID is ocd-division/country:us/district:dc, this will contain ocd-division/country:us/state:dc.",
 
441
     "items": {
 
442
      "type": "string"
 
443
     }
 
444
    },
 
445
    "name": {
 
446
     "type": "string",
 
447
     "description": "The name of the division."
 
448
    },
 
449
    "officeIds": {
 
450
     "type": "array",
 
451
     "description": "List of keys in the offices object, one for each office elected from this division. Will only be present if includeOffices was true (or absent) in the request.",
 
452
     "items": {
 
453
      "type": "string"
 
454
     }
 
455
    },
 
456
    "scope": {
 
457
     "type": "string",
 
458
     "description": "The geographic scope of the division. If unspecified, the division's geography is not known. One of: national, statewide, congressional, stateUpper, stateLower, countywide, judicial, schoolBoard, cityWide, township, countyCouncil, cityCouncil, ward, special"
 
459
    }
 
460
   }
 
461
  },
 
462
  "Office": {
 
463
   "id": "Office",
 
464
   "type": "object",
 
465
   "description": "Information about an Office held by one or more Officials.",
 
466
   "properties": {
 
467
    "divisionId": {
 
468
     "type": "string",
 
469
     "description": "The OCD ID of the division with which this office is associated."
 
470
    },
 
471
    "level": {
 
472
     "type": "string",
 
473
     "description": "The level of this elected office. One of: federal, state, county, city, other"
 
474
    },
 
475
    "name": {
 
476
     "type": "string",
 
477
     "description": "The human-readable name of the office."
 
478
    },
 
479
    "officialIds": {
 
480
     "type": "array",
 
481
     "description": "List of keys in the officials object of people who presently hold this office.",
 
482
     "items": {
 
483
      "type": "string"
 
484
     }
 
485
    },
 
486
    "sources": {
 
487
     "type": "array",
 
488
     "description": "A list of sources for this office. If multiple sources are listed, the data has been aggregated from those sources.",
 
489
     "items": {
 
490
      "$ref": "Source"
 
491
     }
 
492
    }
 
493
   }
 
494
  },
 
495
  "Official": {
 
496
   "id": "Official",
 
497
   "type": "object",
 
498
   "description": "Information about a person holding an elected office.",
 
499
   "properties": {
 
500
    "address": {
 
501
     "type": "array",
 
502
     "description": "Addresses at which to contact the official.",
 
503
     "items": {
 
504
      "$ref": "SimpleAddressType"
 
505
     }
 
506
    },
 
507
    "channels": {
 
508
     "type": "array",
 
509
     "description": "A list of known (social) media channels for this official.",
 
510
     "items": {
 
511
      "$ref": "Channel"
 
512
     }
 
513
    },
 
514
    "emails": {
 
515
     "type": "array",
 
516
     "description": "The direct email addresses for the official.",
 
517
     "items": {
 
518
      "type": "string"
 
519
     }
 
520
    },
 
521
    "name": {
 
522
     "type": "string",
 
523
     "description": "The official's name."
 
524
    },
 
525
    "party": {
 
526
     "type": "string",
 
527
     "description": "The full name of the party the official belongs to."
 
528
    },
 
529
    "phones": {
 
530
     "type": "array",
 
531
     "description": "The official's public contact phone numbers.",
 
532
     "items": {
 
533
      "type": "string"
 
534
     }
 
535
    },
 
536
    "photoUrl": {
 
537
     "type": "string",
 
538
     "description": "A URL for a photo of the official."
 
539
    },
 
540
    "urls": {
 
541
     "type": "array",
 
542
     "description": "The official's public website URLs.",
 
543
     "items": {
 
544
      "type": "string"
 
545
     }
 
546
    }
 
547
   }
 
548
  },
 
549
  "PollingLocation": {
 
550
   "id": "PollingLocation",
 
551
   "type": "object",
 
552
   "description": "A location where a voter can vote. This may be an early vote site, an election day voting location, or a drop off location for a completed ballot.",
 
553
   "properties": {
 
554
    "address": {
 
555
     "$ref": "SimpleAddressType",
 
556
     "description": "The address of the location."
 
557
    },
 
558
    "endDate": {
 
559
     "type": "string",
 
560
     "description": "The last date that this early vote site or drop off location may be used. This field is not populated for polling locations."
 
561
    },
 
562
    "id": {
 
563
     "type": "string",
 
564
     "description": "An ID for this object. IDs may change in future requests and should not be cached. Access to this field requires special access that can be requested from the Request more link on the Quotas page."
 
565
    },
 
566
    "name": {
 
567
     "type": "string",
 
568
     "description": "The name of the early vote site or drop off location. This field is not populated for polling locations."
 
569
    },
 
570
    "notes": {
 
571
     "type": "string",
 
572
     "description": "Notes about this location (e.g. accessibility ramp or entrance to use)."
 
573
    },
 
574
    "pollingHours": {
 
575
     "type": "string",
 
576
     "description": "A description of when this location is open."
 
577
    },
 
578
    "sources": {
 
579
     "type": "array",
 
580
     "description": "A list of sources for this location. If multiple sources are listed the data has been aggregated from those sources.",
 
581
     "items": {
 
582
      "$ref": "Source"
 
583
     }
 
584
    },
 
585
    "startDate": {
 
586
     "type": "string",
 
587
     "description": "The first date that this early vote site or drop off location may be used. This field is not populated for polling locations."
 
588
    },
 
589
    "voterServices": {
 
590
     "type": "string",
 
591
     "description": "The services provided by this early vote site or drop off location. This field is not populated for polling locations."
 
592
    }
 
593
   }
 
594
  },
 
595
  "RepresentativeInfoRequest": {
 
596
   "id": "RepresentativeInfoRequest",
 
597
   "type": "object",
 
598
   "description": "A request for political geography and representative information for an address.",
 
599
   "properties": {
 
600
    "address": {
 
601
     "type": "string",
 
602
     "description": "The address to look up. May only be specified if the field ocdId is not given in the URL."
 
603
    }
 
604
   }
 
605
  },
 
606
  "RepresentativeInfoResponse": {
 
607
   "id": "RepresentativeInfoResponse",
 
608
   "type": "object",
 
609
   "description": "The result of a representative info lookup query.",
 
610
   "properties": {
 
611
    "divisions": {
 
612
     "type": "object",
 
613
     "description": "Political geographic divisions that contain the requested address.",
 
614
     "additionalProperties": {
 
615
      "$ref": "GeographicDivision",
 
616
      "description": "The unique Open Civic Data identifier for this division."
 
617
     }
 
618
    },
 
619
    "kind": {
 
620
     "type": "string",
 
621
     "description": "Identifies what kind of resource this is. Value: the fixed string \"civicinfo#representativeInfoResponse\".",
 
622
     "default": "civicinfo#representativeInfoResponse"
 
623
    },
 
624
    "normalizedInput": {
 
625
     "$ref": "SimpleAddressType",
 
626
     "description": "The normalized version of the requested address"
 
627
    },
 
628
    "offices": {
 
629
     "type": "object",
 
630
     "description": "Elected offices referenced by the divisions listed above. Will only be present if includeOffices was true in the request.",
 
631
     "additionalProperties": {
 
632
      "$ref": "Office",
 
633
      "description": "A unique identifier for this office, within the context of this request. Identifiers are *not* long-lived: the same office may get different IDs on different requests."
 
634
     }
 
635
    },
 
636
    "officials": {
 
637
     "type": "object",
 
638
     "description": "Officials holding the offices listed above. Will only be present if includeOffices was true in the request.",
 
639
     "additionalProperties": {
 
640
      "$ref": "Official",
 
641
      "description": "A unique identifier for this official, within the context of this request. Identifiers are *not* long-lived: the same official may get different IDs on different requests."
 
642
     }
 
643
    },
 
644
    "status": {
 
645
     "type": "string",
 
646
     "description": "The result of the request. One of: success, noStreetSegmentFound, addressUnparseable, noAddressParameter, multipleStreetSegmentsFound, electionOver, electionUnknown, internalLookupFailure, RequestedBothAddressAndOcdId"
 
647
    }
 
648
   }
 
649
  },
 
650
  "SimpleAddressType": {
 
651
   "id": "SimpleAddressType",
 
652
   "type": "object",
 
653
   "description": "A simple representation of an address.",
 
654
   "properties": {
 
655
    "city": {
 
656
     "type": "string",
 
657
     "description": "The city or town for the address."
 
658
    },
 
659
    "line1": {
 
660
     "type": "string",
 
661
     "description": "The street name and number of this address."
 
662
    },
 
663
    "line2": {
 
664
     "type": "string",
 
665
     "description": "The second line the address, if needed."
 
666
    },
 
667
    "line3": {
 
668
     "type": "string",
 
669
     "description": "The third line of the address, if needed."
 
670
    },
 
671
    "locationName": {
 
672
     "type": "string",
 
673
     "description": "The name of the location."
 
674
    },
 
675
    "state": {
 
676
     "type": "string",
 
677
     "description": "The US two letter state abbreviation of the address."
 
678
    },
 
679
    "zip": {
 
680
     "type": "string",
 
681
     "description": "The US Postal Zip Code of the address."
 
682
    }
 
683
   }
 
684
  },
 
685
  "Source": {
 
686
   "id": "Source",
 
687
   "type": "object",
 
688
   "description": "Contains information about the data source for the element containing it.",
 
689
   "properties": {
 
690
    "name": {
 
691
     "type": "string",
 
692
     "description": "The name of the data source."
 
693
    },
 
694
    "official": {
 
695
     "type": "boolean",
 
696
     "description": "Whether this data comes from an official government source."
 
697
    }
 
698
   }
 
699
  },
 
700
  "VoterInfoRequest": {
 
701
   "id": "VoterInfoRequest",
 
702
   "type": "object",
 
703
   "description": "A request for information about a voter.",
 
704
   "properties": {
 
705
    "address": {
 
706
     "type": "string",
 
707
     "description": "The registered address of the voter to look up."
 
708
    }
 
709
   }
 
710
  },
 
711
  "VoterInfoResponse": {
 
712
   "id": "VoterInfoResponse",
 
713
   "type": "object",
 
714
   "description": "The result of a voter info lookup query.",
 
715
   "properties": {
 
716
    "contests": {
 
717
     "type": "array",
 
718
     "description": "Contests that will appear on the voter's ballot.",
 
719
     "items": {
 
720
      "$ref": "Contest"
 
721
     }
 
722
    },
 
723
    "dropOffLocations": {
 
724
     "type": "array",
 
725
     "description": "Locations where a voter is eligible to drop off a completed ballot. The voter must have received and completed a ballot prior to arriving at the location. The location may not have ballots available on the premises. These locations could be open on or before election day as indicated in the pollingHours field.",
 
726
     "items": {
 
727
      "$ref": "PollingLocation"
 
728
     }
 
729
    },
 
730
    "earlyVoteSites": {
 
731
     "type": "array",
 
732
     "description": "Locations where the voter is eligible to vote early, prior to election day.",
 
733
     "items": {
 
734
      "$ref": "PollingLocation"
 
735
     }
 
736
    },
 
737
    "election": {
 
738
     "$ref": "Election",
 
739
     "description": "The election that was queried."
 
740
    },
 
741
    "kind": {
 
742
     "type": "string",
 
743
     "description": "Identifies what kind of resource this is. Value: the fixed string \"civicinfo#voterInfoResponse\".",
 
744
     "default": "civicinfo#voterInfoResponse"
 
745
    },
 
746
    "normalizedInput": {
 
747
     "$ref": "SimpleAddressType",
 
748
     "description": "The normalized version of the requested address"
 
749
    },
 
750
    "pollingLocations": {
 
751
     "type": "array",
 
752
     "description": "Locations where the voter is eligible to vote on election day.",
 
753
     "items": {
 
754
      "$ref": "PollingLocation"
 
755
     }
 
756
    },
 
757
    "precinctId": {
 
758
     "type": "string"
 
759
    },
 
760
    "state": {
 
761
     "type": "array",
 
762
     "description": "Local Election Information for the state that the voter votes in. For the US, there will only be one element in this array.",
 
763
     "items": {
 
764
      "$ref": "AdministrationRegion"
 
765
     }
 
766
    },
 
767
    "status": {
 
768
     "type": "string",
 
769
     "description": "The result of the request. One of: success, noStreetSegmentFound, addressUnparseable, noAddressParameter, multipleStreetSegmentsFound, electionOver, electionUnknown, internalLookupFailure"
 
770
    }
 
771
   }
 
772
  }
 
773
 },
 
774
 "resources": {
 
775
  "divisions": {
 
776
   "methods": {
 
777
    "search": {
 
778
     "id": "civicinfo.divisions.search",
 
779
     "path": "representatives/division_search",
 
780
     "httpMethod": "GET",
 
781
     "description": "Searches for political divisions by their natural name or OCD ID.",
 
782
     "parameters": {
 
783
      "query": {
 
784
       "type": "string",
 
785
       "description": "The search query. Queries can cover any parts of a OCD ID or a human readable division name. All words given in the query are treated as required patterns. In addition to that, most query operators of the Apache Lucene library are supported. See http://lucene.apache.org/core/2_9_4/queryparsersyntax.html",
 
786
       "location": "query"
 
787
      }
 
788
     },
 
789
     "response": {
 
790
      "$ref": "DivisionSearchResponse"
 
791
     }
 
792
    }
 
793
   }
 
794
  },
 
795
  "elections": {
 
796
   "methods": {
 
797
    "electionQuery": {
 
798
     "id": "civicinfo.elections.electionQuery",
 
799
     "path": "elections",
 
800
     "httpMethod": "GET",
 
801
     "description": "List of available elections to query.",
 
802
     "response": {
 
803
      "$ref": "ElectionsQueryResponse"
 
804
     }
 
805
    },
 
806
    "voterInfoQuery": {
 
807
     "id": "civicinfo.elections.voterInfoQuery",
 
808
     "path": "voterinfo/{electionId}/lookup",
 
809
     "httpMethod": "POST",
 
810
     "description": "Looks up information relevant to a voter based on the voter's registered address.",
 
811
     "parameters": {
 
812
      "electionId": {
 
813
       "type": "string",
 
814
       "description": "The unique ID of the election to look up. A list of election IDs can be obtained at https://www.googleapis.com/civicinfo/{version}/elections",
 
815
       "required": true,
 
816
       "format": "int64",
 
817
       "location": "path"
 
818
      },
 
819
      "officialOnly": {
 
820
       "type": "boolean",
 
821
       "description": "If set to true, only data from official state sources will be returned.",
 
822
       "default": "false",
 
823
       "location": "query"
 
824
      }
 
825
     },
 
826
     "parameterOrder": [
 
827
      "electionId"
 
828
     ],
 
829
     "request": {
 
830
      "$ref": "VoterInfoRequest"
 
831
     },
 
832
     "response": {
 
833
      "$ref": "VoterInfoResponse"
 
834
     }
 
835
    }
 
836
   }
 
837
  },
 
838
  "representatives": {
 
839
   "methods": {
 
840
    "representativeInfoQuery": {
 
841
     "id": "civicinfo.representatives.representativeInfoQuery",
 
842
     "path": "representatives/lookup",
 
843
     "httpMethod": "POST",
 
844
     "description": "Looks up political geography and representative information based on an address or Open Civic Data division identifier.",
 
845
     "parameters": {
 
846
      "includeOffices": {
 
847
       "type": "boolean",
 
848
       "description": "Whether to return information about offices and officials. If false, only the top-level district information will be returned.",
 
849
       "default": "true",
 
850
       "location": "query"
 
851
      },
 
852
      "ocdId": {
 
853
       "type": "string",
 
854
       "description": "The division to look up. May only be specified if the address field is not given in the request body.",
 
855
       "location": "query"
 
856
      },
 
857
      "recursive": {
 
858
       "type": "boolean",
 
859
       "description": "When ocd_id is supplied, return all divisions which are hierarchically nested within the queried division. For example, if querying ocd-division/country:us/district:dc, this would also return all DC's wards and ANCs.",
 
860
       "default": "false",
 
861
       "location": "query"
 
862
      }
 
863
     },
 
864
     "request": {
 
865
      "$ref": "RepresentativeInfoRequest"
 
866
     },
 
867
     "response": {
 
868
      "$ref": "RepresentativeInfoResponse"
 
869
     }
 
870
    }
 
871
   }
 
872
  }
 
873
 }
 
874
}