Module: NBA::InfographicFanDuelPlayer

Defined in:
lib/nba/infographic_fan_duel_player.rb

Overview

Provides methods to retrieve FanDuel infographic player statistics

API:

  • public

Constant Summary collapse

FAN_DUEL_PLAYER =

Result set name for FanDuel player stats

Returns:

  • the result set name

API:

  • public

"FanDuelPlayer".freeze

Class Method Summary collapse

Class Method Details

.find(game:, client: CLIENT) ⇒ Collection

Retrieves FanDuel infographic statistics for all players in a game

Examples:

stats = NBA::InfographicFanDuelPlayer.find(game: "0022400001")
stats.each { |s| puts "#{s.player_name}: #{s.fan_duel_pts} FD pts" }

Parameters:

  • the game ID or Game object

  • (defaults to: CLIENT)

    the API client to use

Returns:

  • a collection of FanDuel player stats

API:

  • public



23
24
25
26
27
28
# File 'lib/nba/infographic_fan_duel_player.rb', line 23

def self.find(game:, client: CLIENT)
  game_id = Utils.extract_id(game)
  path = "infographicfanduelplayer?GameID=#{game_id}"
  response = client.get(path)
  parse_response(response, game_id)
end