Options
All
  • Public
  • Public/Protected
  • All
Menu

The main class, used by all other classes.

Hierarchy

  • HackmudApi

Index

Constructors

constructor

  • new HackmudApi(token?: undefined | string): HackmudApi

Properties

token

token: string = ""

The token to be used with the api.

Methods

getAccountData

  • getAccountData(): Promise<Account>

getChats

  • getChats(users: string[], after?: undefined | number, before?: undefined | number): Promise<any>
  • Parameters

    • users: string[]
    • Optional after: undefined | number
    • Optional before: undefined | number

    Returns Promise<any>

getToken

  • getToken(pass: string): Promise<string>

Private request

  • request(endpoint: ENDPOINTS, json: any): Promise<any>

sendChannel

  • sendChannel(channel: string, user: string, msg: string): Promise<void>
  • Parameters

    • channel: string
    • user: string
    • msg: string

    Returns Promise<void>

sendMessage

  • sendMessage(user: string, toUser: string, msg: string): Promise<void>
  • Parameters

    • user: string
    • toUser: string
    • msg: string

    Returns Promise<void>

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc