The main class, used by all other classes.

### Hierarchy

- HackmudApi

## Index

### Constructors

- constructor

### Properties

- token

### Methods

- getAccountData
- getChats
- getToken
- request
- sendChannel
- sendMessage

## Constructors

### constructor

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

- - Defined in lib/hackmud.api.ts:17

  #### Parameters

  - ##### Optional token: undefined | string

  #### Returns HackmudApi

## Properties

### token

token: string = ""

- Defined in lib/hackmud.api.ts:17

The token to be used with the api.

## Methods

### getAccountData

- getAccountData(): Promise<Account>

- - Defined in lib/hackmud.api.ts:43

  #### Returns Promise<Account>

### getChats

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

- - Defined in lib/hackmud.api.ts:89

  #### Parameters

  - ##### users: string[]

  - ##### Optional after: undefined | number

  - ##### Optional before: undefined | number

  #### Returns Promise<any>

### getToken

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

- - Defined in lib/hackmud.api.ts:29

  #### Parameters

  - ##### pass: string

  #### Returns Promise<string>

### Private request

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

- - Defined in lib/hackmud.api.ts:25

  #### Parameters

  - ##### endpoint: ENDPOINTS

  - ##### json: any

  #### Returns Promise<any>

### sendChannel

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

- - Defined in lib/hackmud.api.ts:65

  #### Parameters

  - ##### channel: string

  - ##### user: string

  - ##### msg: string

  #### Returns Promise<void>

### sendMessage

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

- - Defined in lib/hackmud.api.ts:77

  #### Parameters

  - ##### user: string

  - ##### toUser: string

  - ##### msg: string

  #### Returns Promise<void>

Generated using TypeDoc