Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • LinkManager

Index

Properties

Accessors

Methods

Properties

links

links: {} = ...

Map of loaded links (by ID).

Type declaration

  • [id: string]: Link

Accessors

Static Instance

Methods

init

  • init(): Promise<void>
  • Init by doing the initial link loading.

    Returns Promise<void>

load

  • load(reset?: boolean): Promise<void>
  • Load links from files under the /links folder.

    Parameters

    • Optional reset: boolean

      If true, will clear the links cache before loading.

    Returns Promise<void>

loadFile

  • loadFile(filepath: string): Promise<void>
  • Load links from the specified file.

    Parameters

    • filepath: string

      Full path to the file to be loaded.

    Returns Promise<void>

urlFor

  • urlFor(id: string, country: string): string
  • Get the correct URL for the specified link and country.

    Parameters

    • id: string

      Link ID.

    • country: string

      Country code.

    Returns string

urlSearchFor

  • urlSearchFor(query: string, country: string): string
  • Get the URL for the specified search query.

    Parameters

    • query: string

      Item / text to be searched.

    • country: string

      Country code.

    Returns string

Generated using TypeDoc