@fr33m0nk/lusha-client
v1.0.1
Published
Lusha API client
Downloads
17
Maintainers
Readme
Lusha Client (Typescript/Javascript)
- This client library supports the latest API from Lusha
- This client uses Effect library. Effect is definitely worth looking into.
- However, it exposes the Promise based functions for usage
- If there is a demand, I will expose Effect based functions in later releases.
Usage
Person query API
import {personQuery, PersonQueryParams, Person} from "./index";
const queryParams: PersonQueryParams = {
firstName: "James",
lastName: "Bond",
company: "British"
}
personQuery("API_KEY")(queryParams).then((r: Person) => {
console.log("\n Yay Person Search \n")
console.log(r)
console.log("\n ------- \n")
}).catch((error) => {
console.log("\n Nay Person Search \n")
console.log(error)
})
Company query API
import {companyQuery, CompanyQueryParams, Company} from "./index";
const companyQueryParams: CompanyQueryParams = {domain: "google.com"}
companyQuery("API_KEY")(companyQueryParams).then((r: Company) => {
console.log("\n Yay Company Search \n")
console.log(r)
console.log("\n ------- \n")
}).catch((error) => {
console.log("\n Nay Company Search \n")
console.log(error)
})