Class: Hermes::TwitterProvider
- Defined in:
- lib/providers/twitter/twitter_provider.rb
Instance Attribute Summary
Attributes inherited from Provider
#credentials, #defaults, #deliverer, #weight
Instance Method Summary collapse
Methods inherited from Provider
#initialize, #message_failure, #message_success, #provider_name, required_credentials
Methods included from Extractors
#complex_extract, #extract_from, #extract_html, #extract_text, #extract_to
Constructor Details
This class inherits a constructor from Hermes::Provider
Instance Method Details
#client(rails_message) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/providers/twitter/twitter_provider.rb', line 9 def client() # this will already be an instance of Twitter::client client = extract_to() # just need to set the consumer key and secret and # then we'll be ready for liftoff client.consumer_key = self.credentials[:consumer_key] client.consumer_secret = self.credentials[:consumer_secret] return client end |
#send_message(rails_message) ⇒ Object
5 6 7 |
# File 'lib/providers/twitter/twitter_provider.rb', line 5 def () self.client().update(extract_text()) end |