Class: TwitterAdapter
- Inherits:
-
BaseAdapter
- Object
- BaseAdapter
- TwitterAdapter
- Defined in:
- lib/adapters/twitter.rb
Instance Attribute Summary
Attributes inherited from BaseAdapter
Instance Method Summary collapse
- #deliver(message, tags = []) ⇒ Object
-
#initialize(conf = {}) ⇒ TwitterAdapter
constructor
A new instance of TwitterAdapter.
Methods inherited from BaseAdapter
#add_headers, #add_tags, #default_headers_map, #process_deliver
Constructor Details
#initialize(conf = {}) ⇒ TwitterAdapter
Returns a new instance of TwitterAdapter.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/adapters/twitter.rb', line 6 def initialize(conf = {}) Twitter.configure do |config| config.consumer_key = conf["consumer_key"] config.consumer_secret = conf["consumer_secret"] config.oauth_token = conf["oauth_token"] config.oauth_token_secret = conf["oauth_token_secret"] end end |
Instance Method Details
#deliver(message, tags = []) ⇒ Object
17 18 19 20 21 22 |
# File 'lib/adapters/twitter.rb', line 17 def deliver(, = []) = (, ) Twitter.update([0,140]) end |