Class: Contacts::Provider::OAuth
- Inherits:
-
Base
- Object
- Base
- Contacts::Provider::OAuth
show all
- Defined in:
- lib/contacts/provider/oauth.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
all, #attributes, #attributes=, #connection, #contacts, #contacts_response, #initialize, #parse_attributes, #parse_contacts!, provider_id, #retrieve_contacts!, #site_url, #valid_attributes, valid_attributes, valid_attributes=
Class Method Details
.inherited(klass) ⇒ Object
6
7
8
|
# File 'lib/contacts/provider/oauth.rb', line 6
def self.inherited klass
klass.valid_attributes = self.valid_attributes
end
|
Instance Method Details
#connect! ⇒ Object
16
17
18
|
# File 'lib/contacts/provider/oauth.rb', line 16
def connect!
::OAuth::AccessToken.new(consumer, token, secret)
end
|
#consumer ⇒ Object
12
13
14
|
# File 'lib/contacts/provider/oauth.rb', line 12
def consumer
@consumer ||= ::OAuth::Consumer.new(consumer_key, consumer_secret, :site => self.site_url)
end
|