Skip to content

solar-jsoc/gohunter

Repository files navigation

gohunter

Tests Coverage Status Go Report Card PkgGoDev

Client library for hunter.io

Methods

Supported methods:

  • GET domain-search
  • GET email-finder
  • GET email-verifier
  • GET email-count
  • GET account
  • GET leads (get all leads)
  • GET lead/{number} (get one lead)
  • POST leads (create lead)
  • PUT lead/{number} (update lead)
  • DELETE lead/{number} (delete lead)

Installation

    go get github.com/solar-jsoc/gohunter

Examples

  • client init:

    client := gohunter.NewClient("token", gohunter.WithCustomClient(http.DefaultClient))
  • domain-search

    result, err := client.DomainSearch(context.TODO(), "intercom.io", "intercom", 
    	gohunter.WithLimit(20), 
    	gohunter.WithDepartment(DepartmentIT, DepartmentFinance), 
    	gohunter.WithSeniority(SenioritySenior),
    	gohunter.WithEmailType(EmailTypePersonal),
    	gohunter.WithOffset(10))
    if err != nil {
        ...
    }
  • email-finder

    result, err := client.FindEmail(context.TODO(), "intercom.io", "intercom", gohunter.UsingFullName("John Doe"))
    if err != nil {
    	...
    }
  • email-verifier

    result, err := client.VerifyEmail(context.TODO(), "ciaran@intercom.io")
    if err != nil {
    	...
    }
  • email-count

    result, err := client.EmailCount(context.TODO(), "", "intercom", gohunter.EmailTypePersonal)
    if err != nil {
    	...
    }
  • account

    result, err := client.AccountInformation(context.TODO())
    if err != nil {
    	...
    }