Index: discovery/googleapis/civicinfo__v2.json |
diff --git a/discovery/googleapis/civicinfo__v1.json b/discovery/googleapis/civicinfo__v2.json |
similarity index 75% |
copy from discovery/googleapis/civicinfo__v1.json |
copy to discovery/googleapis/civicinfo__v2.json |
index c51d4c3b5140f0ebff5955d3583f8c30922463f3..83f9d617f85e61d00077d9525fad2d0ae5928d1d 100644 |
--- a/discovery/googleapis/civicinfo__v1.json |
+++ b/discovery/googleapis/civicinfo__v2.json |
@@ -1,17 +1,17 @@ |
{ |
- "basePath": "/civicinfo/v1/", |
- "baseUrl": "https://www.googleapis.com/civicinfo/v1/", |
+ "basePath": "/civicinfo/v2/", |
+ "baseUrl": "https://www.googleapis.com/civicinfo/v2/", |
"batchPath": "batch", |
"canonicalName": "Civic Info", |
"description": "An API for accessing civic information.", |
"discoveryVersion": "v1", |
"documentationLink": "https://developers.google.com/civic-information", |
- "etag": "\"uUWyYHXmEn-ab7WLvo8qNz2S8ws/E48KE0Nyeq0wTXpsQ1wBH_VLmVc\"", |
+ "etag": "\"uUWyYHXmEn-ab7WLvo8qNz2S8ws/YV4QnTSNnV4r4LSJ23wzwsBf0U0\"", |
"icons": { |
"x16": "http://www.google.com/images/icons/product/search-16.gif", |
"x32": "http://www.google.com/images/icons/product/search-32.gif" |
}, |
- "id": "civicinfo:v1", |
+ "id": "civicinfo:v2", |
"kind": "discovery#restDescription", |
"name": "civicinfo", |
"ownerDomain": "google.com", |
@@ -76,7 +76,7 @@ |
"type": "string" |
} |
}, |
- "path": "representatives/division_search", |
+ "path": "divisions", |
"response": { |
"$ref": "DivisionSearchResponse" |
} |
@@ -96,17 +96,23 @@ |
}, |
"voterInfoQuery": { |
"description": "Looks up information relevant to a voter based on the voter's registered address.", |
- "httpMethod": "POST", |
+ "httpMethod": "GET", |
"id": "civicinfo.elections.voterInfoQuery", |
"parameterOrder": [ |
- "electionId" |
+ "address" |
], |
"parameters": { |
+ "address": { |
+ "description": "The registered address of the voter to look up.", |
+ "location": "query", |
+ "required": true, |
+ "type": "string" |
+ }, |
"electionId": { |
+ "default": "0", |
"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", |
"format": "int64", |
- "location": "path", |
- "required": true, |
+ "location": "query", |
"type": "string" |
}, |
"officialOnly": { |
@@ -116,10 +122,7 @@ |
"type": "boolean" |
} |
}, |
- "path": "voterinfo/{electionId}/lookup", |
- "request": { |
- "$ref": "VoterInfoRequest" |
- }, |
+ "path": "voterinfo", |
"response": { |
"$ref": "VoterInfoResponse" |
} |
@@ -128,41 +131,177 @@ |
}, |
"representatives": { |
"methods": { |
- "representativeInfoQuery": { |
- "description": "Looks up political geography and representative information based on an address or Open Civic Data division identifier.", |
- "httpMethod": "POST", |
- "id": "civicinfo.representatives.representativeInfoQuery", |
+ "representativeInfoByAddress": { |
+ "description": "Looks up political geography and representative information for a single address.", |
+ "httpMethod": "GET", |
+ "id": "civicinfo.representatives.representativeInfoByAddress", |
"parameters": { |
+ "address": { |
+ "description": "The address to look up. May only be specified if the field ocdId is not given in the URL.", |
+ "location": "query", |
+ "type": "string" |
+ }, |
"includeOffices": { |
"default": "true", |
"description": "Whether to return information about offices and officials. If false, only the top-level district information will be returned.", |
"location": "query", |
"type": "boolean" |
}, |
- "ocdId": { |
- "description": "The division to look up. May only be specified if the address field is not given in the request body.", |
+ "levels": { |
+ "description": "A list of office levels to filter by. Only offices that serve at least one of these levels will be returned. Divisions that don't contain a matching office will not be returned.", |
+ "enum": [ |
+ "administrativeArea1", |
+ "administrativeArea2", |
+ "country", |
+ "international", |
+ "locality", |
+ "regional", |
+ "special", |
+ "subLocality1", |
+ "subLocality2" |
+ ], |
+ "enumDescriptions": [ |
+ "", |
+ "", |
+ "", |
+ "", |
+ "", |
+ "", |
+ "", |
+ "", |
+ "" |
+ ], |
+ "location": "query", |
+ "repeated": true, |
+ "type": "string" |
+ }, |
+ "roles": { |
+ "description": "A list of office roles to filter by. Only offices fulfilling one of these roles will be returned. Divisions that don't contain a matching office will not be returned.", |
+ "enum": [ |
+ "deputyHeadOfGovernment", |
+ "executiveCouncil", |
+ "governmentOfficer", |
+ "headOfGovernment", |
+ "headOfState", |
+ "highestCourtJudge", |
+ "judge", |
+ "legislatorLowerBody", |
+ "legislatorUpperBody", |
+ "schoolBoard", |
+ "specialPurposeOfficer" |
+ ], |
+ "enumDescriptions": [ |
+ "", |
+ "", |
+ "", |
+ "", |
+ "", |
+ "", |
+ "", |
+ "", |
+ "", |
+ "", |
+ "" |
+ ], |
"location": "query", |
+ "repeated": true, |
+ "type": "string" |
+ } |
+ }, |
+ "path": "representatives", |
+ "response": { |
+ "$ref": "RepresentativeInfoResponse" |
+ } |
+ }, |
+ "representativeInfoByDivision": { |
+ "description": "Looks up representative information for a single geographic division.", |
+ "httpMethod": "GET", |
+ "id": "civicinfo.representatives.representativeInfoByDivision", |
+ "parameterOrder": [ |
+ "ocdId" |
+ ], |
+ "parameters": { |
+ "levels": { |
+ "description": "A list of office levels to filter by. Only offices that serve at least one of these levels will be returned. Divisions that don't contain a matching office will not be returned.", |
+ "enum": [ |
+ "administrativeArea1", |
+ "administrativeArea2", |
+ "country", |
+ "international", |
+ "locality", |
+ "regional", |
+ "special", |
+ "subLocality1", |
+ "subLocality2" |
+ ], |
+ "enumDescriptions": [ |
+ "", |
+ "", |
+ "", |
+ "", |
+ "", |
+ "", |
+ "", |
+ "", |
+ "" |
+ ], |
+ "location": "query", |
+ "repeated": true, |
+ "type": "string" |
+ }, |
+ "ocdId": { |
+ "description": "The Open Civic Data division identifier of the division to look up.", |
+ "location": "path", |
+ "required": true, |
"type": "string" |
}, |
"recursive": { |
- "default": "false", |
- "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.", |
+ "description": "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's wards and ANCs.", |
"location": "query", |
"type": "boolean" |
+ }, |
+ "roles": { |
+ "description": "A list of office roles to filter by. Only offices fulfilling one of these roles will be returned. Divisions that don't contain a matching office will not be returned.", |
+ "enum": [ |
+ "deputyHeadOfGovernment", |
+ "executiveCouncil", |
+ "governmentOfficer", |
+ "headOfGovernment", |
+ "headOfState", |
+ "highestCourtJudge", |
+ "judge", |
+ "legislatorLowerBody", |
+ "legislatorUpperBody", |
+ "schoolBoard", |
+ "specialPurposeOfficer" |
+ ], |
+ "enumDescriptions": [ |
+ "", |
+ "", |
+ "", |
+ "", |
+ "", |
+ "", |
+ "", |
+ "", |
+ "", |
+ "", |
+ "" |
+ ], |
+ "location": "query", |
+ "repeated": true, |
+ "type": "string" |
} |
}, |
- "path": "representatives/lookup", |
- "request": { |
- "$ref": "RepresentativeInfoRequest" |
- }, |
+ "path": "representatives/{ocdId}", |
"response": { |
- "$ref": "RepresentativeInfoResponse" |
+ "$ref": "RepresentativeInfoData" |
} |
} |
} |
} |
}, |
- "revision": "20140918", |
+ "revision": "20140814", |
"rootUrl": "https://www.googleapis.com/", |
"schemas": { |
"AdministrationRegion": { |
@@ -347,8 +486,11 @@ |
"type": "string" |
}, |
"level": { |
- "description": "The level of office for this contest. One of: federal, state, county, city, other", |
- "type": "string" |
+ "description": "The levels of government of the office for this contest. 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 \"locality\" level, but also effectively at both \"administrative-area-2\" and \"administrative-area-1\".", |
+ "items": { |
+ "type": "string" |
+ }, |
+ "type": "array" |
}, |
"numberElected": { |
"description": "The number of candidates that will be elected to office in this contest.", |
@@ -380,6 +522,13 @@ |
"description": "A link to the referendum. This field is only populated for contests of type 'Referendum'.", |
"type": "string" |
}, |
+ "roles": { |
+ "description": "The roles which this office fulfills.", |
+ "items": { |
+ "type": "string" |
+ }, |
+ "type": "array" |
+ }, |
"sources": { |
"description": "A list of sources for this contest. If multiple sources are listed, the data has been aggregated from those sources.", |
"items": { |
@@ -412,10 +561,6 @@ |
"$ref": "DivisionSearchResult" |
}, |
"type": "array" |
- }, |
- "status": { |
- "description": "The result of the request. One of: success, addressUnparseable, noAddressParameter, internalLookupFailure", |
- "type": "string" |
} |
}, |
"type": "object" |
@@ -542,16 +687,13 @@ |
"description": "The name of the division.", |
"type": "string" |
}, |
- "officeIds": { |
- "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.", |
+ "officeIndices": { |
+ "description": "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.", |
"items": { |
- "type": "string" |
+ "format": "uint32", |
+ "type": "integer" |
}, |
"type": "array" |
- }, |
- "scope": { |
- "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", |
- "type": "string" |
} |
}, |
"type": "object" |
@@ -564,16 +706,27 @@ |
"description": "The OCD ID of the division with which this office is associated.", |
"type": "string" |
}, |
- "level": { |
- "description": "The level of this elected office. One of: federal, state, county, city, other", |
- "type": "string" |
+ "levels": { |
+ "description": "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 \"locality\" level, but also effectively at both \"administrative-area-2\" and \"administrative-area-1\".", |
+ "items": { |
+ "type": "string" |
+ }, |
+ "type": "array" |
}, |
"name": { |
"description": "The human-readable name of the office.", |
"type": "string" |
}, |
- "officialIds": { |
- "description": "List of keys in the officials object of people who presently hold this office.", |
+ "officialIndices": { |
+ "description": "List of indices in the officials array of people who presently hold this office.", |
+ "items": { |
+ "format": "uint32", |
+ "type": "integer" |
+ }, |
+ "type": "array" |
+ }, |
+ "roles": { |
+ "description": "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.", |
"items": { |
"type": "string" |
}, |
@@ -689,13 +842,30 @@ |
}, |
"type": "object" |
}, |
- "RepresentativeInfoRequest": { |
- "description": "A request for political geography and representative information for an address.", |
- "id": "RepresentativeInfoRequest", |
+ "RepresentativeInfoData": { |
+ "id": "RepresentativeInfoData", |
"properties": { |
- "address": { |
- "description": "The address to look up. May only be specified if the field ocdId is not given in the URL.", |
- "type": "string" |
+ "divisions": { |
+ "additionalProperties": { |
+ "$ref": "GeographicDivision", |
+ "description": "The unique Open Civic Data identifier for this division." |
+ }, |
+ "description": "Political geographic divisions that contain the requested address.", |
+ "type": "object" |
+ }, |
+ "offices": { |
+ "description": "Elected offices referenced by the divisions listed above. Will only be present if includeOffices was true in the request.", |
+ "items": { |
+ "$ref": "Office" |
+ }, |
+ "type": "array" |
+ }, |
+ "officials": { |
+ "description": "Officials holding the offices listed above. Will only be present if includeOffices was true in the request.", |
+ "items": { |
+ "$ref": "Official" |
+ }, |
+ "type": "array" |
} |
}, |
"type": "object" |
@@ -722,24 +892,18 @@ |
"description": "The normalized version of the requested address" |
}, |
"offices": { |
- "additionalProperties": { |
- "$ref": "Office", |
- "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." |
- }, |
"description": "Elected offices referenced by the divisions listed above. Will only be present if includeOffices was true in the request.", |
- "type": "object" |
+ "items": { |
+ "$ref": "Office" |
+ }, |
+ "type": "array" |
}, |
"officials": { |
- "additionalProperties": { |
- "$ref": "Official", |
- "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." |
- }, |
"description": "Officials holding the offices listed above. Will only be present if includeOffices was true in the request.", |
- "type": "object" |
- }, |
- "status": { |
- "description": "The result of the request. One of: success, noStreetSegmentFound, addressUnparseable, noAddressParameter, multipleStreetSegmentsFound, electionOver, electionUnknown, internalLookupFailure, RequestedBothAddressAndOcdId", |
- "type": "string" |
+ "items": { |
+ "$ref": "Official" |
+ }, |
+ "type": "array" |
} |
}, |
"type": "object" |
@@ -794,17 +958,6 @@ |
}, |
"type": "object" |
}, |
- "VoterInfoRequest": { |
- "description": "A request for information about a voter.", |
- "id": "VoterInfoRequest", |
- "properties": { |
- "address": { |
- "description": "The registered address of the voter to look up.", |
- "type": "string" |
- } |
- }, |
- "type": "object" |
- }, |
"VoterInfoResponse": { |
"description": "The result of a voter info lookup query.", |
"id": "VoterInfoResponse", |
@@ -836,6 +989,13 @@ |
"$ref": "SimpleAddressType", |
"description": "The normalized version of the requested address" |
}, |
+ "otherElections": { |
+ "description": "If no election ID was specified in the query, and there was more than one election with data for the given voter, this will contain information about the other elections that could apply.", |
+ "items": { |
+ "$ref": "Election" |
+ }, |
+ "type": "array" |
+ }, |
"pollingLocations": { |
"description": "Locations where the voter is eligible to vote on election day. For states with mail-in voting only, these locations will be nearby drop box locations. Drop box locations are free to the voter and may be used instead of placing the ballot in the mail.", |
"items": { |
@@ -843,22 +1003,21 @@ |
}, |
"type": "array" |
}, |
+ "precinctId": { |
+ "type": "string" |
+ }, |
"state": { |
"description": "Local Election Information for the state that the voter votes in. For the US, there will only be one element in this array.", |
"items": { |
"$ref": "AdministrationRegion" |
}, |
"type": "array" |
- }, |
- "status": { |
- "description": "The result of the request. One of: success, noStreetSegmentFound, addressUnparseable, noAddressParameter, multipleStreetSegmentsFound, electionOver, electionUnknown, internalLookupFailure", |
- "type": "string" |
} |
}, |
"type": "object" |
} |
}, |
- "servicePath": "civicinfo/v1/", |
+ "servicePath": "civicinfo/v2/", |
"title": "Google Civic Information API", |
- "version": "v1" |
+ "version": "v2" |
} |