Skip to content

lokhi/lushao

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lushao

A tiny ruby wrapper around Lusha API. The Lusha API enables you to enrich and authenticate the business profiles you utilize and offer.

Installation

Add this line to your application's Gemfile:

gem 'lushao'

And then execute:

$ bundle

Or install it yourself as:

$ gem install lushao

Usage

require 'lushao'
lushao = Lushao.new('Your secret API key')

Your secret API key. You can get it in your dashboard from https://dashboard.lusha.co/api

Person API

The person API lets you look up a person data based on his name and the company, or the domain of the company he works for. For example, you can get the person’s location, email and phone number, as well as his or her social network username.

With company name

result = lushao.find_person_with_company("intercom","Rob","Taylor")
hit only with phone number
result = lushao.find_person_with_company("intercom","Rob","Taylor","phoneNumbers")
hit only with email
result = lushao.find_person_with_company("intercom","Rob","Taylor","emailAddresses")

With company domain

result = lushao.find_person_with_domain("intercom.com","Rob","Taylor")
hit only with phone number
result = lushao.find_person_with_domain("intercom.com","Rob","Taylor","phoneNumbers")
hit only with email
result = lushao.find_person_with_domain("intercom.com","Rob","Taylor","emailAddresses")

Accessing person response

result.data.fetch(:phoneNumbers)
result.data.fetch(:emailAddresses)

Company API

The company API provides information about any organization you look for to help you get a complete picture, such as overview, social network presence and location.

With company name

result = lushao.find_company_with_name("intercom")

With company domain

result = lushao.find_company_with_domain("intercom.com")

Accessing company response

result.data.fetch(:description)
result.data.fetch(:domain)
result.data.fetch(:employees)
result.data.fetch(:founded)
result.data.fetch(:founders)
result.data.fetch(:logo)
result.data.fetch(:name)
result.data.fetch(:social)
result.data.fetch(:website)

Check for errors

if  defined?(result.errors)
  puts result.errors[:message]
else
    # Accessing response and do some stuff
end

Lusha API documentation

https://www.lusha.co/docs/

License

The lushao GEM is released under the MIT License.

Contributing

  1. Fork it ( https://github.com/[my-github-username]/lushao/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published