votesmarttypes

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressGetCampaign

type AddressGetCampaign struct {
	Address struct {
		Candidate struct {
			Title      string `json:"title"`
			FirstName  string `json:"firstName"`
			MiddleName string `json:"middleName"`
			NickName   string `json:"nickName"`
			LastName   string `json:"lastName"`
			Suffix     string `json:"suffix"`
		} `json:"candidate"`
		Office MaybeList[OfficeAddress] `json:"office"`
	} `json:"address"`
}

AddressGetCampaign is the response message for Address.getCampaign. See http://api.votesmart.org/docs/Address.html for usage details.

func (AddressGetCampaign) Method

func (AddressGetCampaign) Method() string

type AddressGetCampaignByElection

type AddressGetCampaignByElection struct {
	Address struct {
		Office MaybeList[OfficeAddress] `json:"office"`
	} `json:"address"`
}

AddressGetCampaignByElection is the response message for Address.getCampaignByElection. See http://api.votesmart.org/docs/Address.html for usage details.

func (AddressGetCampaignByElection) Method

type AddressGetCampaignWebAddress

type AddressGetCampaignWebAddress struct {
	Webaddress struct {
		Candidate struct {
			Title      string `json:"title"`
			FirstName  string `json:"firstName"`
			MiddleName string `json:"middleName"`
			NickName   string `json:"nickName"`
			LastName   string `json:"lastName"`
			Suffix     string `json:"suffix"`
		} `json:"candidate"`
		Address MaybeList[WebAddress] `json:"address"`
	} `json:"webaddress"`
}

AddressGetCampaignWebAddress is the response message for Address.getCampaignWebAddress. See http://api.votesmart.org/docs/Address.html for usage details.

func (AddressGetCampaignWebAddress) Method

type BioAdditional

type BioAdditional struct {
	Item MaybeList[BioAdditionalItem] `json:"item"`
}

type BioAdditionalItem

type BioAdditionalItem struct {
	Name string `json:"name"`
	Data string `json:"data"`
}

type BioEducation

type BioEducation struct {
	Institution MaybeList[BioEducationInstitution] `json:"institution"`
}

type BioEducationInstitution

type BioEducationInstitution struct {
	Degree   string `json:"degree"`
	Field    string `json:"field"`
	School   string `json:"school"`
	Span     string `json:"span"`
	Gpa      string `json:"gpa"`
	FullText string `json:"fullText"`
}

type BioElection

type BioElection struct {
	Office     string `json:"office"`
	OfficeType string `json:"officeType"`
	Parties    string `json:"parties"`
	District   string `json:"district"`
	DistrictID string `json:"districtId"`
	StateID    string `json:"stateId"`
	Status     string `json:"status"`
	BallotName string `json:"ballotName"`
}

type BioItem

type BioItem struct {
	Experience MaybeList[BioItemExperience] `json:"experience"`
}

type BioItemExperience

type BioItemExperience struct {
	Title        string `json:"title"`
	Organization string `json:"organization"`
	Span         string `json:"span"`
	Special      string `json:"special"`
	District     string `json:"district"`
	FullText     string `json:"fullText"`
}

type BioOffice

type BioOffice struct {
	Name       []string `json:"name"`
	Parties    string   `json:"parties"`
	Title      string   `json:"title"`
	ShortTitle string   `json:"shortTitle"`
	Type       string   `json:"type"`
	Status     string   `json:"status"`
	FirstElect string   `json:"firstElect"`
	LastElect  string   `json:"lastElect"`
	NextElect  string   `json:"nextElect"`
	TermStart  string   `json:"termStart"`
	TermEnd    string   `json:"termEnd"`
	District   string   `json:"district"`
	DistrictID string   `json:"districtId"`
	StateID    string   `json:"stateId"`
}

type Candidate

type Candidate struct {
	CandidateID          string `json:"candidateId"`
	FirstName            string `json:"firstName"`
	NickName             string `json:"nickName"`
	MiddleName           string `json:"middleName"`
	PreferredName        string `json:"preferredName"`
	LastName             string `json:"lastName"`
	Suffix               string `json:"suffix"`
	Title                string `json:"title"`
	BallotName           string `json:"ballotName"`
	ElectionParties      string `json:"electionParties"`
	ElectionStatus       string `json:"electionStatus"`
	ElectionStage        string `json:"electionStage"`
	ElectionDistrictID   string `json:"electionDistrictId"`
	ElectionDistrictName string `json:"electionDistrictName"`
	ElectionOffice       string `json:"electionOffice"`
	ElectionOfficeID     string `json:"electionOfficeId"`
	ElectionStateID      string `json:"electionStateId"`
	ElectionOfficeTypeID string `json:"electionOfficeTypeId"`
	ElectionYear         string `json:"electionYear"`
	ElectionSpecial      string `json:"electionSpecial"`
	ElectionDate         string `json:"electionDate"`
	OfficeParties        string `json:"officeParties"`
	OfficeStatus         string `json:"officeStatus"`
	OfficeDistrictID     string `json:"officeDistrictId"`
	OfficeDistrictName   string `json:"officeDistrictName"`
	OfficeStateID        string `json:"officeStateId"`
	OfficeID             string `json:"officeId"`
	OfficeName           string `json:"officeName"`
	OfficeTypeID         string `json:"officeTypeId"`
	RunningMateID        string `json:"runningMateId"`
	RunningMateName      string `json:"runningMateName"`
}

type CandidateBioGetAdditionalBio

type CandidateBioGetAdditionalBio struct {
	AddlBio struct {
		Candidate struct {
			ShortTitle string `json:"shortTitle"`
			FirstName  string `json:"firstName"`
			NickName   string `json:"nickName"`
			MiddleName string `json:"middleName"`
			LastName   string `json:"lastName"`
			Suffix     string `json:"suffix"`
		} `json:"candidate"`
		Additional MaybeList[BioAdditional] `json:"additional"`
	} `json:"addlBio"`
}

CandidateBioGetAdditionalBio is the response message for CandidateBio.getAddlBio. See http://api.votesmart.org/docs/CandidateBio for usage details.

func (CandidateBioGetAdditionalBio) Method

type CandidateBioGetBio

type CandidateBioGetBio struct {
	Bio struct {
		Candidate struct {
			CandidateID   string `json:"candidateId"`
			CrpID         string `json:"crpId"`
			Photo         string `json:"photo"`
			FirstName     string `json:"firstName"`
			NickName      string `json:"nickName"`
			MiddleName    string `json:"middleName"`
			PreferredName string `json:"preferredName"`
			LastName      string `json:"lastName"`
			Suffix        string `json:"suffix"`
			BirthDate     string `json:"birthDate"`
			BirthPlace    string `json:"birthPlace"`
			Pronunciation string `json:"pronunciation"`
			Gender        string `json:"gender"`
			Family        string `json:"family"`
			HomeCity      string `json:"homeCity"`
			HomeState     string `json:"homeState"`
			Religion      string `json:"religion"`
			SpecialMsg    string `json:"specialMsg"`
		} `json:"candidate"`
		Office   MaybeList[BioOffice]   `json:"office"`
		Election MaybeList[BioElection] `json:"election"`
	} `json:"bio"`
}

CandidateBioGetBio is the response message for CandidateBio.getBio. See http://api.votesmart.org/docs/CandidateBio for usage details.

func (CandidateBioGetBio) Method

func (CandidateBioGetBio) Method() string

type CandidateBioGetDetailedBio

type CandidateBioGetDetailedBio struct {
	Bio struct {
		Candidate struct {
			CandidateID    string                  `json:"candidateId"`
			CrpID          string                  `json:"crpId"`
			Photo          string                  `json:"photo"`
			FirstName      string                  `json:"firstName"`
			NickName       string                  `json:"nickName"`
			MiddleName     string                  `json:"middleName"`
			PreferredName  string                  `json:"preferredName"`
			LastName       string                  `json:"lastName"`
			Suffix         string                  `json:"suffix"`
			BirthDate      string                  `json:"birthDate"`
			BirthPlace     string                  `json:"birthPlace"`
			Pronunciation  string                  `json:"pronunciation"`
			Gender         string                  `json:"gender"`
			Family         string                  `json:"family"`
			HomeCity       string                  `json:"homeCity"`
			HomeState      string                  `json:"homeState"`
			Education      MaybeList[BioEducation] `json:"education"`
			Profession     MaybeList[BioItem]      `json:"profession"`
			Political      MaybeList[BioItem]      `json:"political"`
			CongMembership MaybeList[BioItem]      `json:"congMembership"`
			OrgMembership  MaybeList[BioItem]      `json:"orgMembership"`
			Religion       string                  `json:"religion"`
			SpecialMsg     string                  `json:"specialMsg"`
		} `json:"candidate"`
		Office   MaybeList[BioOffice]   `json:"office"`
		Election MaybeList[BioElection] `json:"election"`
	} `json:"bio"`
}

CandidateBioGetDetailedBio is the response message for CandidateBio.getDetailedBio. See http://api.votesmart.org/docs/CandidateBio for usage details.

func (CandidateBioGetDetailedBio) Method

type CandidatesGetByDistrict

type CandidatesGetByDistrict struct {
	CandidateList struct {
		Candidate MaybeList[Candidate] `json:"candidate"`
	} `json:"candidateList"`
}

CandidatesGetByDistrict is the response message for Candidates.getByDistrict. See http://api.votesmart.org/docs/Candidates.html for usage details.

func (CandidatesGetByDistrict) Method

type CandidatesGetByElection

type CandidatesGetByElection struct {
	CandidateList struct {
		Candidate MaybeList[Candidate] `json:"candidate"`
	} `json:"candidateList"`
}

CandidatesGetByElection is the response message for Candidates.getByElection. See http://api.votesmart.org/docs/Candidates.html for usage details.

func (CandidatesGetByElection) Method

type CandidatesGetByLastname

type CandidatesGetByLastname struct {
	CandidateList struct {
		Candidate MaybeList[Candidate] `json:"candidate"`
	} `json:"candidateList"`
}

CandidatesGetByLastname is the response message for Candidates.getByLastname. See http://api.votesmart.org/docs/Candidates.html for usage details.

func (CandidatesGetByLastname) Method

type CandidatesGetByLevenshtein

type CandidatesGetByLevenshtein struct {
	CandidateList struct {
		Candidate MaybeList[Candidate] `json:"candidate"`
	} `json:"candidateList"`
}

CandidatesGetByLevenshtein is the response message for Candidates.getByLevenshtein. See http://api.votesmart.org/docs/Candidates.html for usage details.

func (CandidatesGetByLevenshtein) Method

type CandidatesGetByOfficeState

type CandidatesGetByOfficeState struct {
	CandidateList struct {
		Candidate MaybeList[Candidate] `json:"candidate"`
	} `json:"candidateList"`
}

CandidatesGetByOfficeState is the response message for Candidates.getByOfficeState. See http://api.votesmart.org/docs/Candidates.html for usage details.

func (CandidatesGetByOfficeState) Method

type CandidatesGetByOfficeTypeState

type CandidatesGetByOfficeTypeState struct {
	CandidateList struct {
		Candidate MaybeList[Candidate] `json:"candidate"`
	} `json:"candidateList"`
}

CandidatesGetByOfficeTypeState is the response message for Candidates.getByOfficeTypeState. See http://api.votesmart.org/docs/Candidates.html for usage details.

func (CandidatesGetByOfficeTypeState) Method

type CandidatesGetByZip

type CandidatesGetByZip struct {
	CandidateList struct {
		ZipMessage string               `json:"zipMessage"`
		Candidate  MaybeList[Candidate] `json:"candidate"`
	} `json:"candidateList"`
}

CandidatesGetByZip is the response message for Candidates.getByZip. See http://api.votesmart.org/docs/Candidates.html for usage details.

func (CandidatesGetByZip) Method

func (CandidatesGetByZip) Method() string

type CommitteeGetCommittee

type CommitteeGetCommittee struct {
	Committee struct {
		CommitteeID     string `json:"committeeId"`
		ParentID        string `json:"parentId"`
		StateID         string `json:"stateId"`
		CommitteeTypeID string `json:"committeeTypeId"`
		Name            string `json:"name"`
		Jurisdiction    string `json:"jurisdiction"`
		Contact         struct {
			Address1     string `json:"address1"`
			Address2     string `json:"address2"`
			City         string `json:"city"`
			State        string `json:"state"`
			Zip          string `json:"zip"`
			Phone        string `json:"phone"`
			Fax          string `json:"fax"`
			Email        string `json:"email"`
			URL          string `json:"url"`
			StaffContact string `json:"staffContact"`
		} `json:"contact"`
	} `json:"committee"`
}

CommitteeGetCommittee is the response message for Committee.getCommittee. See http://api.votesmart.org/docs/Committee.html for usage details.

func (CommitteeGetCommittee) Method

func (CommitteeGetCommittee) Method() string

type CommitteeGetCommitteeMembers

type CommitteeGetCommitteeMembers struct {
	CommitteeMembers struct {
		Committee struct {
			CommitteeID string `json:"committeeId"`
			ParentID    string `json:"parentId"`
			Name        string `json:"name"`
		} `json:"committee"`
		Member []struct {
			CandidateID string `json:"candidateId"`
			Title       string `json:"title"`
			FirstName   string `json:"firstName"`
			MiddleName  string `json:"middleName"`
			LastName    string `json:"lastName"`
			Suffix      string `json:"suffix"`
			Party       string `json:"party"`
			Position    string `json:"position"`
		} `json:"member"`
	} `json:"committeeMembers"`
}

CommitteeGetCommitteeMembers is the response message for Committee.getCommitteeMembers. See http://api.votesmart.org/docs/Committee.html for usage details.

func (CommitteeGetCommitteeMembers) Method

type CommitteeGetCommitteesByTypeState

type CommitteeGetCommitteesByTypeState struct {
	Committees struct {
		Committee []struct {
			CommitteeID     string `json:"committeeId"`
			ParentID        string `json:"parentId"`
			StateID         string `json:"stateId"`
			CommitteetypeID string `json:"committeetypeId"`
			Name            string `json:"name"`
		} `json:"committee"`
	} `json:"committees"`
}

CommitteeGetCommitteesByTypeState is the response message for Committee.getCommitteesByTypeState. See http://api.votesmart.org/docs/Committee.html for usage details.

func (CommitteeGetCommitteesByTypeState) Method

type CommitteeGetTypes

type CommitteeGetTypes struct {
	CommitteeTypes struct {
		Type []struct {
			CommitteeTypeID string `json:"committeeTypeId"`
			Name            string `json:"name"`
		} `json:"type"`
	} `json:"committeeTypes"`
}

CommitteeGetTypes is the response message for Committee.getTypes. See http://api.votesmart.org/docs/Committee.html for usage details.

func (CommitteeGetTypes) Method

func (CommitteeGetTypes) Method() string

type District

type District struct {
	DistrictID string `json:"districtId"`
	Name       string `json:"name"`
	OfficeID   string `json:"officeId"`
	StateID    string `json:"stateId"`
}

type DistrictGetByOfficeState

type DistrictGetByOfficeState struct {
	DistrictList struct {
		District []District `json:"district"`
	} `json:"districtList"`
}

DistrictGetByOfficeState is the response message for District.getByOfficeState. See http://api.votesmart.org/docs/District.html for usage details.

func (DistrictGetByOfficeState) Method

type DistrictGetByZip

type DistrictGetByZip struct {
	DistrictList struct {
		ZipMessage        string     `json:"zipMessage"`
		District          []District `json:"district"`
		ElectionDistricts struct {
			District MaybeList[District] `json:"district"`
		} `json:"electionDistricts"`
	} `json:"districtList"`
}

DistrictGetByZip is the response message for District.getByZip. See http://api.votesmart.org/docs/District.html for usage details.

func (DistrictGetByZip) Method

func (DistrictGetByZip) Method() string

type Election

type Election struct {
	ElectionID   string           `json:"electionId"`
	Name         string           `json:"name"`
	StateID      string           `json:"stateId"`
	OfficeTypeID string           `json:"officeTypeId"`
	Special      string           `json:"special"`
	ElectionYear string           `json:"electionYear"`
	Stage        MaybeList[Stage] `json:"stage"`
}

type ElectionGetElection

type ElectionGetElection struct {
	Elections struct {
		Election MaybeList[Election] `json:"election"`
	} `json:"elections"`
}

ElectionGetElection is the response message for Election.getElection. See http://api.votesmart.org/docs/Election.html for usage details.

func (ElectionGetElection) Method

func (ElectionGetElection) Method() string

type ElectionGetElectionByYearState

type ElectionGetElectionByYearState struct {
	Elections struct {
		Election MaybeList[Election] `json:"election"`
	} `json:"elections"`
}

ElectionGetElectionByYearState is the response message for Election.getElectionByYearState. See http://api.votesmart.org/docs/Election.html for usage details.

func (ElectionGetElectionByYearState) Method

type ElectionGetElectionByZip

type ElectionGetElectionByZip struct {
	Elections struct {
		Election MaybeList[Election] `json:"election"`
	} `json:"elections"`
}

ElectionGetElectionByZip is the response message for Election.getElectionByZip. See http://api.votesmart.org/docs/Election.html for usage details.

func (ElectionGetElectionByZip) Method

type LeadershipGetOfficials

type LeadershipGetOfficials struct {
	Leaders struct {
		Leader struct {
			CandidateID string `json:"candidateId"`
			FirstName   string `json:"firstName"`
			MiddleName  string `json:"middleName"`
			LastName    string `json:"lastName"`
			Suffix      string `json:"suffix"`
			Position    string `json:"position"`
			OfficeID    string `json:"officeId"`
			Title       string `json:"title"`
		} `json:"leader"`
	} `json:"leaders"`
}

LeadershipGetOfficials is the response message for Leadership.getOfficials. See http://api.votesmart.org/docs/Leadership.html for usage details.

func (LeadershipGetOfficials) Method

func (LeadershipGetOfficials) Method() string

type LeadershipGetPositions

type LeadershipGetPositions struct {
	Leadership struct {
		Position []struct {
			LeadershipID string `json:"leadershipId"`
			Name         string `json:"name"`
			OfficeID     string `json:"officeId"`
			OfficeName   string `json:"officeName"`
		} `json:"position"`
	} `json:"leadership"`
}

LeadershipGetPositions is the response message for Leadership.getPositions. See http://api.votesmart.org/docs/Leadership.html for usage details.

func (LeadershipGetPositions) Method

func (LeadershipGetPositions) Method() string

type LocalGetCities

type LocalGetCities struct {
	Cities struct {
		City []struct {
			LocalID string `json:"localId"`
			Name    string `json:"name"`
			URL     string `json:"url"`
		} `json:"city"`
	} `json:"cities"`
}

LocalGetCities is the response message for Local.getCities. See http://api.votesmart.org/docs/Local.html for usage details.

func (LocalGetCities) Method

func (LocalGetCities) Method() string

type LocalGetCounties

type LocalGetCounties struct {
	Counties struct {
		County []struct {
			LocalID string `json:"localId"`
			Name    string `json:"name"`
			URL     string `json:"url"`
		} `json:"county"`
	} `json:"counties"`
}

LocalGetCounties is the response message for Local.getCounties. See http://api.votesmart.org/docs/Local.html for usage details.

func (LocalGetCounties) Method

func (LocalGetCounties) Method() string

type LocalGetOfficials

type LocalGetOfficials struct {
	CandidateList struct {
		Candidate MaybeList[Candidate] `json:"candidate"`
	} `json:"candidateList"`
}

LocalGetOfficials is the response message for Local.getOfficials. See http://api.votesmart.org/docs/Local.html for usage details.

func (LocalGetOfficials) Method

func (LocalGetOfficials) Method() string

type MaybeList

type MaybeList[T any] []T

MaybeList is a generic unmarshaler. Votesmart response structure varies depending on the length of the response. If there is a single item, it returns the object. If there are multiple, it may return a list. This handler converts those cases to lists.

func (*MaybeList[T]) UnmarshalJSON

func (m *MaybeList[T]) UnmarshalJSON(in []byte) error

type MeasureGetMeasure

type MeasureGetMeasure struct {
	Measure struct {
		MeasureID    string `json:"measureId"`
		MeasureCode  string `json:"measureCode"`
		Title        string `json:"title"`
		ElectionDate string `json:"electionDate"`
		ElectionType string `json:"electionType"`
		Source       string `json:"source"`
		URL          string `json:"url"`
		Summary      string `json:"summary"`
		SummaryURL   string `json:"summaryUrl"`
		MeasureText  string `json:"measureText"`
		TextURL      string `json:"textUrl"`
		ProURL       string `json:"proUrl"`
		ConURL       string `json:"conUrl"`
		Yes          string `json:"yes"`
		No           string `json:"no"`
		Outcome      string `json:"outcome"`
	} `json:"measure"`
}

MeasureGetMeasure is the response message for Measure.getMeasure. See http://api.votesmart.org/docs/Measure.html for usage details.

func (MeasureGetMeasure) Method

func (MeasureGetMeasure) Method() string

type MeasureGetMeasuresByYearState

type MeasureGetMeasuresByYearState struct {
	Measures struct {
		Measure []struct {
			MeasureID   string `json:"measureId"`
			MeasureCode string `json:"measureCode"`
			Title       string `json:"title"`
			Outcome     string `json:"outcome"`
		} `json:"measure"`
	} `json:"measures"`
}

MeasureGetMeasuresByYearState is the response message for Measure.getMeasuresByYearState. See http://api.votesmart.org/docs/Measure.html for usage details.

func (MeasureGetMeasuresByYearState) Method

type NpatGetNpat

type NpatGetNpat struct {
	Npat struct {
		CandidateID   string `json:"candidateId"`
		Passed        string `json:"passed"`
		NpatName      string `json:"npatName"`
		ElectionName  string `json:"electionName"`
		ElectionYear  string `json:"electionYear"`
		ElectionDate  string `json:"electionDate"`
		ElectionStage string `json:"electionStage"`
		SurveyMessage string `json:"surveyMessage"`
		Candidate     string `json:"candidate"`
		// TODO: Fill this in with a real data representation.
		Section any `json:"section"`
	} `json:"npat"`
}

NpatGetNpat is the response message for Npat.getNpat. See http://api.votesmart.org/docs/Npat.html for usage details.

func (NpatGetNpat) Method

func (NpatGetNpat) Method() string

type Office

type Office struct {
	OfficeID       string `json:"officeId"`
	OfficeTypeID   string `json:"officeTypeId"`
	OfficeLevelID  string `json:"officeLevelId"`
	OfficeBranchID string `json:"officeBranchId"`
	Name           string `json:"name"`
	Title          string `json:"title"`
	ShortTitle     string `json:"shortTitle"`
}

type OfficeAddress

type OfficeAddress struct {
	Candidate struct {
		CandidateID string `json:"candidateId"`
		Title       string `json:"title"`
		FirstName   string `json:"firstName"`
		MiddleName  string `json:"middleName"`
		NickName    string `json:"nickName"`
		LastName    string `json:"lastName"`
		Suffix      string `json:"suffix"`
	} `json:"candidate"`
	Address struct {
		Type   string `json:"type"`
		TypeID string `json:"typeId"`
		Street string `json:"street"`
		City   string `json:"city"`
		State  string `json:"state"`
		Zip    string `json:"zip"`
	} `json:"address"`
	Phone struct {
		Phone1    string `json:"phone1"`
		Phone2    string `json:"phone2"`
		Fax1      string `json:"fax1"`
		Fax2      string `json:"fax2"`
		TollFree  string `json:"tollFree"`
		Ttyd      string `json:"ttyd"`
		Cellphone string `json:"cellphone"`
	} `json:"phone"`
	Notes struct {
		ContactName  string `json:"contactName"`
		ContactTitle string `json:"contactTitle"`
	} `json:"notes"`
}

type OfficeGetBranches

type OfficeGetBranches struct {
	Branches struct {
		Branch []struct {
			OfficeBranchID string `json:"officeBranchId"`
			Name           string `json:"name"`
		} `json:"branch"`
	} `json:"branches"`
}

OfficeGetBranches is the response message for Office.getBranches. See http://api.votesmart.org/docs/Office.html for usage details.

func (OfficeGetBranches) Method

func (OfficeGetBranches) Method() string

type OfficeGetLevels

type OfficeGetLevels struct {
	Levels struct {
		Level []struct {
			OfficeLevelID string `json:"officeLevelId"`
			Name          string `json:"name"`
		} `json:"level"`
	} `json:"levels"`
}

OfficeGetLevels is the response message for Office.getLevels. See http://api.votesmart.org/docs/Office.html for usage details.

func (OfficeGetLevels) Method

func (OfficeGetLevels) Method() string

type OfficeGetOfficesByBranchLevel

type OfficeGetOfficesByBranchLevel struct {
	Offices struct {
		Office MaybeList[Office] `json:"office"`
	} `json:"offices"`
}

OfficeGetOfficesByBranchLevel is the response message for Office.getOfficesByBranchLevel. See http://api.votesmart.org/docs/Office.html for usage details.

func (OfficeGetOfficesByBranchLevel) Method

type OfficeGetOfficesByLevel

type OfficeGetOfficesByLevel struct {
	Offices struct {
		Office MaybeList[Office] `json:"office"`
	} `json:"offices"`
}

OfficeGetOfficesByLevel is the response message for Office.getOfficesByLevel. See http://api.votesmart.org/docs/Office.html for usage details.

func (OfficeGetOfficesByLevel) Method

type OfficeGetOfficesByType

type OfficeGetOfficesByType struct {
	Offices struct {
		Office MaybeList[Office] `json:"office"`
	} `json:"offices"`
}

OfficeGetOfficesByType is the response message for Office.getOfficesByType. See http://api.votesmart.org/docs/Office.html for usage details.

func (OfficeGetOfficesByType) Method

func (OfficeGetOfficesByType) Method() string

type OfficeGetOfficesByTypeLevel

type OfficeGetOfficesByTypeLevel struct {
	Offices struct {
		Office MaybeList[Office] `json:"office"`
	} `json:"offices"`
}

OfficeGetOfficesByTypeLevel is the response message for Office.getOfficesByTypeLevel. See http://api.votesmart.org/docs/Office.html for usage details.

func (OfficeGetOfficesByTypeLevel) Method

type OfficeGetTypes

type OfficeGetTypes struct {
	OfficeTypes struct {
		Type []struct {
			OfficeTypeID   string `json:"officeTypeId"`
			OfficeLevelID  string `json:"officeLevelId"`
			OfficeBranchID string `json:"officeBranchId"`
			Name           string `json:"name"`
		} `json:"type"`
	} `json:"officeTypes"`
}

OfficeGetTypes is the response message for Office.getTypes. See http://api.votesmart.org/docs/Office.html for usage details.

func (OfficeGetTypes) Method

func (OfficeGetTypes) Method() string

type OfficialsGetByLastname

type OfficialsGetByLastname struct {
	CandidateList struct {
		Candidate MaybeList[Candidate] `json:"candidate"`
	} `json:"candidateList"`
}

OfficialsGetByLastname is the response message for Officials.getByLastname. See http://api.votesmart.org/docs/Officials.html for usage details.

func (OfficialsGetByLastname) Method

func (OfficialsGetByLastname) Method() string

type OfficialsGetByLevenshtein

type OfficialsGetByLevenshtein struct {
	CandidateList struct {
		Candidate MaybeList[Candidate] `json:"candidate"`
	} `json:"candidateList"`
}

OfficialsGetByLevenshtein is the response message for Officials.getByLevenshtein. See http://api.votesmart.org/docs/Officials.html for usage details.

func (OfficialsGetByLevenshtein) Method

type OfficialsGetByOfficeState

type OfficialsGetByOfficeState struct {
	CandidateList struct {
		Candidate MaybeList[Candidate] `json:"candidate"`
	} `json:"candidateList"`
}

OfficialsGetByOfficeState is the response message for Officials.getByOfficeState. See http://api.votesmart.org/docs/Officials.html for usage details.

func (OfficialsGetByOfficeState) Method

type OfficialsGetByOfficeTypeState

type OfficialsGetByOfficeTypeState struct {
	CandidateList struct {
		Candidate MaybeList[Candidate] `json:"candidate"`
	} `json:"candidateList"`
}

OfficialsGetByOfficeTypeState is the response message for Officials.getByOfficeTypeState. See http://api.votesmart.org/docs/Officials.html for usage details.

func (OfficialsGetByOfficeTypeState) Method

type OfficialsGetByZip

type OfficialsGetByZip struct {
	CandidateList struct {
		ZipMessage string `json:"zipMessage"`
		Candidate  []struct {
			CandidateID        string `json:"candidateId"`
			FirstName          string `json:"firstName"`
			NickName           string `json:"nickName"`
			MiddleName         string `json:"middleName"`
			PreferredName      string `json:"preferredName"`
			LastName           string `json:"lastName"`
			Suffix             string `json:"suffix"`
			Title              string `json:"title"`
			OfficeParties      string `json:"officeParties"`
			OfficeStatus       string `json:"officeStatus"`
			OfficeDistrictID   string `json:"officeDistrictId"`
			OfficeDistrictName string `json:"officeDistrictName"`
			OfficeStateID      string `json:"officeStateId"`
			OfficeID           string `json:"officeId"`
			OfficeName         string `json:"officeName"`
			OfficeTypeID       string `json:"officeTypeId"`
		} `json:"candidate"`
	} `json:"candidateList"`
}

OfficialsGetByZip is the response message for Officials.getByZip. See http://api.votesmart.org/docs/Officials.html for usage details.

func (OfficialsGetByZip) Method

func (OfficialsGetByZip) Method() string

type OfficialsGetStatewide

type OfficialsGetStatewide struct {
	CandidateList struct {
		Candidate MaybeList[Candidate] `json:"candidate"`
	} `json:"candidateList"`
}

OfficialsGetStatewide is the response message for Officials.getStatewide. See http://api.votesmart.org/docs/Officials.html for usage details.

func (OfficialsGetStatewide) Method

func (OfficialsGetStatewide) Method() string

type RatingGetCandidateRating

type RatingGetCandidateRating struct {
	CandidateRating struct {
		Candidate struct {
			Title      string `json:"title"`
			FirstName  string `json:"firstName"`
			MiddleName string `json:"middleName"`
			LastName   string `json:"lastName"`
			Suffix     string `json:"suffix"`
			Office     string `json:"office"`
		} `json:"candidate"`
		Rating []struct {
			SigID      string `json:"sigId"`
			RatingID   string `json:"ratingId"`
			Categories struct {
				Category []struct {
					CategoryID string `json:"categoryId"`
					Name       string `json:"name"`
				} `json:"category"`
			} `json:"categories"`
			Timespan   string `json:"timespan"`
			Rating     string `json:"rating"`
			RatingName string `json:"ratingName"`
			RatingText string `json:"ratingText"`
		} `json:"rating"`
	} `json:"candidateRating"`
}

RatingGetCandidateRating is the response message for Rating.getCandidateRating. See http://api.votesmart.org/docs/Rating.html for usage details.

func (RatingGetCandidateRating) Method

type RatingGetCategories

type RatingGetCategories struct {
	Categories struct {
		Category []struct {
			CategoryID string `json:"categoryId"`
			Name       string `json:"name"`
		} `json:"category"`
	} `json:"categories"`
}

RatingGetCategories is the response message for Rating.getCategories. See http://api.votesmart.org/docs/Rating.html for usage details.

func (RatingGetCategories) Method

func (RatingGetCategories) Method() string

type RatingGetRating

type RatingGetRating struct {
	Rating struct {
		CandidateRating []struct {
			CandidateID string `json:"candidateId"`
			Rating      string `json:"rating"`
		} `json:"candidateRating"`
	} `json:"rating"`
}

RatingGetRating is the response message for Rating.getRating. See http://api.votesmart.org/docs/Rating.html for usage details.

func (RatingGetRating) Method

func (RatingGetRating) Method() string

type RatingGetSig

type RatingGetSig struct {
	Sig struct {
		SigID       string `json:"sigId"`
		ParentID    string `json:"parentId"`
		StateID     string `json:"stateId"`
		Name        string `json:"name"`
		Description string `json:"description"`
		Address     string `json:"address"`
		City        string `json:"city"`
		State       string `json:"state"`
		Zip         string `json:"zip"`
		Phone1      string `json:"phone1"`
		Phone2      string `json:"phone2"`
		Fax         string `json:"fax"`
		Email       string `json:"email"`
		URL         string `json:"url"`
		ContactName string `json:"contactName"`
	} `json:"sig"`
}

RatingGetSig is the response message for Rating.getSig. See http://api.votesmart.org/docs/Rating.html for usage details.

func (RatingGetSig) Method

func (RatingGetSig) Method() string

type RatingGetSigList

type RatingGetSigList struct {
	Sigs struct {
		Sig []struct {
			SigID    string `json:"sigId"`
			ParentID string `json:"parentId"`
			Name     string `json:"name"`
		} `json:"sig"`
	} `json:"sigs"`
}

RatingGetSigList is the response message for Rating.getSigList. See http://api.votesmart.org/docs/Rating.html for usage details.

func (RatingGetSigList) Method

func (RatingGetSigList) Method() string

type RatingGetSigRatings

type RatingGetSigRatings struct {
	SigRatings struct {
		Sig struct {
			SigID string `json:"sigId"`
			Name  string `json:"name"`
		} `json:"sig"`
		Rating []struct {
			RatingID   string `json:"ratingId"`
			Timespan   string `json:"timespan"`
			RatingName string `json:"ratingName"`
			RatingText string `json:"ratingText"`
		} `json:"rating"`
	} `json:"sigRatings"`
}

RatingGetSigRatings is the response message for Rating.getSigRatings. See http://api.votesmart.org/docs/Rating.html for usage details.

func (RatingGetSigRatings) Method

func (RatingGetSigRatings) Method() string

type Stage

type Stage struct {
	StageID                 string `json:"stageId"`
	ElectionElectionstageID string `json:"electionElectionstageId"`
	Name                    string `json:"name"`
	StateID                 string `json:"stateId"`
	ElectionDate            string `json:"electionDate"`
	FilingDeadline          string `json:"filingDeadline"`
	NpatMailed              string `json:"npatMailed"`
}

type StateGetState

type StateGetState struct {
	State struct {
		Details struct {
			StateID     string `json:"stateId"`
			StateType   string `json:"stateType"`
			Name        string `json:"name"`
			NickName    string `json:"nickName"`
			Capital     string `json:"capital"`
			Area        string `json:"area"`
			Population  string `json:"population"`
			Statehood   string `json:"statehood"`
			Motto       string `json:"motto"`
			Flower      string `json:"flower"`
			Tree        string `json:"tree"`
			Bird        string `json:"bird"`
			HighPoint   string `json:"highPoint"`
			LowPoint    string `json:"lowPoint"`
			Bicameral   string `json:"bicameral"`
			UpperLegis  string `json:"upperLegis"`
			LowerLegis  string `json:"lowerLegis"`
			LtGov       string `json:"ltGov"`
			Senators    string `json:"senators"`
			Reps        string `json:"reps"`
			TermLimit   string `json:"termLimit"`
			TermLength  string `json:"termLength"`
			BillURL     string `json:"billUrl"`
			VoteURL     string `json:"voteUrl"`
			VoterReg    string `json:"voterReg"`
			PrimaryDate string `json:"primaryDate"`
			GeneralDate string `json:"generalDate"`
			LargestCity string `json:"largestCity"`
			RollUpper   string `json:"rollUpper"`
			RollLower   string `json:"rollLower"`
			UsCircuit   string `json:"usCircuit"`
		} `json:"details"`
	} `json:"state"`
}

StateGetState is the response message for State.getState. See http://api.votesmart.org/docs/State.html for usage details.

func (StateGetState) Method

func (StateGetState) Method() string

type StateGetStateIDs

type StateGetStateIDs struct {
	StateList struct {
		List struct {
			State []struct {
				StateID string `json:"stateId"`
				Name    string `json:"name"`
			} `json:"state"`
		} `json:"list"`
	} `json:"stateList"`
}

StateGetStateIDs is the response message for State.getStateIDs. See http://api.votesmart.org/docs/State.html for usage details.

func (StateGetStateIDs) Method

func (StateGetStateIDs) Method() string

type WebAddress

type WebAddress struct {
	WebAddressTypeID string `json:"webAddressTypeId"`
	WebAddressType   string `json:"webAddressType"`
	WebAddress       string `json:"webAddress"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL