class TMSAPI::Resource::Movie::TV

Public Class Methods

new(connection, options = {}) click to toggle source
Calls superclass method TMSAPI::Resource::Base::new
# File lib/tmsapi/resource/movies_tv.rb, line 6
def initialize(connection, options = {})
  super(connection, "v1")
end

Public Instance Methods

airings(params) click to toggle source
# File lib/tmsapi/resource/movies_tv.rb, line 16
def airings(params)
  params[:startDateTime] = Time.now.strftime("%Y-%m-%dT%H:%MZ") unless params[:startDateTime]
  
  get(airings_path, params).each do |airing|
    TMSAPI::Model::Airing.new airing
  end
end
versions(root_id, params = nil) click to toggle source
# File lib/tmsapi/resource/movies_tv.rb, line 10
def versions(root_id, params = nil)
  get(versions_path(root_id),params).each do |movie|
    TMSAPI::Model::Movie.new movie
  end
end

Private Instance Methods

airings_path() click to toggle source
# File lib/tmsapi/resource/movies_tv.rb, line 26
def airings_path
  "#{base_path}/airings"
end
base_path() click to toggle source
# File lib/tmsapi/resource/movies_tv.rb, line 34
def base_path
  "movies"
end
versions_path(root_id) click to toggle source
# File lib/tmsapi/resource/movies_tv.rb, line 30
def versions_path(root_id)
  "#{base_path}/#{root_id}/versions"
end