Sha256: 4bd5eedcf072474ff3a7a863a8d462cdab2fc7283b57759168b56fe94b9d7d50

Contents?: true

Size: 536 Bytes

Versions: 5

Compression:

Stored size: 536 Bytes

Contents

require 'fantasydata/api/utils'

module Fantasydata
  module API
    module News
      include Fantasydata::API::Utils

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

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

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

    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

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