Module: KalturaBox::Entry::InstanceMethods

Defined in:
lib/kaltura_box/entry/instance_methods.rb

Instance Method Summary collapse

Instance Method Details

#fetch_thumbnailObject



15
16
17
18
19
20
21
22
23
# File 'lib/kaltura_box/entry/instance_methods.rb', line 15

def fetch_thumbnail
  kaltura_video = self.get
  unless kaltura_video.empty?
    self.thumbnail_url = kaltura_video.thumbnail_url
    self.save
  else
    false
  end
end

#getObject



5
6
7
8
9
# File 'lib/kaltura_box/entry/instance_methods.rb', line 5

def get
  client = KalturaBox::Client.update_session
  media = Kaltura::KalturaMediaService.new(client)
  media.get(self.entry_id)
end

#update_thumbnail(type = nil, value) ⇒ Object



11
12
13
# File 'lib/kaltura_box/entry/instance_methods.rb', line 11

def update_thumbnail(type=nil, value)
  self.add_thumbnail(self.entry_id, value, type)
end