mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
Add twitter to Onebox.options
This commit is contained in:
parent
d343e9f360
commit
946e837542
2 changed files with 7 additions and 0 deletions
5
config/initializers/onebox_options.rb
Normal file
5
config/initializers/onebox_options.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
require_dependency 'twitter_api'
|
||||
|
||||
Onebox.options = {
|
||||
twitter_client: TwitterApi
|
||||
}
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue