Module: Dm::Readable

Included in:
DailyMotionAccount, DailyMotionResource
Defined in:
lib/dm/readable.rb

Overview

Provides methods to read attributes for public objects (accounts, videos..)

Instance Method Summary collapse

Instance Method Details

#descriptionObject

Return the description of a DailyMotion object



16
17
18
# File 'lib/dm/readable.rb', line 16

def description
  info[:snippet][:description]
end

#idObject

Return the unique DailyMotion identifier of a DailyMotion object



6
7
8
# File 'lib/dm/readable.rb', line 6

def id
  info[:id]
end

#kindObject

Return the kind of the DailyMotion object (either ‘channel’ or ‘video’)



26
27
28
# File 'lib/dm/readable.rb', line 26

def kind
  info.fetch(:kind, '').split("#").last
end

#thumbnail_urlObject

Return the URL of the DailyMotion object thumbnail



21
22
23
# File 'lib/dm/readable.rb', line 21

def thumbnail_url
  info[:snippet][:thumbnails][:default][:url]
end

#titleObject

Return the title of a DailyMotion object



11
12
13
# File 'lib/dm/readable.rb', line 11

def title
  info[:snippet][:title]
end