Census v0.1.4 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

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"}