Class: Pickpocket::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/pickpocket/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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_fileObject

Returns the value of attribute authorization_token_file.



3
4
5
# File 'lib/pickpocket/configuration.rb', line 3

def authorization_token_file
  @authorization_token_file
end

#consumer_keyObject

Returns the value of attribute consumer_key.



3
4
5
# File 'lib/pickpocket/configuration.rb', line 3

def consumer_key
  @consumer_key
end

#home_folderObject

Returns the value of attribute home_folder.



3
4
5
# File 'lib/pickpocket/configuration.rb', line 3

def home_folder
  @home_folder
end

#library_fileObject

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_fileObject

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_homepageObject

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_urlObject

Returns the value of attribute pocket_oauth_authorize_url.



3
4
5
# File 'lib/pickpocket/configuration.rb', line 3

def pocket_oauth_authorize_url
  @pocket_oauth_authorize_url
end

#pocket_oauth_request_urlObject

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_urlObject

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_urlObject

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_urlObject

Returns the value of attribute pocket_user_authorize_url.



3
4
5
# File 'lib/pickpocket/configuration.rb', line 3

def pocket_user_authorize_url
  @pocket_user_authorize_url
end