Module: Fantasydata::API::PlayerDetails
- Includes:
- Utils
- Included in:
- Client
- Defined in:
- lib/fantasydata/api/player_details.rb
Constant Summary
Constants included
from Utils
Utils::API_KEY_CANNOT_CALL_THIS_METHOD, Utils::INVALID_PARAMETER, Utils::MISSING_OR_INVALID_KEY, Utils::MISSING_PARAMETER, Utils::RATE_LIMIT_EXCEEDED, Utils::SUCCESS
Instance Method Summary
collapse
Instance Method Details
#player_details_available ⇒ Object
8
9
10
|
# File 'lib/fantasydata/api/player_details.rb', line 8
def player_details_available
objects_from_response(Fantasydata::PlayerDetail, :get, "/nfl/v2/JSON/Players")
end
|
#player_details_by_player_id(player_id) ⇒ Object
20
21
22
|
# File 'lib/fantasydata/api/player_details.rb', line 20
def player_details_by_player_id(player_id)
object_from_response(Fantasydata::PlayerDetail, :get, "/nfl/v2/JSON/Player/#{player_id.to_s}")
end
|
#player_details_by_team(team_name) ⇒ Object
16
17
18
|
# File 'lib/fantasydata/api/player_details.rb', line 16
def player_details_by_team(team_name)
objects_from_response(Fantasydata::PlayerDetail, :get, "/nfl/v2/JSON/Players/#{team_name}")
end
|
#player_details_free_agents ⇒ Object
12
13
14
|
# File 'lib/fantasydata/api/player_details.rb', line 12
def player_details_free_agents
objects_from_response(Fantasydata::PlayerDetail, :get, "/nfl/v2/JSON/FreeAgents")
end
|