Module: Fantasydata::API::News

Includes:
Utils
Included in:
Client
Defined in:
lib/fantasydata/api/news.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

#news_by_player_id(player_id) ⇒ Object



8
9
10
# File 'lib/fantasydata/api/news.rb', line 8

def news_by_player_id(player_id)
  objects_from_response(Fantasydata::News, :get, "/nfl/v2/JSON/NewsByPlayerID/#{player_id}")
end

#news_by_team(team_name) ⇒ Object



12
13
14
# File 'lib/fantasydata/api/news.rb', line 12

def news_by_team(team_name)
  objects_from_response(Fantasydata::News, :get, "/nfl/v2/JSON/NewsByTeam/#{team_name}")
end

#news_recentObject



16
17
18
# File 'lib/fantasydata/api/news.rb', line 16

def news_recent
  objects_from_response(Fantasydata::News, :get, "/nfl/v2/JSON/News")
end