nba v0.8.1 Nba.Data

Link to this section Summary

Functions

Returns a single player that best matches the search, or nil if no match was found

Returns a list of players sorted by best match

Returns a map keyed by month name – the map’s values are a list of games scheduled in the corresponding month

Link to this section Functions

Link to this function find_player!(name)
find_player!([tuple()] | String.t()) :: map() | nil

Returns a single player that best matches the search, or nil if no match was found.

iex> Nba.Data.find_player!("J Holiday")
%{
  "first_name" => "Jrue",
  "last_name" => "Holiday",
  "player_id" => 201950,
  "team_id" => 1610612740
}
Link to this function find_player(name)
find_player([tuple()] | String.t()) :: [map()]

Returns a list of players sorted by best match.

You can pass in a single key-value pair for first name, last name, or full name.

Nba.Data.find_player(first_name: "brandn")
Nba.Data.find_player(last_name: "ingrm")
Nba.Data.find_player(full_name: "brandn ingram")

You may also pass in a string as an argument.

iex> Nba.Data.find_player("J Holiday")
[%{
  "first_name" => "Jrue",
  "last_name" => "Holiday",
  "player_id" => 201950,
  "team_id" => 1610612740
},
%{
  "first_name" => "Justin",
  "last_name" => "Holiday",
  "player_id" => 203200,
  "team_id" => 1610612741
}]
Link to this function full_year_schedule()
full_year_schedule() :: map()

Returns a map keyed by month name – the map’s values are a list of games scheduled in the corresponding month