Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • CountryManager

Index

Properties

Accessors

Methods

Properties

aliases

aliases: {} = ...

Country aliases.

Type declaration

  • [id: string]: string

Accessors

Static Instance

Methods

getForIP

  • getForIP(ip: string): Promise<string>
  • Get the country for the specified IP by querying the ip-api endpoint.

    Parameters

    • ip: string

      The IP address.

    Returns Promise<string>

init

  • init(): Promise<void>
  • Init by loading the country aliases.

    Returns Promise<void>

load

  • load(): Promise<void>
  • Load links from the /links folder.

    Returns Promise<void>

Generated using TypeDoc