Class: Agree2Token

Inherits:
ConsumerToken show all
Defined in:
lib/oauth/models/consumers/services/agree2_token.rb

Constant Summary

AGREE2_SETTINGS =
{:site=>"https://agree2.com"}

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ConsumerToken

find_or_create_from_access_token

Methods included from Oauth::Models::Consumers::Token

included

Class Method Details

.agree2_clientObject



8
9
10
# File 'lib/oauth/models/consumers/services/agree2_token.rb', line 8

def self.agree2_client
  @agree2_client||=Agree2::Client.new credentials[:key],credentials[:secret]
end

.consumerObject



4
5
6
# File 'lib/oauth/models/consumers/services/agree2_token.rb', line 4

def self.consumer
  @consumer||=OAuth::Consumer.new credentials[:key],credentials[:secret],AGREE2_SETTINGS
end

Instance Method Details

#clientObject



12
13
14
# File 'lib/oauth/models/consumers/services/agree2_token.rb', line 12

def client
  @client||=Agree2Token.agree2_client.user(token,secret)
end