Sha256: a972ca1a25fe3d53a9f9599bd3bf6cdf30c0c5c144264e3194ca7c61aaea01e5

Contents?: true

Size: 904 Bytes

Versions: 4

Compression:

Stored size: 904 Bytes

Contents

module Sofa
  module TVRage
    # This class will hold the full/quick schedule information as per the TVRage API.
    #
    # @see http://services.tvrage.com/index.php?page=public&go=fullschedule TVRage API : Full Schedule
    # @see http://services.tvrage.com/index.php?page=public&go=quickschedule TV Rage API : Quick Schedule
    class Schedule
      include HTTParty
      format :xml
      base_uri 'services.tvrage.com/feeds'

      class << self
        # Gets the full schedule for country
        #
        # @param country [String] The country to query in (US, UK, NL)
        # @return [Hash] The parsed XML of schedule information
        # @see http://services.tvrage.com/feeds/fullschedule.php?country=US US's Full Schedule
        def full(country)
          xml = get("/fullschedule.php", :query => {:country => country})
          xml["schedule"]
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sofa-0.1.4 lib/sofa/tvrage/schedule.rb
sofa-0.1.3 lib/sofa/tvrage/schedule.rb
sofa-0.1.2 lib/sofa/tvrage/schedule.rb
sofa-0.1.0 lib/sofa/tvrage/schedule.rb