RapidNba
A thin elixir client for API NBA on Rapid API.
Installation
If available in Hex, the package can be installed
by adding rapid_nba to your list of dependencies in mix.exs:
def deps do
[
{:rapid_nba, "~> 0.1.0"}
]
endConfiguration
Add your Rapid API Key to your config.
config :rapid_nba, :api_key, "xxx"Usage
iex> RapidNba.all_teams()
{:ok,
%Tesla.Env{
body: %{
"api" => %{
...
"results" => 54,
"status" => 200,
"teams" => [
%{
"allStar" => "0",
"city" => "Atlanta",
"fullName" => "Atlanta Hawks",
"leagues" => %{
"standard" => %{"confName" => "East", "divName" => "Southeast"}
},
"logo" => "https://upload.wikimedia.org/wikipedia/fr/e/ee/Hawks_2016.png",
"nbaFranchise" => "1",
"nickname" => "Hawks",
"shortName" => "ATL",
"teamId" => "1"
},
...
]
}
}
}
}APIs
- all_seasons
- all_leagues
- all_teams
- teams_by
- get_team
- all_players
- players_by
- get_player
- games_by
- game_details
- standings
- player_stats
- game_stats
See hex docs for more info.
Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/rapid_nba.