Class: LinkedIn::Configuration
- Inherits:
-
Object
- Object
- LinkedIn::Configuration
- Defined in:
- lib/linked_in/configuration.rb
Overview
Configuration for the LinkedIn gem.
LinkedIn.configure do |config|
config.client_id = ENV["LINKEDIN_CLIENT_ID"]
config.client_secret = ENV["LINKEDIN_CLIENT_SECRET"]
end
The default endpoints for LinkedIn are also stored here.
LinkedIn uses the term "API key" to refer to "client id". They also use the term "Secret Key" to refer to "client_secret". We alias those terms in the config.
- LinkedIn.config.site = "https://www.linkedin.com"
- LinkedIn.config.token_url = "/uas/oauth2/accessToken"
- LinkedIn.config.authorize_url = "/uas/oauth2/authorization"
Instance Attribute Summary collapse
-
#api ⇒ Object
Returns the value of attribute api.
-
#api_version ⇒ Object
Returns the value of attribute api_version.
-
#authorize_url ⇒ Object
Returns the value of attribute authorize_url.
-
#client_id ⇒ Object
(also: #api_key)
Returns the value of attribute client_id.
-
#client_secret ⇒ Object
(also: #secret_key)
Returns the value of attribute client_secret.
-
#default_profile_fields ⇒ Object
Returns the value of attribute default_profile_fields.
-
#redirect_uri ⇒ Object
Returns the value of attribute redirect_uri.
-
#scope ⇒ Object
Returns the value of attribute scope.
-
#site ⇒ Object
Returns the value of attribute site.
-
#token_url ⇒ Object
Returns the value of attribute token_url.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
33 34 35 36 37 38 39 |
# File 'lib/linked_in/configuration.rb', line 33 def initialize @api = "https://api.linkedin.com" @api_version = "/v1" @site = "https://www.linkedin.com" @token_url = "/uas/oauth2/accessToken" @authorize_url = "/uas/oauth2/authorization" end |
Instance Attribute Details
#api ⇒ Object
Returns the value of attribute api.
19 20 21 |
# File 'lib/linked_in/configuration.rb', line 19 def api @api end |
#api_version ⇒ Object
Returns the value of attribute api_version.
19 20 21 |
# File 'lib/linked_in/configuration.rb', line 19 def api_version @api_version end |
#authorize_url ⇒ Object
Returns the value of attribute authorize_url.
19 20 21 |
# File 'lib/linked_in/configuration.rb', line 19 def @authorize_url end |
#client_id ⇒ Object Also known as: api_key
Returns the value of attribute client_id.
19 20 21 |
# File 'lib/linked_in/configuration.rb', line 19 def client_id @client_id end |
#client_secret ⇒ Object Also known as: secret_key
Returns the value of attribute client_secret.
19 20 21 |
# File 'lib/linked_in/configuration.rb', line 19 def client_secret @client_secret end |
#default_profile_fields ⇒ Object
Returns the value of attribute default_profile_fields.
19 20 21 |
# File 'lib/linked_in/configuration.rb', line 19 def default_profile_fields @default_profile_fields end |
#redirect_uri ⇒ Object
Returns the value of attribute redirect_uri.
19 20 21 |
# File 'lib/linked_in/configuration.rb', line 19 def redirect_uri @redirect_uri end |
#scope ⇒ Object
Returns the value of attribute scope.
19 20 21 |
# File 'lib/linked_in/configuration.rb', line 19 def scope @scope end |
#site ⇒ Object
Returns the value of attribute site.
19 20 21 |
# File 'lib/linked_in/configuration.rb', line 19 def site @site end |
#token_url ⇒ Object
Returns the value of attribute token_url.
19 20 21 |
# File 'lib/linked_in/configuration.rb', line 19 def token_url @token_url end |