GasolinePrice

** Fetch gas rates from gasprices.aaa.com**

Hex DocsHex.pmLicenseLast UpdatedBuild Status

Installation

If available in Hex, the package can be installed by adding gasolineprice to your list of dependencies in mix.exs:

def deps do
[
{:gasoline_price, "~> 0.3.0"}
]
end

Usage

iex> GasolinePrice.fetch_national_avg()
iex> GasolinePrice.fetch_avg_rates("AZ")

Standalone

One can create a standalone app via

MIX_ENV=cli && mix deps.get && mix release
cp _build/cli/rel/bakeware/gasoline_price /usr/local/bin/.
gasoline_price "CA"
{"diesel":6.754,"mid":6.423,"premium":6.561,"regular":6.246}

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/gasoline_price.