Class: Cloudpress::Dropbox::Connector

Inherits:
Object
  • Object
show all
Defined in:
lib/cloudpress/dropbox/connector.rb

Instance Method Summary collapse

Constructor Details

#initialize(key, secret) ⇒ Connector

Returns a new instance of Connector.



5
6
7
8
# File 'lib/cloudpress/dropbox/connector.rb', line 5

def initialize(key, secret)
  @key    = key
  @secret = secret
end

Instance Method Details

#authorize!(code) ⇒ Object



18
19
20
# File 'lib/cloudpress/dropbox/connector.rb', line 18

def authorize!(code)
  flow.finish(code)
end

#authorize_urlObject



14
15
16
# File 'lib/cloudpress/dropbox/connector.rb', line 14

def authorize_url
  @authorize_url ||= flow.start
end

#flowObject



10
11
12
# File 'lib/cloudpress/dropbox/connector.rb', line 10

def flow
  @flow ||= DropboxOAuth2FlowNoRedirect.new(@key, @secret)
end