Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AccountService

Hierarchy

  • AccountService

Index

Constructors

constructor

Properties

env

Methods

getCharacterInfo

  • Gets the character info for the account with the guid/password provided. This will look in the cache first, and it will only request the info from the rotmg server if the char info was not found in the cache.

    Parameters

    • guid: string

      The guid of the account to get the character info of.

    • password: string

      The password of the account to get the character info of.

    • Optional proxy: Proxy

      An optional proxy to use when making the request.

    Returns Promise<CharacterInfo>

Private getError

  • getError(response: string): Error

getServerList

  • Gets the list of servers available to connect to. This will look in the cache first and will only make a web request if the cache does not exist.

    Returns Promise<ServerList>

resolveProxyHostname

  • resolveProxyHostname(proxy: Proxy): Promise<void>
  • Resolves a proxy hostname to ensure its host field is always an IP instead of possibly a hostname.

    Parameters

    • proxy: Proxy

      The proxy to resolve the hostname of.

    Returns Promise<void>

updateCharInfoCache

  • updateCharInfoCache(guid: string, charInfo: CharacterInfo): void
  • Updates the cached character info for the account with the guid.

    Parameters

    • guid: string

      The guid of the account to update the cache of.

    • charInfo: CharacterInfo

      The new info to store in the cache.

    Returns void

Generated using TypeDoc