Class: LinkedinOrbit::Client
- Inherits:
-
Object
- Object
- LinkedinOrbit::Client
- Defined in:
- lib/linkedin_orbit/client.rb
Instance Attribute Summary collapse
-
#historical_import ⇒ Object
Returns the value of attribute historical_import.
-
#linkedin_organization ⇒ Object
Returns the value of attribute linkedin_organization.
-
#linkedin_token ⇒ Object
readonly
Returns the value of attribute linkedin_token.
-
#orbit_api_key ⇒ Object
Returns the value of attribute orbit_api_key.
-
#orbit_workspace ⇒ Object
Returns the value of attribute orbit_workspace.
Instance Method Summary collapse
- #comments ⇒ Object
-
#initialize(params = {}) ⇒ Client
constructor
A new instance of Client.
- #token ⇒ Object
Constructor Details
#initialize(params = {}) ⇒ Client
Returns a new instance of Client.
46 47 48 49 50 51 52 |
# File 'lib/linkedin_orbit/client.rb', line 46 def initialize(params = {}) @orbit_api_key = params.fetch(:orbit_api_key, ENV["ORBIT_API_KEY"]) @orbit_workspace = params.fetch(:orbit_workspace, ENV["ORBIT_WORKSPACE_ID"]) @linkedin_token = token @linkedin_organization = params.fetch(:linkedin_organization, ENV["LINKEDIN_ORGANIZATION"]) @historical_import = params.fetch(:historical_import, false) end |
Instance Attribute Details
#historical_import ⇒ Object
Returns the value of attribute historical_import.
43 44 45 |
# File 'lib/linkedin_orbit/client.rb', line 43 def historical_import @historical_import end |
#linkedin_organization ⇒ Object
Returns the value of attribute linkedin_organization.
43 44 45 |
# File 'lib/linkedin_orbit/client.rb', line 43 def linkedin_organization @linkedin_organization end |
#linkedin_token ⇒ Object (readonly)
Returns the value of attribute linkedin_token.
44 45 46 |
# File 'lib/linkedin_orbit/client.rb', line 44 def linkedin_token @linkedin_token end |
#orbit_api_key ⇒ Object
Returns the value of attribute orbit_api_key.
43 44 45 |
# File 'lib/linkedin_orbit/client.rb', line 43 def orbit_api_key @orbit_api_key end |
#orbit_workspace ⇒ Object
Returns the value of attribute orbit_workspace.
43 44 45 |
# File 'lib/linkedin_orbit/client.rb', line 43 def orbit_workspace @orbit_workspace end |
Instance Method Details
#comments ⇒ Object
58 59 60 61 62 63 64 65 66 |
# File 'lib/linkedin_orbit/client.rb', line 58 def comments LinkedinOrbit::Linkedin.new( linkedin_token: @linkedin_token, linkedin_organization: @linkedin_organization, orbit_api_key: @orbit_api_key, orbit_workspace: @orbit_workspace, historical_import: @historical_import ).process_comments end |
#token ⇒ Object
54 55 56 |
# File 'lib/linkedin_orbit/client.rb', line 54 def token @token ||= ENV["LINKEDIN_TOKEN"] end |