Class representing the WebServiceClient *

Constructors

  • Instantiates a WebServiceClient

    Parameters

    • accountID: string

      The account ID

    • licenseKey: string

      The license key

    • Optional options: number | Options

      Additional option to use when connecting to the web service. If you pass a number as the third parameter, it will be treated as the timeout; however, passing in a number should be considered deprecated and may be removed in a future major version.

    Returns WebServiceClient

Properties

accountID: string
host: string = 'geoip.maxmind.com'
licenseKey: string
timeout: number = 3000

Methods

  • Returns a Promise with the City Plus data for an IP address.

    Parameters

    • ipAddress: string

      The IP Address you want to query the City Plus web service with

    Returns Promise<City>

  • Returns a Promise with the Country data for an IP address.

    Parameters

    • ipAddress: string

      The IP Address you want to query the Country web service with

    Returns Promise<Country>

  • Parameters

    • data: ResponseError
    • response: IncomingMessage
    • url: string

    Returns WebServiceClientError

  • Returns a Promise with the Insights data for an IP address.

    Insights is only supported by the GeoIP2 web service. It is not supported by the GeoLite2 web service.

    Parameters

    • ipAddress: string

      The IP Address you want to query the Insights web service with

    Returns Promise<Insights>

  • Type Parameters

    • T

    Parameters

    • path: servicePath
    • ipAddress: string
    • modelClass: any

    Returns Promise<T>

Generated using TypeDoc