Skip to content

Commit

Permalink
feat: Automated regeneration of CivicInfo client (#10809)
Browse files Browse the repository at this point in the history
Auto-created at 2024-03-12 01:16:51 +0000 using the toys pull request generator.
  • Loading branch information
yoshi-code-bot authored Mar 12, 2024
1 parent 7ad2cfb commit c829691
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 160 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ defmodule GoogleApi.CivicInfo.V2.Api.Elections do
* `:quotaUser` (*type:* `String.t`) - 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.
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
* `:productionDataOnly` (*type:* `boolean()`) - Whether to include data that has not been allowlisted yet
* `opts` (*type:* `keyword()`) - Call options
## Returns
Expand All @@ -67,7 +68,8 @@ defmodule GoogleApi.CivicInfo.V2.Api.Elections do
:prettyPrint => :query,
:quotaUser => :query,
:uploadType => :query,
:upload_protocol => :query
:upload_protocol => :query,
:productionDataOnly => :query
}

request =
Expand Down Expand Up @@ -103,6 +105,7 @@ defmodule GoogleApi.CivicInfo.V2.Api.Elections do
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
* `:electionId` (*type:* `String.t`) - 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. If no election ID is specified in the query and there is more than one election with data for the given voter, the additional elections are provided in the otherElections response field.
* `:officialOnly` (*type:* `boolean()`) - If set to true, only data from official state sources will be returned.
* `:productionDataOnly` (*type:* `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.
* `:returnAllAvailableData` (*type:* `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.
* `opts` (*type:* `keyword()`) - Call options
Expand Down Expand Up @@ -131,6 +134,7 @@ defmodule GoogleApi.CivicInfo.V2.Api.Elections do
:upload_protocol => :query,
:electionId => :query,
:officialOnly => :query,
:productionDataOnly => :query,
:returnAllAvailableData => :query
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule GoogleApi.CivicInfo.V2 do
API client metadata for GoogleApi.CivicInfo.V2.
"""

@discovery_revision "20220516"
@discovery_revision "20240305"

def discovery_revision(), do: @discovery_revision
end
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ defmodule GoogleApi.CivicInfo.V2.Model.Contest do
* `numberVotingFor` (*type:* `String.t`, *default:* `nil`) - The number of candidates that a voter may vote for in this contest.
* `office` (*type:* `String.t`, *default:* `nil`) - The name of the office for this contest.
* `primaryParties` (*type:* `list(String.t)`, *default:* `nil`) - If this is a partisan election, the name of the party/parties it is for.
* `primaryParty` (*type:* `String.t`, *default:* `nil`) - [DEPRECATED] If this is a partisan election, the name of the party it is for. This field as deprecated in favor of the array "primaryParties", as contests may contain more than one party.
* `referendumBallotResponses` (*type:* `list(String.t)`, *default:* `nil`) - The set of ballot responses for the referendum. A ballot response represents a line on the ballot. Common examples might include "yes" or "no" for referenda. This field is only populated for contests of type 'Referendum'.
* `referendumBrief` (*type:* `String.t`, *default:* `nil`) - Specifies a short summary of the referendum that is typically on the ballot below the title but above the text. This field is only populated for contests of type 'Referendum'.
* `referendumConStatement` (*type:* `String.t`, *default:* `nil`) - A statement in opposition to the referendum. It does not necessarily appear on the ballot. This field is only populated for contests of type 'Referendum'.
Expand Down Expand Up @@ -61,7 +60,6 @@ defmodule GoogleApi.CivicInfo.V2.Model.Contest do
:numberVotingFor => String.t() | nil,
:office => String.t() | nil,
:primaryParties => list(String.t()) | nil,
:primaryParty => String.t() | nil,
:referendumBallotResponses => list(String.t()) | nil,
:referendumBrief => String.t() | nil,
:referendumConStatement => String.t() | nil,
Expand All @@ -88,7 +86,6 @@ defmodule GoogleApi.CivicInfo.V2.Model.Contest do
field(:numberVotingFor)
field(:office)
field(:primaryParties, type: :list)
field(:primaryParty)
field(:referendumBallotResponses, type: :list)
field(:referendumBrief)
field(:referendumConStatement)
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ defmodule GoogleApi.CivicInfo.V2.Model.Official do
* `address` (*type:* `list(GoogleApi.CivicInfo.V2.Model.SimpleAddressType.t)`, *default:* `nil`) - Addresses at which to contact the official.
* `channels` (*type:* `list(GoogleApi.CivicInfo.V2.Model.Channel.t)`, *default:* `nil`) - A list of known (social) media channels for this official.
* `emails` (*type:* `list(String.t)`, *default:* `nil`) - The direct email addresses for the official.
* `geocodingSummaries` (*type:* `list(GoogleApi.CivicInfo.V2.Model.GeocodingSummary.t)`, *default:* `nil`) - Detailed summary about the official's address's geocoding
* `name` (*type:* `String.t`, *default:* `nil`) - The official's name.
* `party` (*type:* `String.t`, *default:* `nil`) - The full name of the party the official belongs to.
* `phones` (*type:* `list(String.t)`, *default:* `nil`) - The official's public contact phone numbers.
Expand All @@ -38,7 +37,6 @@ defmodule GoogleApi.CivicInfo.V2.Model.Official do
:address => list(GoogleApi.CivicInfo.V2.Model.SimpleAddressType.t()) | nil,
:channels => list(GoogleApi.CivicInfo.V2.Model.Channel.t()) | nil,
:emails => list(String.t()) | nil,
:geocodingSummaries => list(GoogleApi.CivicInfo.V2.Model.GeocodingSummary.t()) | nil,
:name => String.t() | nil,
:party => String.t() | nil,
:phones => list(String.t()) | nil,
Expand All @@ -49,7 +47,6 @@ defmodule GoogleApi.CivicInfo.V2.Model.Official do
field(:address, as: GoogleApi.CivicInfo.V2.Model.SimpleAddressType, type: :list)
field(:channels, as: GoogleApi.CivicInfo.V2.Model.Channel, type: :list)
field(:emails, type: :list)
field(:geocodingSummaries, as: GoogleApi.CivicInfo.V2.Model.GeocodingSummary, type: :list)
field(:name)
field(:party)
field(:phones, type: :list)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ defmodule GoogleApi.CivicInfo.V2.Model.VoterInfoResponse do
* `otherElections` (*type:* `list(GoogleApi.CivicInfo.V2.Model.Election.t)`, *default:* `nil`) - When there are multiple elections for a voter address, the otherElections field is populated in the API response and there are two possibilities: 1. If the earliest election is not the intended election, specify the election ID of the desired election in a second API request using the electionId field. 2. If these elections occur on the same day, the API doesn?t return any polling location, contest, or election official information to ensure that an additional query is made. For user-facing applications, we recommend displaying these elections to the user to disambiguate. A second API request using the electionId field should be made for the election that is relevant to the user.
* `pollingLocations` (*type:* `list(GoogleApi.CivicInfo.V2.Model.PollingLocation.t)`, *default:* `nil`) - Locations where the voter is eligible to vote on election day.
* `precinctId` (*type:* `String.t`, *default:* `nil`) -
* `precincts` (*type:* `list(GoogleApi.CivicInfo.V2.Model.Precinct.t)`, *default:* `nil`) - The precincts that match this voter's address. Will only be returned for project IDs which have been whitelisted as "partner projects".
* `precincts` (*type:* `list(GoogleApi.CivicInfo.V2.Model.Precinct.t)`, *default:* `nil`) - The precincts that match this voter's address. Will only be returned for project IDs which have been allowlisted as "partner projects".
* `state` (*type:* `list(GoogleApi.CivicInfo.V2.Model.AdministrationRegion.t)`, *default:* `nil`) - Local Election Information for the state that the voter votes in. For the US, there will only be one element in this array.
"""

Expand Down

0 comments on commit c829691

Please sign in to comment.