README.md

# SportsRadar

A wrapper around the Sports Radar NASCAR API. http://developer.sportradar.com/io-docs
Note: This is for the "NASCAR Official API" on their Sandbox.

The 2017 season uses 'mc' versus 'sc' for the Monster Energy rebranding.
The 2016 and prior seasons use 'sc' for the Sprint Cup naming.

You will need a API Key to use this. You can sign up for a free trial on there website.


## Installation

If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `sports_radar` to your list of dependencies in `mix.exs`:

```elixir
def deps do
  [{:sports_radar, "~> 0.1.0"}]
end
```

Add the API key to your project config.exs or proper env.exs file.
```elixir
config :sports_radar, api_key: System.get_env("SPORTS_RADAR_API_KEY")
```

```sh
SPORTS_RADAR_API_KEY="<your_api_token>" iex -S mix
iex(1)> {:ok, res} = SportsRadar.Nascar.schedule("mc", "2017")
```

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/sports_radar](https://hexdocs.pm/sports_radar).