Options
All
  • Public
  • Public/Protected
  • All
Menu

Class compendium

Base class for hyrule-compendium

param

Base URL for API

param

Default milliseconds to wait for response for all API calling functions until error

Hierarchy

  • compendium

Index

Constructors

constructor

  • new compendium(default_timeout?: number, url?: string): compendium
  • Parameters

    • default_timeout: number = 20000
    • url: string = "https://botw-compendium.herokuapp.com/api/v2"

    Returns compendium

Properties

Private default_timeout

default_timeout: number

Private url

url: string

Methods

download_entry_image

  • download_entry_image(entry: entryName | entryId, output_file?: string, callback?: Function, timeout?: number, error_callback?: Function): void
  • deprecated

    Since v1.5.0. Use entry_image.download() Downloads the image of an entry

    Parameters

    • entry: entryName | entryId

      ID or name of entry

    • Optional output_file: string
    • callback: Function = ...
    • timeout: number = ...

      Time to wait for response before executing @param error_callback

    • error_callback: Function = ...

    Returns void

get_all

  • get_all(callback: AllCallback, timeout?: number, error_callback?: Function): void
  • Gets all entries

    Parameters

    • callback: AllCallback

      Function to be executed with all entries

    • timeout: number = ...

      Time to wait for response before executing @param error_callback

    • error_callback: Function = ...

    Returns void

get_category

  • get_category(category: "creatures" | "equipment" | "materials" | "monsters" | "treasure", callback: CategoryCallback, timeout?: number, error_callback?: Function): void
  • Gets all entries from a category

    Parameters

    • category: "creatures" | "equipment" | "materials" | "monsters" | "treasure"

      Name of category

    • callback: CategoryCallback

      Function to be executed with all entries in the category.

    • timeout: number = ...
    • error_callback: Function = ...

    Returns void

get_entry

  • Gets an entry

    throws

    {NoEntryError} Entry must exist

    Parameters

    • entry: entryName | entryId

      The entry to be retrieved

    • callback: EntryCallback

      Function to be executed with API data

    • timeout: number = ...
    • error_callback: Function = ...

    Returns void

get_entry_image

Generated using TypeDoc