Class: SyoboiCalendar::Queries::ListProgramsQuery

Inherits:
BaseQuery
  • Object
show all
Defined in:
lib/syoboi_calendar/queries/list_programs_query.rb

Constant Summary collapse

COMMAND =
"ProgLookup"
JOIN =
"SubTitles"

Instance Method Summary collapse

Methods inherited from BaseQuery

#LastUpdate, inherited, #initialize, property, #to_hash

Constructor Details

This class inherits a constructor from SyoboiCalendar::Queries::BaseQuery

Instance Method Details

#ChIDString?

Returns:

  • (String, nil)

18
19
20
21
22
# File 'lib/syoboi_calendar/queries/list_programs_query.rb', line 18

def ChID
  if options[:channel_id]
    format_comma_separated_values(options[:channel_id])
  end
end

#CommandObject

Note:

Override


25
26
27
# File 'lib/syoboi_calendar/queries/list_programs_query.rb', line 25

def Command
  COMMAND
end

#CountString?

Returns:

  • (String, nil)

30
31
32
33
34
# File 'lib/syoboi_calendar/queries/list_programs_query.rb', line 30

def Count
  if options[:count]
    format_comma_separated_values(options[:count])
  end
end

#FieldsString?

Returns:

  • (String, nil)

37
38
39
40
41
# File 'lib/syoboi_calendar/queries/list_programs_query.rb', line 37

def Fields
  if options[:fields]
    format_comma_separated_values(options[:fields])
  end
end

#JOINString

Returns:

  • (String)

44
45
46
# File 'lib/syoboi_calendar/queries/list_programs_query.rb', line 44

def JOIN
  JOIN
end

#PIDString?

Returns:

  • (String, nil)

49
50
51
52
53
# File 'lib/syoboi_calendar/queries/list_programs_query.rb', line 49

def PID
  if options[:program_id]
    format_comma_separated_values(options[:program_id])
  end
end

#RangeString?

Returns:

  • (String, nil)

56
57
58
# File 'lib/syoboi_calendar/queries/list_programs_query.rb', line 56

def Range
  format_time_range(options[:played_from], options[:played_to])
end

#StTimeString?

Returns:

  • (String, nil)

61
62
63
# File 'lib/syoboi_calendar/queries/list_programs_query.rb', line 61

def StTime
  format_time_range(options[:started_from], options[:started_to])
end

#TIDString?

Returns:

  • (String, nil)

66
67
68
69
70
# File 'lib/syoboi_calendar/queries/list_programs_query.rb', line 66

def TID
  if options[:title_id]
    format_comma_separated_values(options[:title_id])
  end
end