Class: Fantasydata::Client
- Inherits:
-
Object
- Object
- Fantasydata::Client
- Includes:
- API::BoxScore, API::ByeWeeks, API::Fantasy, API::Game, API::Injury, API::News, API::PlayerDetails, API::PlayerStat, API::Schedule, API::Season, API::Stadium, API::Standings, API::Team, API::Timeline, API::Week, Configurable
- Defined in:
- lib/fantasydata/client.rb
Constant Summary
Constants included from API::Utils
API::Utils::API_KEY_CANNOT_CALL_THIS_METHOD, API::Utils::INVALID_PARAMETER, API::Utils::MISSING_OR_INVALID_KEY, API::Utils::MISSING_PARAMETER, API::Utils::RATE_LIMIT_EXCEEDED, API::Utils::SUCCESS
Instance Attribute Summary
Attributes included from Configurable
#api_key, #connection_options, #endpoint, #middleware
Instance Method Summary collapse
-
#get(path, params = {}) ⇒ Object
Perform an HTTP GET request.
-
#initialize(options = {}) ⇒ Fantasydata::Client
constructor
Initializes a new Client object.
Methods included from Configurable
#configure, #credentials?, keys, #reset!
Methods included from API::Week
#current_week, #last_completed_week, #upcoming_week
Methods included from API::Timeline
#all_timelines, #completed_timelines, #current_timeline, #recent_timelines, #upcoming_timelines
Methods included from API::Standings
Methods included from API::Stadium
Methods included from API::Schedule
Methods included from API::Season
#current_season, #last_completed_season, #upcoming_season
Methods included from API::Team
#team_game_stats_by_season, #team_game_stats_by_year_and_week, #teams_active, #teams_by_year
Methods included from API::PlayerStat
#player_game_stat_by_player, #player_game_stat_by_player_projection, #player_game_stats_by_delta, #player_game_stats_by_week, #player_game_stats_by_week_and_team, #player_game_stats_by_week_and_team_projection, #player_season_stat_by_player_id, #player_season_stat_by_player_id_projection, #player_season_stat_by_team, #player_season_stat_by_team_projection, #player_season_stats_by_year_projection
Methods included from API::PlayerDetails
#player_details_available, #player_details_by_player_id, #player_details_by_team, #player_details_free_agents
Methods included from API::News
#news_by_player_id, #news_by_team, #news_recent
Methods included from API::Injury
#injuries_by_year_and_week, #injuries_by_year_week_team
Methods included from API::Fantasy
#daily_fantasy_defense_game_projected_stats, #daily_fantasy_defense_game_stats, #daily_fantasy_defense_season_projected_stats, #daily_fantasy_defense_season_stats, #daily_fantasy_players_for_day, #daily_fantasy_points_for_day, #fantasy_players_adp
Methods included from API::BoxScore
#box_score_individual_game, #box_scores_active, #box_scores_delta, #box_scores_delta_current_week, #box_scores_final, #box_scores_live, #box_scores_week
Methods included from API::ByeWeeks
Methods included from API::Game
#game_stats_by_season, #game_stats_by_week, #games_in_progress?
Constructor Details
#initialize(options = {}) ⇒ Fantasydata::Client
Initializes a new Client object
43 44 45 46 47 |
# File 'lib/fantasydata/client.rb', line 43 def initialize(={}) Fantasydata::Configurable.keys.each do |key| instance_variable_set(:"@#{key}", [key] || Fantasydata.instance_variable_get(:"@#{key}")) end end |
Instance Method Details
#get(path, params = {}) ⇒ Object
Perform an HTTP GET request
50 51 52 |
# File 'lib/fantasydata/client.rb', line 50 def get(path, params={}) request(:get, path, params) end |