diff --git a/config/initializers/onebox_options.rb b/config/initializers/onebox_options.rb new file mode 100644 index 000000000..4f99f840e --- /dev/null +++ b/config/initializers/onebox_options.rb @@ -0,0 +1,5 @@ +require_dependency 'twitter_api' + +Onebox.options = { + twitter_client: TwitterApi +} \ No newline at end of file diff --git a/lib/twitter_api.rb b/lib/twitter_api.rb index c6eac18e2..dfb3a205c 100644 --- a/lib/twitter_api.rb +++ b/lib/twitter_api.rb @@ -24,6 +24,8 @@ class TwitterApi JSON.parse(twitter_get(tweet_uri_for id)) end + alias_method :status, :tweet_for + def raw_tweet_for(id) twitter_get(tweet_uri_for id) end