nba v0.6.2 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
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
}
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
}]
Returns a map keyed by month name – the map’s values are a list of games scheduled in the corresponding month