Skip to content

Instantly share code, notes, and snippets.

@userid
Created August 28, 2016 18:29
Show Gist options
  • Select an option

  • Save userid/d8fbb4c2356a86d7a4212572f973ec0c to your computer and use it in GitHub Desktop.

Select an option

Save userid/d8fbb4c2356a86d7a4212572f973ec0c to your computer and use it in GitHub Desktop.
## from https://github.com/mwunsch/tumblr/blob/56120b7eb65e77bd730fec05d2d6861b3641d08a/lib/tumblr/post/video.rb
module Tumblr
class Post
class Video < Post
def initialize(post_data = {})
super(post_data)
@type = :video
@embed ||= get_embed_code_from_response
end
def caption
@caption
end
def embed
@embed
end
def data
@data
end
def get_embed_code_from_response
@player.last["embed_code"] if @player and !@player.empty?
end
def self.post_body_keys
[:embed, :caption]
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment