Class: Tumblr4r::Video

Inherits:
Post
  • Object
show all
Defined in:
lib/tumblr4r.rb

Instance Attribute Summary collapse

Attributes inherited from Post

#bookmarklet, #date, #date_gmt, #format, #generator, #liked, #post_id, #private, #reblog_key, #tags, #type, #unix_timestamp, #url, #url_with_slug

Instance Method Summary collapse

Methods inherited from Post

#initialize

Constructor Details

This class inherits a constructor from Tumblr4r::Post

Instance Attribute Details

#dataObject

Returns the value of attribute data.



352
353
354
# File 'lib/tumblr4r.rb', line 352

def data
  @data
end

#titleObject

Returns the value of attribute title.



352
353
354
# File 'lib/tumblr4r.rb', line 352

def title
  @title
end

#video_captionObject

Returns the value of attribute video_caption.



351
352
353
# File 'lib/tumblr4r.rb', line 351

def video_caption
  @video_caption
end

#video_playerObject

Returns the value of attribute video_player.



351
352
353
# File 'lib/tumblr4r.rb', line 351

def video_player
  @video_player
end

#video_sourceObject

Returns the value of attribute video_source.



351
352
353
# File 'lib/tumblr4r.rb', line 351

def video_source
  @video_source
end

Instance Method Details

#paramsObject

TODO: title は vimeo へのアップロードのときのみ有効らしい TODO: embed を使うか、アップロードしたdataを使うかってのは Tumblr側で勝手に判断されるのかなぁ?



356
357
358
359
360
361
362
# File 'lib/tumblr4r.rb', line 356

def params
  super.merge!(
               {"embed" => @video_source,
                 "data" => @data,
                 "title" => @title,
                 "caption" => @video_caption})
end