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, #post_id, #private, #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.



271
272
273
# File 'lib/tumblr4r.rb', line 271

def data
  @data
end

#titleObject

Returns the value of attribute title.



271
272
273
# File 'lib/tumblr4r.rb', line 271

def title
  @title
end

#video_captionObject

Returns the value of attribute video_caption.



270
271
272
# File 'lib/tumblr4r.rb', line 270

def video_caption
  @video_caption
end

#video_playerObject

Returns the value of attribute video_player.



270
271
272
# File 'lib/tumblr4r.rb', line 270

def video_player
  @video_player
end

#video_sourceObject

Returns the value of attribute video_source.



270
271
272
# File 'lib/tumblr4r.rb', line 270

def video_source
  @video_source
end

Instance Method Details

#paramsObject

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



275
276
277
278
279
280
281
# File 'lib/tumblr4r.rb', line 275

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