Options
All
  • Public
  • Public/Protected
  • All
Menu

Class representing the ReaderModel

Hierarchy

  • ReaderModel

Index

Constructors

constructor

  • Instantiates a ReaderModel using node-maxmind reader

    Parameters

    • mmdbReader: default<any>

      The mmdbReader

    Returns ReaderModel

Properties

Private mmdbReader

mmdbReader: default<any>

Methods

anonymousIP

  • Returns the AnonymousIP db data for an IP address

    throws

    {BadMethodCallError} Throws an error when the DB doesn't support Anonymous IP queries

    throws

    {AddressNotFoundError} Throws an error when the IP address isn't found in the database

    throws

    {ValueError} Throws an error when the IP address isn't valid

    Parameters

    • ipAddress: string

      The IP Address you want to query the Anonymous IP db with

    Returns AnonymousIP

asn

  • asn(ipAddress: string): Asn
  • Returns the ASN db data for an IP address

    throws

    {BadMethodCallError} Throws an error when the DB doesn't support ASN queries

    throws

    {AddressNotFoundError} Throws an error when the IP address isn't found in the database

    throws

    {ValueError} Throws an error when the IP address isn't valid

    Parameters

    • ipAddress: string

      The IP Address you want to query the ASN db with

    Returns Asn

city

  • city(ipAddress: string): City
  • Returns the City db data for an IP address

    throws

    {BadMethodCallError} Throws an error when the DB doesn't support City queries

    throws

    {AddressNotFoundError} Throws an error when the IP address isn't found in the database

    throws

    {ValueError} Throws an error when the IP address isn't valid

    Parameters

    • ipAddress: string

      The IP Address you want to query the City db with

    Returns City

connectionType

  • Returns the Connection-Type db data for an IP address

    throws

    {BadMethodCallError} Throws an error when the DB doesn't support Connection-Type queries

    throws

    {AddressNotFoundError} Throws an error when the IP address isn't found in the database

    throws

    {ValueError} Throws an error when the IP address isn't valid

    Parameters

    • ipAddress: string

      The IP Address you want to query the Connection-Type db with

    Returns ConnectionType

country

  • country(ipAddress: string): Country
  • Returns the Country db data for an IP address

    throws

    {BadMethodCallError} Throws an error when the DB doesn't support City queries

    throws

    {AddressNotFoundError} Throws an error when the IP address isn't found in the database

    throws

    {ValueError} Throws an error when the IP address isn't valid

    Parameters

    • ipAddress: string

      The IP Address you want to query the Country db with

    Returns Country

domain

  • domain(ipAddress: string): Domain
  • Returns the Domain db data for an IP address

    throws

    {BadMethodCallError} Throws an error when the DB doesn't support Domain queries

    throws

    {AddressNotFoundError} Throws an error when the IP address isn't found in the database

    throws

    {ValueError} Throws an error when the IP address isn't valid

    Parameters

    • ipAddress: string

      The IP Address you want to query the Domain db with

    Returns Domain

enterprise

  • enterprise(ipAddress: string): City
  • Returns the Enterprise db data for an IP address

    throws

    {BadMethodCallError} Throws an error when the DB doesn't support Enterprise queries

    throws

    {AddressNotFoundError} Throws an error when the IP address isn't found in the database

    throws

    {ValueError} Throws an error when the IP address isn't valid

    Parameters

    • ipAddress: string

      The IP Address you want to query the Enterprise db with

    Returns City

Private getRecord

  • getRecord(dbType: string, ipAddress: string, fnName: string): any[]
  • Parameters

    • dbType: string
    • ipAddress: string
    • fnName: string

    Returns any[]

isp

  • isp(ipAddress: string): Isp
  • Returns the ISP db data for an IP address

    throws

    {BadMethodCallError} Throws an error when the DB doesn't support ISP queries

    throws

    {AddressNotFoundError} Throws an error when the IP address isn't found in the database

    throws

    {ValueError} Throws an error when the IP address isn't valid

    Parameters

    • ipAddress: string

      The IP Address you want to query the ISP db with

    Returns Isp

Private modelFor

  • modelFor(modelClass: any, dbType: string, ipAddress: string, fnName: string): any
  • Parameters

    • modelClass: any
    • dbType: string
    • ipAddress: string
    • fnName: string

    Returns any

Generated using TypeDoc