Class: Tumblr::Post::Video
- Inherits:
-
Tumblr::Post
show all
- Defined in:
- lib/tumblr/post/video.rb
Constant Summary
Constant Summary
Constants inherited
from Tumblr::Post
FIELDS, POST_BODY_SEPARATOR
Class Method Summary
(collapse)
Instance Method Summary
(collapse)
create, #date, #delete, #draft!, #draft?, dump, #edit, #format, get_post_type, #id, infer_post_type_from_extname, infer_post_type_from_string, load, load_from_binary, load_from_path, #markdown?, #meta_data, pair_post_body_types, parse, perform, #post, #post_url, #private?, #publish!, #published?, #queue!, #queued?, #reblog_key, #request_parameters, #serialize, #slug, #state, #tags, #tweet, #type
Constructor Details
- (Video) initialize(post_data = {})
4
5
6
7
8
|
# File 'lib/tumblr/post/video.rb', line 4
def initialize(post_data = {})
super(post_data)
@type = :video
@embed ||= get_embed_code_from_response
end
|
Class Method Details
+ (Object) post_body_keys
26
27
28
|
# File 'lib/tumblr/post/video.rb', line 26
def self.post_body_keys
[:embed, :caption]
end
|
Instance Method Details
- (Object) caption
10
11
12
|
# File 'lib/tumblr/post/video.rb', line 10
def caption
@caption
end
|
- (Object) data
18
19
20
|
# File 'lib/tumblr/post/video.rb', line 18
def data
@data
end
|
- (Object) embed
14
15
16
|
# File 'lib/tumblr/post/video.rb', line 14
def embed
@embed
end
|
- (Object) get_embed_code_from_response
22
23
24
|
# File 'lib/tumblr/post/video.rb', line 22
def get_embed_code_from_response
@player.last["embed_code"] if @player and !@player.empty?
end
|