Skip to content

Commit

Permalink
feat(civicinfo): update the API
Browse files Browse the repository at this point in the history
#### civicinfo:v2

The following keys were added:
- resources.elections.methods.electionQuery.parameters.productionDataOnly.default
- resources.elections.methods.electionQuery.parameters.productionDataOnly.description
- resources.elections.methods.electionQuery.parameters.productionDataOnly.location
- resources.elections.methods.electionQuery.parameters.productionDataOnly.type
- resources.elections.methods.voterInfoQuery.parameters.productionDataOnly.default
- resources.elections.methods.voterInfoQuery.parameters.productionDataOnly.description
- resources.elections.methods.voterInfoQuery.parameters.productionDataOnly.location
- resources.elections.methods.voterInfoQuery.parameters.productionDataOnly.type

The following keys were changed:
- schemas.VoterInfoResponse.properties.precincts.description
  • Loading branch information
yoshi-automation authored and sofisl committed Jul 18, 2023
1 parent 9495bd6 commit 6215ccb
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 6 deletions.
19 changes: 16 additions & 3 deletions discovery/civicinfo-v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,14 @@
"httpMethod": "GET",
"id": "civicinfo.elections.electionQuery",
"parameterOrder": [],
"parameters": {},
"parameters": {
"productionDataOnly": {
"default": "true",
"description": "Whether to include data that has not been allowlisted yet",
"location": "query",
"type": "boolean"
}
},
"path": "civicinfo/v2/elections",
"response": {
"$ref": "ElectionsQueryResponse"
Expand Down Expand Up @@ -159,6 +166,12 @@
"location": "query",
"type": "boolean"
},
"productionDataOnly": {
"default": "true",
"description": "Whether to include data that has not been vetted yet. Should only be made available to internal IPs or trusted partners. This is a non-discoverable parameter in the One Platform API config.",
"location": "query",
"type": "boolean"
},
"returnAllAvailableData": {
"default": "false",
"description": "If set to true, the query will return the success code and include any partial information when it is unable to determine a matching address or unable to determine the election for electionId=0 queries.",
Expand Down Expand Up @@ -352,7 +365,7 @@
}
}
},
"revision": "20230606",
"revision": "20230711",
"rootUrl": "https://civicinfo.googleapis.com/",
"schemas": {
"AdministrationRegion": {
Expand Down Expand Up @@ -1341,7 +1354,7 @@
"type": "string"
},
"precincts": {
"description": "The precincts that match this voter's address. Will only be returned for project IDs which have been whitelisted as \"partner projects\".",
"description": "The precincts that match this voter's address. Will only be returned for project IDs which have been allowlisted as \"partner projects\".",
"items": {
"$ref": "Precinct"
},
Expand Down
20 changes: 17 additions & 3 deletions src/apis/civicinfo/v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ export namespace civicinfo_v2 {
pollingLocations?: Schema$PollingLocation[];
precinctId?: string | null;
/**
* The precincts that match this voter's address. Will only be returned for project IDs which have been whitelisted as "partner projects".
* The precincts that match this voter's address. Will only be returned for project IDs which have been allowlisted as "partner projects".
*/
precincts?: Schema$Precinct[];
/**
Expand Down Expand Up @@ -971,7 +971,10 @@ export namespace civicinfo_v2 {
* google.options({auth: authClient});
*
* // Do the magic
* const res = await civicinfo.elections.electionQuery({});
* const res = await civicinfo.elections.electionQuery({
* // Whether to include data that has not been allowlisted yet
* productionDataOnly: 'placeholder-value',
* });
* console.log(res.data);
*
* // Example response
Expand Down Expand Up @@ -1112,6 +1115,8 @@ export namespace civicinfo_v2 {
* electionId: 'placeholder-value',
* // If set to true, only data from official state sources will be returned.
* officialOnly: 'placeholder-value',
* // Whether to include data that has not been vetted yet. Should only be made available to internal IPs or trusted partners. This is a non-discoverable parameter in the One Platform API config.
* productionDataOnly: 'placeholder-value',
* // If set to true, the query will return the success code and include any partial information when it is unable to determine a matching address or unable to determine the election for electionId=0 queries.
* returnAllAvailableData: 'placeholder-value',
* });
Expand Down Expand Up @@ -1232,7 +1237,12 @@ export namespace civicinfo_v2 {
}

export interface Params$Resource$Elections$Electionquery
extends StandardParameters {}
extends StandardParameters {
/**
* Whether to include data that has not been allowlisted yet
*/
productionDataOnly?: boolean;
}
export interface Params$Resource$Elections$Voterinfoquery
extends StandardParameters {
/**
Expand All @@ -1247,6 +1257,10 @@ export namespace civicinfo_v2 {
* If set to true, only data from official state sources will be returned.
*/
officialOnly?: boolean;
/**
* Whether to include data that has not been vetted yet. Should only be made available to internal IPs or trusted partners. This is a non-discoverable parameter in the One Platform API config.
*/
productionDataOnly?: boolean;
/**
* If set to true, the query will return the success code and include any partial information when it is unable to determine a matching address or unable to determine the election for electionId=0 queries.
*/
Expand Down

0 comments on commit 6215ccb

Please sign in to comment.