# File lib/twitter/client/tweets.rb, line 88 def oembed(id_or_url, options={}) case id_or_url when Integer id = id_or_url oembed = get("/1/statuses/oembed.json?id=#{id}", options) when String url = id_or_url escaped_url = URI.escape(url, Regexp.new("[^#{URI::PATTERN::UNRESERVED}]")) oembed = get("/1/statuses/oembed.json?url=#{escaped_url}", options) end Twitter::OEmbed.new(oembed) end