| 
8
9
10
11
12
13
14
15
16
17 | # File 'lib/cloudpt-api/util/oauth.rb', line 8
def consumer(endpoint)
  if !Cloudpt::API::Config.app_key or !Cloudpt::API::Config.app_secret
    raise Cloudpt::API::Error::Config.new("app_key or app_secret not provided")
  end
  ::OAuth::Consumer.new(Cloudpt::API::Config.app_key, Cloudpt::API::Config.app_secret,
    :site => Cloudpt::API::Config.endpoints[endpoint],
    :request_token_path => "/oauth/request_token",
    :authorize_path     => "/oauth/authorize",
    :access_token_path  => "/oauth/access_token")
end |