# Gasrate
** Fetch gas rates from gasprices.aaa.com**
[](https://hexdocs.pm/gasrate/)
[](https://hex.pm/packages/gasrate)
[](https://github.com/mithereal/ex_gasrate/blob/master/LICENSE)
[](https://github.com/mithereal/ex_gasrate/commits/master)
[](https://github.com/mithereal/ex_gasrate)
## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `gasrate` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:gasrate, "~> 0.3.0"}
]
end
```
## Usage
```elixir
iex> Gasrate.fetch_national_avg()
iex> Gasrate.fetch_avg_rates("AZ")
```
## Standalone
One can create a standalone app via
```bash
MIX_ENV=cli && mix deps.get && mix release
cp _build/cli/rel/bakeware/gas_rate /usr/local/bin/.
gas_rate "CA"
{"diesel":6.754,"mid":6.423,"premium":6.561,"regular":6.246}
```
Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at [https://hexdocs.pm/gasrate](https://hexdocs.pm/gasrate).