Sha256: cd7ecceb0af4f345b6f1ee38768b7b4e5286f210e3ff39d90cdfecc1d2a072ae

Contents?: true

Size: 543 Bytes

Versions: 2

Compression:

Stored size: 543 Bytes

Contents

class Hooloo::Video < Hooloo::MozartHash
  # @param id [Fixnum]
  def initialize(id)
    super
    if id.is_a? Fixnum
      @obj = Hooloo.request("videos/#{id}")['data'][0]['video']
    end
  end
  def copyright
    @obj['copyright'].split(',').map(&:strip)
  end
  date :available_at, :cache_time, :original_premiere_date, :released_at
  bool :embed_permitted, :has_captions, :has_hd, :is_auth_valid, :is_expiring, :is_html5_enabled,
       :is_mature, :is_subscriber_only, :is_web_only
  cast Float, :duration
  cast URI, :thumbnail_url
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hooloo-0.1.1 lib/hooloo/video.rb
hooloo-0.1.0 lib/hooloo/video.rb