nba v0.3.1 Nba.Stats

Provides a function for each stats.nba.com endpoint.

Examples

See what endpoints you can hit:

Nba.Stats.endpoints()
#=> ["assist_tracker", "box_score", "box_score_summary", ...]

Each endpoint has two corresponding functions, one with an arity of 0 and one with an arity of 1. The 0-arity functions return a list of the available query parameters for its endpoint.

Nba.Stats.player_info()
#=> ["PlayerID", "SeasonType", "LeagueID"]

Now that you know what query params you can pass, let’s make a call to the endpoint by passing in a map of query param key/values.

Nba.Stats.player_info(%{"PlayerID" => "1627742"})

If you need example values for a query param, use Nba.Stats.param_values_for/1.

Nba.Stats.param_values_for("AheadBehind")
#=> ["Ahead or Behind", "Ahead or Tied", "Behind or Tied", ""]

Link to this section Summary

Functions

Link to this section Functions

Link to this function assist_tracker()
assist_tracker() :: [String.t()]
Link to this function assist_tracker(user_input_map)
assist_tracker(map()) :: map()
Link to this function box_score()
box_score() :: [String.t()]
Link to this function box_score(user_input_map)
box_score(map()) :: map()
Link to this function box_score_summary()
box_score_summary() :: [String.t()]
Link to this function box_score_summary(user_input_map)
box_score_summary(map()) :: map()
Link to this function common_team_roster()
common_team_roster() :: [String.t()]
Link to this function common_team_roster(user_input_map)
common_team_roster(map()) :: map()
Link to this function endpoints()
endpoints() :: [atom()]
Link to this function homepage_v2()
homepage_v2() :: [String.t()]
Link to this function homepage_v2(user_input_map)
homepage_v2(map()) :: map()
Link to this function league_game_log()
league_game_log() :: [String.t()]
Link to this function league_game_log(user_input_map)
league_game_log(map()) :: map()
Link to this function league_leaders()
league_leaders() :: [String.t()]
Link to this function league_leaders(user_input_map)
league_leaders(map()) :: map()
Link to this function league_standings()
league_standings() :: [String.t()]
Link to this function league_standings(user_input_map)
league_standings(map()) :: map()
Link to this function lineups()
lineups() :: [String.t()]
Link to this function lineups(user_input_map)
lineups(map()) :: map()
Link to this function param_values_for(param_name)
param_values_for(String.t()) :: [String.t()]
Link to this function play_by_play()
play_by_play() :: [String.t()]
Link to this function play_by_play(user_input_map)
play_by_play(map()) :: map()
Link to this function player_clutch()
player_clutch() :: [String.t()]
Link to this function player_clutch(user_input_map)
player_clutch(map()) :: map()
Link to this function player_hustle()
player_hustle() :: [String.t()]
Link to this function player_hustle(user_input_map)
player_hustle(map()) :: map()
Link to this function player_hustle_leaders()
player_hustle_leaders() :: [String.t()]
Link to this function player_hustle_leaders(user_input_map)
player_hustle_leaders(map()) :: map()
Link to this function player_info()
player_info() :: [String.t()]
Link to this function player_info(user_input_map)
player_info(map()) :: map()
Link to this function player_profile()
player_profile() :: [String.t()]
Link to this function player_profile(user_input_map)
player_profile(map()) :: map()
Link to this function player_shooting()
player_shooting() :: [String.t()]
Link to this function player_shooting(user_input_map)
player_shooting(map()) :: map()
Link to this function player_splits()
player_splits() :: [String.t()]
Link to this function player_splits(user_input_map)
player_splits(map()) :: map()
Link to this function player_stats()
player_stats() :: [String.t()]
Link to this function player_stats(user_input_map)
player_stats(map()) :: map()
Link to this function player_tracking()
player_tracking() :: [String.t()]
Link to this function player_tracking(user_input_map)
player_tracking(map()) :: map()
Link to this function players_info()
players_info() :: [String.t()]
Link to this function players_info(user_input_map)
players_info(map()) :: map()
Link to this function scoreboard()
scoreboard() :: [String.t()]
Link to this function scoreboard(user_input_map)
scoreboard(map()) :: map()
Link to this function shots()
shots() :: [String.t()]
Link to this function shots(user_input_map)
shots(map()) :: map()
Link to this function team_clutch()
team_clutch() :: [String.t()]
Link to this function team_clutch(user_input_map)
team_clutch(map()) :: map()
Link to this function team_historical_leaders()
team_historical_leaders() :: [String.t()]
Link to this function team_historical_leaders(user_input_map)
team_historical_leaders(map()) :: map()
Link to this function team_hustle()
team_hustle() :: [String.t()]
Link to this function team_hustle(user_input_map)
team_hustle(map()) :: map()
Link to this function team_hustle_leaders()
team_hustle_leaders() :: [String.t()]
Link to this function team_hustle_leaders(user_input_map)
team_hustle_leaders(map()) :: map()
Link to this function team_info_common()
team_info_common() :: [String.t()]
Link to this function team_info_common(user_input_map)
team_info_common(map()) :: map()
Link to this function team_player_dashboard()
team_player_dashboard() :: [String.t()]
Link to this function team_player_dashboard(user_input_map)
team_player_dashboard(map()) :: map()
Link to this function team_shooting()
team_shooting() :: [String.t()]
Link to this function team_shooting(user_input_map)
team_shooting(map()) :: map()
Link to this function team_splits()
team_splits() :: [String.t()]
Link to this function team_splits(user_input_map)
team_splits(map()) :: map()
Link to this function team_stats()
team_stats() :: [String.t()]
Link to this function team_stats(user_input_map)
team_stats(map()) :: map()
Link to this function team_years()
team_years() :: [String.t()]
Link to this function team_years(user_input_map)
team_years(map()) :: map()