Class: Snov::GetEmailsBySocialUrl
- Inherits:
-
Object
- Object
- Snov::GetEmailsBySocialUrl
- Defined in:
- lib/snov/get_emails_by_social_url.rb
Defined Under Namespace
Classes: ProspectData, ProspectEmail, ProspectJob, ProspectJobList, ProspectResult
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
-
#initialize(client: Snov.client, url:) ⇒ GetEmailsBySocialUrl
constructor
A new instance of GetEmailsBySocialUrl.
- #prospect ⇒ Object
- #raw_result ⇒ Object
Constructor Details
#initialize(client: Snov.client, url:) ⇒ GetEmailsBySocialUrl
Returns a new instance of GetEmailsBySocialUrl.
5 6 7 8 |
# File 'lib/snov/get_emails_by_social_url.rb', line 5 def initialize(client: Snov.client, url:) @client = client @url = url end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
3 4 5 |
# File 'lib/snov/get_emails_by_social_url.rb', line 3 def client @client end |
Instance Method Details
#prospect ⇒ Object
10 11 12 |
# File 'lib/snov/get_emails_by_social_url.rb', line 10 def prospect @prospect ||= ProspectResult.new(raw_result) end |
#raw_result ⇒ Object
14 15 16 17 |
# File 'lib/snov/get_emails_by_social_url.rb', line 14 def raw_result @raw_result ||= client.post("/v1/get-emails-from-url", "url" => @url) .deep_transform_keys! { |key| key.underscore } end |