Class: Kaltura::MediaEntry

Inherits:
Hashie::Mash
  • Object
show all
Extended by:
ClientResource
Defined in:
lib/kaltura/media_entry.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ClientResource

fetch, post, url

Class Method Details

.get(id, version = nil) ⇒ Object



13
14
15
# File 'lib/kaltura/media_entry.rb', line 13

def self.get(id,version=nil)
  fetch('media', 'get', {:entryId => id, :version => version}).first
end

.list(options = {}) ⇒ Object



17
18
19
# File 'lib/kaltura/media_entry.rb', line 17

def self.list(options={})
  fetch('media', 'list', options).first.objects.item.map { |item| Kaltura::MediaEntry.new(item) }
end

Instance Method Details

#update(options = {}) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/kaltura/media_entry.rb', line 5

def update(options={})
  update_options = { :entryId => self.id , :mediaEntry => options }
  Kaltura::MediaEntry.fetch('media', 'update', update_options).first
  self.merge!(options)

  self
end