Documentation ¶
Overview ¶
Package congress retrieves members of the United States Congress
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidState error
ErrInvalidState indicates an invalid state was passed in
Functions ¶
This section is empty.
Types ¶
type Fetcher ¶
type Fetcher interface { FetchSenators(location *Location) (*Response, error) FetchMembers(location *Location) (*Response, error) }
Fetcher implements methods to retrieve members of Congress/Senate for a district/state
type Location ¶
Location is the member's state
func ValidateState ¶
ValidateState returns a valid code for a State
type Member ¶
type Member struct { Name string District int Gender string Party string Twitter string Facebook string NextElection int }
Member is a member of Congress
type ProPublica ¶
ProPublica holds settings for the ProPublic API
func (*ProPublica) FetchMembers ¶
func (p *ProPublica) FetchMembers(location *Location) (*Response, error)
FetchMembers returns House members from ProPublica
func (*ProPublica) FetchSenators ¶
func (p *ProPublica) FetchSenators(location *Location) (*Response, error)
FetchSenators returns Senators from ProPublica
type Provider ¶
type Provider string
Provider is a data source
const ProPublicaProvider Provider = "ProPublica"
ProPublicaProvider is a data Provider
Click to show internal directories.
Click to hide internal directories.