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