Class: Proxycurl::Client
- Inherits:
-
Object
- Object
- Proxycurl::Client
- Includes:
- HTTParty
- Defined in:
- lib/proxycurl/client.rb
Instance Method Summary collapse
- #credit_balance ⇒ Object
-
#initialize(api_key) ⇒ Client
constructor
A new instance of Client.
- #linkedin_company_employee_count(params) ⇒ Object
- #linkedin_company_employees(params) ⇒ Object
- #linkedin_company_lookup(params) ⇒ Object
- #linkedin_company_profile(url) ⇒ Object
- #linkedin_person_profile(url) ⇒ Object
Constructor Details
#initialize(api_key) ⇒ Client
Returns a new instance of Client.
10 11 12 |
# File 'lib/proxycurl/client.rb', line 10 def initialize(api_key) self.class..merge!(headers: { "Authorization" => "Bearer #{api_key}" }) end |
Instance Method Details
#credit_balance ⇒ Object
52 53 54 55 |
# File 'lib/proxycurl/client.rb', line 52 def credit_balance response = self.class.get("/credit-balance") response.parsed_response end |
#linkedin_company_employee_count(params) ⇒ Object
57 58 59 60 |
# File 'lib/proxycurl/client.rb', line 57 def linkedin_company_employee_count(params) response = self.class.get("/linkedin/company/employees/count", { query: params }) response.parsed_response end |
#linkedin_company_employees(params) ⇒ Object
47 48 49 50 |
# File 'lib/proxycurl/client.rb', line 47 def linkedin_company_employees(params) response = self.class.get("/linkedin/company/employees", { query: params }) response.parsed_response end |
#linkedin_company_lookup(params) ⇒ Object
27 28 29 30 |
# File 'lib/proxycurl/client.rb', line 27 def linkedin_company_lookup(params) response = self.class.get("/linkedin/company/resolve", { query: params }) response.parsed_response end |
#linkedin_company_profile(url) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/proxycurl/client.rb', line 14 def linkedin_company_profile(url) response = self.class.get("/linkedin/company", { query: { resolve_numeric_id: false, categories: :include, funding_data: :include, extra: :include, exit_data: :include, acquisitions: :include, url: url, } }) response.parsed_response end |
#linkedin_person_profile(url) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/proxycurl/client.rb', line 32 def linkedin_person_profile(url) response = self.class.get("/v2/linkedin", { query: { skills: :include, inferred_salary: :include, personal_email: :include, personal_contact_number: :include, twitter_profile_id: :include, facebook_profile_id: :include, github_profile_id: :include, extra: :include, url: url, } }) response.parsed_response end |