Census v0.1.3 Census.Client View Source
Struct representing an API client.
Link to this section Summary
Functions
Create a new api client
Link to this section Types
Link to this type
t()
View Source
t() :: %Census.Client{api_key: term, dataset: term, vintage: term}
Link to this section Functions
Link to this function
new(api_key, options \\ [])
View Source
new(String.t, Keyword.t) :: Census.Client.t
Create a new api client.
Usage:
iex> Census.Client.new("YOUR_API_KEY")
%Census.Client{api_key: "YOUR_API_KEY", dataset: "SF1", vintage: "2010"}
Clients default to the 2010 SF1 dataset. To set an alternate dataset and vintage:
iex> Census.Client.new("YOUR_API_KEY", dataset: "ACS5", vintage: "2005")
%Census.Client{api_key: "YOUR_API_KEY", dataset: "ACS5", vintage: "2005"}