Last active
October 4, 2016 11:28
-
-
Save thiagoa/a65c7eea472d377d6df785ae8e272c63 to your computer and use it in GitHub Desktop.
First twitter client factory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # app/models/twitter_client_factory.rb | |
| class TwitterClientFactory | |
| def call(params) | |
| Twitter::REST::Client.new do |config| | |
| config.consumer_key = params['consumer_key'] | |
| config.consumer_secret = params['consumer_secret'] | |
| config.access_token = params['access_token'] | |
| config.access_token_secret = params['access_token_secret'] | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment