fr33m0nk / lusha-client

Lusha API client for Typescript/Javascript

Home Page:https://www.npmjs.com/package/@fr33m0nk/lusha-client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

  • 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

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)
})
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)
})

About

Lusha API client for Typescript/Javascript

https://www.npmjs.com/package/@fr33m0nk/lusha-client


Languages

Language:TypeScript 100.0%