Module: Itjobstack
- Defined in:
- lib/itjobstack.rb,
lib/itjobstack/api.rb,
lib/itjobstack/version.rb
Overview
Defined Under Namespace
Modules: API
Constant Summary collapse
- VERSION =
"0.4.0"
Class Method Summary collapse
-
.apiKey ⇒ String
Credentials’ apiKey.
-
.apiKey=(apiKey) ⇒ String
sets apiKey in configuration object.
-
.config ⇒ Hash
holds the credentials pair to jobstack.
-
.config=(email:, apiKey:) ⇒ Hash
deprecated
Deprecated.
Use #set_config instead
-
.email ⇒ String
Credentials’ email.
-
.email=(email) ⇒ String
sets email in configuration object.
- .has_config? ⇒ Boolean
-
.set_config(email:, apiKey:) ⇒ Hash
sets the credentials pair to jobstack in configuration object.
Class Method Details
.apiKey ⇒ String
Returns credentials’ apiKey.
48 49 50 |
# File 'lib/itjobstack.rb', line 48 def apiKey @@config && @@config.fetch(:apiKey) end |
.apiKey=(apiKey) ⇒ String
sets apiKey in configuration object
43 44 45 |
# File 'lib/itjobstack.rb', line 43 def apiKey= apiKey @@config.merge!({apiKey: apiKey}) end |
.config ⇒ Hash
holds the credentials pair to jobstack
24 25 26 |
# File 'lib/itjobstack.rb', line 24 def config @@config ||= {email: nil, apiKey: nil} end |
.config=(email:, apiKey:) ⇒ Hash
Deprecated.
Use #set_config instead
sets the credentials pair to jobstack in configuration object
10 11 12 |
# File 'lib/itjobstack.rb', line 10 def config= email: , apiKey: @@config = {email: email, apiKey: apiKey} end |
.email ⇒ String
Returns credentials’ email.
36 37 38 |
# File 'lib/itjobstack.rb', line 36 def email @@config && @@config.fetch(:email) end |
.email=(email) ⇒ String
sets email in configuration object
31 32 33 |
# File 'lib/itjobstack.rb', line 31 def email= email @@config.merge!({email: email}) end |
.has_config? ⇒ Boolean
53 54 55 |
# File 'lib/itjobstack.rb', line 53 def has_config? self.email && self.apiKey end |
.set_config(email:, apiKey:) ⇒ Hash
sets the credentials pair to jobstack in configuration object
17 18 19 |
# File 'lib/itjobstack.rb', line 17 def set_config email: , apiKey: @@config = {email: email, apiKey: apiKey} end |