Sha256: fda0de72a1a0d0c0cd949641eea7553a84d509910f9583171ce632b3aa6f67de

Contents?: true

Size: 736 Bytes

Versions: 5

Compression:

Stored size: 736 Bytes

Contents

require 'fantasydata/api/utils'

module Fantasydata
  module API
    module PlayerDetails
      include Fantasydata::API::Utils

      def player_details_available
        objects_from_response(Fantasydata::PlayerDetail, :get, "/nfl/v2/JSON/Players")
      end

      def player_details_free_agents
        objects_from_response(Fantasydata::PlayerDetail, :get, "/nfl/v2/JSON/FreeAgents")
      end

      def player_details_by_team(team_name)
        objects_from_response(Fantasydata::PlayerDetail, :get, "/nfl/v2/JSON/Players/#{team_name}")
      end

      def player_details_by_player_id(player_id)
        object_from_response(Fantasydata::PlayerDetail, :get, "/nfl/v2/JSON/Player/#{player_id.to_s}")
      end

    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fantasydata-0.2.2 lib/fantasydata/api/player_details.rb
fantasydata-0.2.1 lib/fantasydata/api/player_details.rb
fantasydata-0.2.0 lib/fantasydata/api/player_details.rb
fantasydata-0.0.2 lib/fantasydata/api/player_details.rb
fantasydata-0.0.1 lib/fantasydata/api/player_details.rb