Class: FriendfeedToken

Inherits:
ConsumerToken
  • Object
show all
Defined in:
lib/muck_oauth/services/friendfeed_token.rb

Constant Summary collapse

FRIENDFEED_SETTINGS =
{ 
  :site => "https://friendfeed.com", 
  :request_token_path => "/account/oauth/request_token", 
  :authorize_path => "/account/oauth/authorize", 
  :access_token_path => "/account/oauth/access_token", 
}

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.consumerObject


9
10
11
# File 'lib/muck_oauth/services/friendfeed_token.rb', line 9

def self.consumer 
  @consumer ||= create_consumer 
end

.create_consumer(options = {}) ⇒ Object


13
14
15
# File 'lib/muck_oauth/services/friendfeed_token.rb', line 13

def self.create_consumer(options={}) 
  OAuth::Consumer.new credentials[:key], credentials[:secret], FRIENDFEED_SETTINGS.merge(options)
end

.get_request_token(callback_url) ⇒ Object


17
18
19
# File 'lib/muck_oauth/services/friendfeed_token.rb', line 17

def self.get_request_token(callback_url) 
  consumer.get_request_token({ :oauth_callback => callback_url })
end

Instance Method Details

#clientObject


21
22
23
# File 'lib/muck_oauth/services/friendfeed_token.rb', line 21

def client
  raise 'Implement client for friend feed.'
end