Class: Cloudpress::Dropbox::Connector
- Inherits:
-
Object
- Object
- Cloudpress::Dropbox::Connector
- Defined in:
- lib/cloudpress/dropbox/connector.rb
Instance Method Summary collapse
- #authorize!(code) ⇒ Object
- #authorize_url ⇒ Object
- #flow ⇒ Object
-
#initialize(key, secret) ⇒ Connector
constructor
A new instance of Connector.
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 (code) flow.finish(code) end |
#authorize_url ⇒ Object
14 15 16 |
# File 'lib/cloudpress/dropbox/connector.rb', line 14 def @authorize_url ||= flow.start end |
#flow ⇒ Object
10 11 12 |
# File 'lib/cloudpress/dropbox/connector.rb', line 10 def flow @flow ||= DropboxOAuth2FlowNoRedirect.new(@key, @secret) end |