Class: EventMachine::Sofa::TVRage::Schedule

Inherits:
Object
  • Object
show all
Extended by:
EventMachine::Sofa::TVRage
Defined in:
lib/em-sofa/tvrage/schedule.rb

Overview

This class will hold the full/quick schedule information as per the TVRage API.

Constant Summary collapse

Base_Uri =
'services.tvrage.com/feeds'

Class Method Summary collapse

Class Method Details

.full(country, &block) ⇒ Hash

Gets the full schedule for country

Parameters:

  • country (String)

    The country to query in (US, UK, NL)

  • &block (Block)

    Called back with result unless fibered

Returns:

  • (Hash)

    The parsed XML of schedule information

See Also:



20
21
22
23
# File 'lib/em-sofa/tvrage/schedule.rb', line 20

def full(country, &block)
  return Request.fibered(method(__method__), country) if defined? Fiber and Fiber.respond_to? :current and not block
  Request.new(Base_Uri, '/fullschedule.php', block, :return_element => 'schedule', :country => country)
end