JSPM

@fr33m0nk/lusha-client

1.0.1
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 4
    • Score
      100M100P100Q38914F
    • License MIT

    Lusha API client

    Package Exports

      This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@fr33m0nk/lusha-client) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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