Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Leads

The Leads class can be instanciated only from the main class it's intended for internal use only and is not exported from the package

Hierarchy

Index

Constructors

constructor

Properties

Protected apiKey

apiKey: string

Private call

call: string = "leads"

endpoint

endpoint: string = "https://api.hunter.io/v2"

Protected instance

instance: AxiosInstance

Methods

create

delete

  • delete(id: number, callback?: Callback<void>): Promise<void>
  • delete(id: number, callback?: Callback<void>): void
  • Deletes an existing lead.

    Parameters

    • id: number
    • Optional callback: Callback<void>

    Returns Promise<void>

  • Deletes an existing lead.

    Parameters

    • id: number
    • Optional callback: Callback<void>

    Returns void

list

  • Returns all the leads already saved in your account. The leads are returned in sorted order, with the most recent leads appearing first. The optional parameters can be combined to filter the results.

    Parameters

    Returns Promise<ListLeadsResponse>

  • Returns all the leads already saved in your account. The leads are returned in sorted order, with the most recent leads appearing first. The optional parameters can be combined to filter the results.

    Parameters

    Returns void

retrieve

Protected run

  • run(__namedParameters: object): Promise<any>
  • Call the Hunter.io api internally with specified options. This method is not supposed to use directly.

    Parameters

    • __namedParameters: object
      • action: string
      • callback: any
      • id: undefined | string | number
      • options: any
      • type: string

    Returns Promise<any>

update

  • update(id: number, options: any): Promise<void>
  • update(id: number, options: any, callback: Callback<void>): void
  • Updates an existing lead. The updated values must be passed as a JSON hash. The fields you can update are the same params you can give when you create a lead.

    Parameters

    • id: number
    • options: any

    Returns Promise<void>

  • Updates an existing lead. The updated values must be passed as a JSON hash. The fields you can update are the same params you can give when you create a lead.

    Parameters

    • id: number
    • options: any
    • callback: Callback<void>

    Returns void

Generated using TypeDoc