Class: Pickpocket::Configuration
- Inherits:
-
Object
- Object
- Pickpocket::Configuration
- Defined in:
- lib/pickpocket/configuration.rb
Instance Attribute Summary collapse
-
#authorization_token_file ⇒ Object
Returns the value of attribute authorization_token_file.
-
#consumer_key ⇒ Object
Returns the value of attribute consumer_key.
-
#home_folder ⇒ Object
Returns the value of attribute home_folder.
-
#library_file ⇒ Object
Returns the value of attribute library_file.
-
#oauth_token_file ⇒ Object
Returns the value of attribute oauth_token_file.
-
#pocket_homepage ⇒ Object
Returns the value of attribute pocket_homepage.
-
#pocket_oauth_authorize_url ⇒ Object
Returns the value of attribute pocket_oauth_authorize_url.
-
#pocket_oauth_request_url ⇒ Object
Returns the value of attribute pocket_oauth_request_url.
-
#pocket_retrieve_url ⇒ Object
Returns the value of attribute pocket_retrieve_url.
-
#pocket_send_url ⇒ Object
Returns the value of attribute pocket_send_url.
-
#pocket_user_authorize_url ⇒ Object
Returns the value of attribute pocket_user_authorize_url.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/pickpocket/configuration.rb', line 15 def initialize # Files @home_folder = File.join(Dir.home, '.pickpocket') @authorization_token_file = File.join(@home_folder, 'authorization_token') @oauth_token_file = File.join(@home_folder, 'oauth_token') @library_file = File.join(@home_folder, 'library_file') # Pocket @consumer_key = ENV.fetch('POCKET_CONSUMER_KEY', '58132-f824d5fbf935681e22e86a3c') @pocket_homepage = 'https://getpocket.com' @pocket_oauth_authorize_url = 'https://getpocket.com/v3/oauth/authorize' @pocket_oauth_request_url = 'https://getpocket.com/v3/oauth/request' @pocket_retrieve_url = 'https://getpocket.com/v3/get' @pocket_send_url = 'https://getpocket.com/v3/send' @pocket_user_authorize_url = 'https://getpocket.com/auth/authorize' end |
Instance Attribute Details
#authorization_token_file ⇒ Object
Returns the value of attribute authorization_token_file.
3 4 5 |
# File 'lib/pickpocket/configuration.rb', line 3 def @authorization_token_file end |
#consumer_key ⇒ Object
Returns the value of attribute consumer_key.
3 4 5 |
# File 'lib/pickpocket/configuration.rb', line 3 def consumer_key @consumer_key end |
#home_folder ⇒ Object
Returns the value of attribute home_folder.
3 4 5 |
# File 'lib/pickpocket/configuration.rb', line 3 def home_folder @home_folder end |
#library_file ⇒ Object
Returns the value of attribute library_file.
3 4 5 |
# File 'lib/pickpocket/configuration.rb', line 3 def library_file @library_file end |
#oauth_token_file ⇒ Object
Returns the value of attribute oauth_token_file.
3 4 5 |
# File 'lib/pickpocket/configuration.rb', line 3 def oauth_token_file @oauth_token_file end |
#pocket_homepage ⇒ Object
Returns the value of attribute pocket_homepage.
3 4 5 |
# File 'lib/pickpocket/configuration.rb', line 3 def pocket_homepage @pocket_homepage end |
#pocket_oauth_authorize_url ⇒ Object
Returns the value of attribute pocket_oauth_authorize_url.
3 4 5 |
# File 'lib/pickpocket/configuration.rb', line 3 def @pocket_oauth_authorize_url end |
#pocket_oauth_request_url ⇒ Object
Returns the value of attribute pocket_oauth_request_url.
3 4 5 |
# File 'lib/pickpocket/configuration.rb', line 3 def pocket_oauth_request_url @pocket_oauth_request_url end |
#pocket_retrieve_url ⇒ Object
Returns the value of attribute pocket_retrieve_url.
3 4 5 |
# File 'lib/pickpocket/configuration.rb', line 3 def pocket_retrieve_url @pocket_retrieve_url end |
#pocket_send_url ⇒ Object
Returns the value of attribute pocket_send_url.
3 4 5 |
# File 'lib/pickpocket/configuration.rb', line 3 def pocket_send_url @pocket_send_url end |
#pocket_user_authorize_url ⇒ Object
Returns the value of attribute pocket_user_authorize_url.
3 4 5 |
# File 'lib/pickpocket/configuration.rb', line 3 def @pocket_user_authorize_url end |