class ArticleJSON::Utils::OEmbedResolver::Tweet
Public Instance Methods
name()
click to toggle source
Human readable name of the resolver @return [String]
# File lib/article_json/utils/o_embed_resolver/tweet.rb, line 7 def name 'Tweet' end
oembed_url()
click to toggle source
The URL for the oembed API call @return [String]
# File lib/article_json/utils/o_embed_resolver/tweet.rb, line 13 def oembed_url 'https://api.twitter.com/1/statuses/oembed.json?align=center' \ "&url=#{source_url}" end
source_url()
click to toggle source
The URL of the tweet @return [String]
# File lib/article_json/utils/o_embed_resolver/tweet.rb, line 20 def source_url handle, tweet_id = @element.embed_id.split('/', 2) "https://twitter.com/#{handle}/status/#{tweet_id}" end