Search
Preparing search index...
The search index is not available
mattermost-client-node
Options
All
Public
Public/Protected
All
Inherited
Externals
Only exported
Menu
Globals
"client"
Client
Class Client
Hierarchy
EventEmitter
Client
Index
Constructors
constructor
Properties
_conn
Attempts
_connecting
_last
Pong
_messageID
_pending
_ping
Interval
_pong
Timeout
_reconnecting
additional
Headers
authenticated
auto
Reconnect
channels
connected
email
get
All
Users
group
has
Access
Token
host
http
Proxy
logger
me
message
Max
Runes
mfa
Token
options
password
preferences
self
socket
Url
teamID
teams
tlsverify
token
useTLS
users
ws
default
Max
Listeners
Methods
_api
Call
_chunk
Message
_get
Api
Url
_get
Socket
Url
_on
Add
User
ToTeam
_on
Channel
Last
Viewed
_on
Channels
_on
Check
IfTeam
Exists
_on
Create
Team
_on
Create
User
_on
Load
User
_on
Load
Users
_on
Login
_on
Me
_on
Members
From
Channels
_on
Messages
_on
Preferences
_on
Revoke
_on
Teams
_on
Teams
ByName
_on
Unreads
For
Channels
_on
Users
OfChannel
_send
add
Listener
add
User
ToChannel
add
User
ToTeam
channel
Route
check
IfTeam
Exists
connect
create
Direct
Channel
create
Group
Channel
create
Private
Channel
create
Team
create
User
custom
Message
dialog
disconnect
edit
Post
emit
event
Names
find
Channel
ByName
get
All
Channels
get
Channel
ByID
get
Max
Listeners
get
Me
get
Preferences
get
Team
ByName
get
Teams
get
User
ByEmail
get
User
ByID
get
User
Direct
Message
Channel
listener
Count
listeners
load
Channel
Last
Viewed
load
Channels
load
Members
From
Channels
load
Messages
From
Channel
load
Unreads
For
Channels
load
User
load
Users
load
Users
From
Channel
login
off
on
on
Message
once
post
Message
prepend
Listener
prepend
Once
Listener
raw
Listeners
react
reconnect
remove
All
Listeners
remove
Listener
revoke
set
Channel
Header
set
Max
Listeners
team
Route
token
Login
unreact
upload
File
listener
Count
Constructors
constructor
new
Client
(
host
:
string
, group
:
string
, options
:
any
)
:
Client
Parameters
host:
string
group:
string
options:
any
Returns
Client
Properties
_conn
Attempts
_conn
Attempts
:
number
_connecting
_connecting
:
boolean
_last
Pong
_last
Pong
:
number
_messageID
_messageID
:
number
_pending
_pending
:
any
_ping
Interval
_ping
Interval
:
any
_pong
Timeout
_pong
Timeout
:
Timeout
_reconnecting
_reconnecting
:
boolean
additional
Headers
additional
Headers
:
object
authenticated
authenticated
:
boolean
auto
Reconnect
auto
Reconnect
:
any
channels
channels
:
any
connected
connected
:
boolean
email
email
:
string
get
All
Users
get
All
Users
:
function
Type declaration
(
)
:
any
Returns
any
group
group
:
string
has
Access
Token
has
Access
Token
:
boolean
host
host
:
string
http
Proxy
http
Proxy
:
any
logger
logger
:
any
me
me
:
any
message
Max
Runes
message
Max
Runes
:
number
mfa
Token
mfa
Token
:
string
options
options
:
any
password
password
:
string
preferences
preferences
:
any
self
self
:
any
socket
Url
socket
Url
:
string
teamID
teamID
:
any
teams
teams
:
any
tlsverify
tlsverify
:
boolean
token
token
:
any
useTLS
useTLS
:
boolean
users
users
:
any
ws
ws
:
any
Static
default
Max
Listeners
default
Max
Listeners
:
number
Methods
_api
Call
_api
Call
(
method
:
string
, path
:
string
, params
:
any
, callback
:
any
, callbackParams
?:
any
, isForm
?:
boolean
)
:
Request
Parameters
method:
string
path:
string
params:
any
callback:
any
Default value
callbackParams:
any
= {}
Default value
isForm:
boolean
= false
Returns
Request
_chunk
Message
_chunk
Message
(
msg
:
any
)
:
Array
<
string
>
Parameters
msg:
any
Returns
Array
<
string
>
_get
Api
Url
_get
Api
Url
(
path
:
string
)
:
string
Parameters
path:
string
Returns
string
_get
Socket
Url
_get
Socket
Url
(
)
:
string
Returns
string
_on
Add
User
ToTeam
_on
Add
User
ToTeam
(
data
:
any
)
:
boolean
Parameters
data:
any
Returns
boolean
_on
Channel
Last
Viewed
_on
Channel
Last
Viewed
(
data
:
any
, _headers
:
any
, _params
:
any
)
:
boolean
Parameters
data:
any
_headers:
any
_params:
any
Returns
boolean
_on
Channels
_on
Channels
(
data
:
any
, _headers
:
any
, _params
:
any
)
:
boolean
Parameters
data:
any
_headers:
any
_params:
any
Returns
boolean
_on
Check
IfTeam
Exists
_on
Check
IfTeam
Exists
(
data
:
any
)
:
boolean
Parameters
data:
any
Returns
boolean
_on
Create
Team
_on
Create
Team
(
data
:
any
)
:
boolean
Parameters
data:
any
Returns
boolean
_on
Create
User
_on
Create
User
(
data
:
any
)
:
boolean
Parameters
data:
any
Returns
boolean
_on
Load
User
_on
Load
User
(
data
:
any
, _headers
:
any
, _params
:
any
)
:
boolean
Parameters
data:
any
_headers:
any
_params:
any
Returns
boolean
_on
Load
Users
_on
Load
Users
(
data
:
User
[]
|
any
, _headers
:
any
, params
:
any
)
:
any
Parameters
data:
User
[]
|
any
_headers:
any
params:
any
Returns
any
_on
Login
_on
Login
(
data
:
any
, headers
:
any
)
:
false
|
Timeout
|
Request
Parameters
data:
any
headers:
any
Returns
false
|
Timeout
|
Request
_on
Me
_on
Me
(
data
:
any
, _headers
:
any
, _params
:
any
)
:
any
Parameters
data:
any
_headers:
any
_params:
any
Returns
any
_on
Members
From
Channels
_on
Members
From
Channels
(
data
:
any
, _headers
:
any
, _params
:
any
)
:
boolean
Parameters
data:
any
_headers:
any
_params:
any
Returns
boolean
_on
Messages
_on
Messages
(
data
:
any
, _headers
:
any
, _params
:
any
)
:
boolean
Parameters
data:
any
_headers:
any
_params:
any
Returns
boolean
_on
Preferences
_on
Preferences
(
data
:
any
, _headers
:
any
, _params
:
any
)
:
any
Parameters
data:
any
_headers:
any
_params:
any
Returns
any
_on
Revoke
_on
Revoke
(
data
:
any
)
:
boolean
Parameters
data:
any
Returns
boolean
_on
Teams
_on
Teams
(
data
:
any
, _headers
:
any
, _params
:
any
)
:
any
Parameters
data:
any
_headers:
any
_params:
any
Returns
any
_on
Teams
ByName
_on
Teams
ByName
(
data
:
any
, _headers
:
any
, _params
:
any
)
:
boolean
Parameters
data:
any
_headers:
any
_params:
any
Returns
boolean
_on
Unreads
For
Channels
_on
Unreads
For
Channels
(
data
:
any
, _headers
:
any
, _params
:
any
)
:
boolean
Parameters
data:
any
_headers:
any
_params:
any
Returns
boolean
_on
Users
OfChannel
_on
Users
OfChannel
(
data
:
any
, _headers
:
any
, _params
:
any
)
:
boolean
Parameters
data:
any
_headers:
any
_params:
any
Returns
boolean
_send
_send
(
message
:
any
)
:
any
Parameters
message:
any
Returns
any
add
Listener
add
Listener
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
add
User
ToChannel
add
User
ToChannel
(
privateChannel
:
any
, callback
:
any
)
:
Request
Parameters
privateChannel:
any
callback:
any
Returns
Request
add
User
ToTeam
add
User
ToTeam
(
user_id
:
string
, team_id
:
string
)
:
Request
Parameters
user_id:
string
team_id:
string
Returns
Request
channel
Route
channel
Route
(
channelId
:
string
)
:
string
Parameters
channelId:
string
Returns
string
check
IfTeam
Exists
check
IfTeam
Exists
(
teamName
:
string
)
:
Request
Parameters
teamName:
string
Returns
Request
connect
connect
(
)
:
void
Returns
void
create
Direct
Channel
create
Direct
Channel
(
userID
:
string
, callback
:
any
)
:
Request
Parameters
userID:
string
callback:
any
Returns
Request
create
Group
Channel
create
Group
Channel
(
userIDs
:
string
, callback
:
any
)
:
Request
Parameters
userIDs:
string
callback:
any
Returns
Request
create
Private
Channel
create
Private
Channel
(
privateChannel
:
any
, callback
:
any
)
:
Request
Parameters
privateChannel:
any
callback:
any
Returns
Request
create
Team
create
Team
(
name
:
string
, display_name
:
string
, type
?:
string
)
:
Request
Parameters
name:
string
display_name:
string
Default value
type:
string
= "I"
Returns
Request
create
User
create
User
(
user
:
User
)
:
Request
Parameters
user:
User
Returns
Request
custom
Message
custom
Message
(
postData
:
any
, channelID
:
string
)
:
Request
Parameters
postData:
any
channelID:
string
Returns
Request
dialog
dialog
(
triggerId
:
string
, url
:
string
, dialog
:
any
)
:
Request
Parameters
triggerId:
string
url:
string
dialog:
any
Returns
Request
disconnect
disconnect
(
)
:
boolean
Returns
boolean
edit
Post
edit
Post
(
postId
:
string
, msg
:
any
)
:
Request
Parameters
postId:
string
msg:
any
Returns
Request
emit
emit
(
event
:
string
|
symbol
,
...
args
:
any
[]
)
:
boolean
Parameters
event:
string
|
symbol
Rest
...
args:
any
[]
Returns
boolean
event
Names
event
Names
(
)
:
Array
<
string
|
symbol
>
Returns
Array
<
string
|
symbol
>
find
Channel
ByName
find
Channel
ByName
(
name
:
string
)
:
string
|
null
Parameters
name:
string
Returns
string
|
null
get
All
Channels
get
All
Channels
(
)
:
Record
<
string
,
any
>
Returns
Record
<
string
,
any
>
get
Channel
ByID
get
Channel
ByID
(
id
:
string
)
:
Record
<
string
,
any
>
Parameters
id:
string
Returns
Record
<
string
,
any
>
get
Max
Listeners
get
Max
Listeners
(
)
:
number
Returns
number
get
Me
get
Me
(
)
:
Request
Returns
Request
get
Preferences
get
Preferences
(
)
:
Request
Returns
Request
get
Team
ByName
get
Team
ByName
(
teamName
:
string
)
:
Request
Parameters
teamName:
string
Returns
Request
get
Teams
get
Teams
(
)
:
Request
Returns
Request
get
User
ByEmail
get
User
ByEmail
(
email
:
string
)
:
Record
<
string
,
any
>
Parameters
email:
string
Returns
Record
<
string
,
any
>
get
User
ByID
get
User
ByID
(
id
:
string
)
:
Record
<
string
,
any
>
Parameters
id:
string
Returns
Record
<
string
,
any
>
get
User
Direct
Message
Channel
get
User
Direct
Message
Channel
(
userID
:
string
, callback
:
any
)
:
void
Parameters
userID:
string
callback:
any
Returns
void
listener
Count
listener
Count
(
type
:
string
|
symbol
)
:
number
Parameters
type:
string
|
symbol
Returns
number
listeners
listeners
(
event
:
string
|
symbol
)
:
Function
[]
Parameters
event:
string
|
symbol
Returns
Function
[]
load
Channel
Last
Viewed
load
Channel
Last
Viewed
(
channelId
:
string
, prevChannelId
?:
string
|
null
)
:
Request
Parameters
channelId:
string
Default value
prevChannelId:
string
|
null
= null
Returns
Request
load
Channels
load
Channels
(
)
:
Request
Returns
Request
load
Members
From
Channels
load
Members
From
Channels
(
)
:
Request
Returns
Request
load
Messages
From
Channel
load
Messages
From
Channel
(
channelId
:
string
, options
?:
any
)
:
Request
Parameters
channelId:
string
Default value
options:
any
= {}
Returns
Request
load
Unreads
For
Channels
load
Unreads
For
Channels
(
)
:
Request
Returns
Request
load
User
load
User
(
userId
:
string
)
:
Request
Parameters
userId:
string
Returns
Request
load
Users
load
Users
(
page
?:
number
, byTeam
?:
boolean
)
:
Request
Parameters
Default value
page:
number
= 0
Default value
byTeam:
boolean
= true
Returns
Request
load
Users
From
Channel
load
Users
From
Channel
(
channelId
:
string
)
:
Request
Parameters
channelId:
string
Returns
Request
login
login
(
email
:
string
, password
:
string
, mfaToken
:
string
)
:
Request
Parameters
email:
string
password:
string
mfaToken:
string
Returns
Request
off
off
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
on
on
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
on
Message
on
Message
(
message
:
any
)
:
any
Parameters
message:
any
Returns
any
once
once
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
post
Message
post
Message
(
msg
:
any
, channelID
:
string
)
:
Request
Parameters
msg:
any
channelID:
string
Returns
Request
prepend
Listener
prepend
Listener
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
prepend
Once
Listener
prepend
Once
Listener
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
raw
Listeners
raw
Listeners
(
event
:
string
|
symbol
)
:
Function
[]
Parameters
event:
string
|
symbol
Returns
Function
[]
react
react
(
messageID
:
string
, emoji
:
string
)
:
Request
Parameters
messageID:
string
emoji:
string
Returns
Request
reconnect
reconnect
(
)
:
false
|
Timeout
Returns
false
|
Timeout
remove
All
Listeners
remove
All
Listeners
(
event
?:
string
|
symbol
)
:
this
Parameters
Optional
event:
string
|
symbol
Returns
this
remove
Listener
remove
Listener
(
event
:
string
|
symbol
, listener
:
function
)
:
this
Parameters
event:
string
|
symbol
listener:
function
(
...
args
:
any
[]
)
:
void
Parameters
Rest
...
args:
any
[]
Returns
void
Returns
this
revoke
revoke
(
userID
:
string
)
:
Request
Parameters
userID:
string
Returns
Request
set
Channel
Header
set
Channel
Header
(
channelID
:
string
, header
:
any
)
:
Request
Parameters
channelID:
string
header:
any
Returns
Request
set
Max
Listeners
set
Max
Listeners
(
n
:
number
)
:
this
Parameters
n:
number
Returns
this
team
Route
team
Route
(
)
:
string
Returns
string
token
Login
token
Login
(
token
:
string
)
:
Request
Parameters
token:
string
Returns
Request
unreact
unreact
(
messageID
:
string
, emoji
:
string
)
:
Request
Parameters
messageID:
string
emoji:
string
Returns
Request
upload
File
upload
File
(
channelId
:
string
, file
:
any
, callback
:
any
)
:
Request
Parameters
channelId:
string
file:
any
callback:
any
Returns
Request
Static
listener
Count
listener
Count
(
emitter
:
EventEmitter
, event
:
string
|
symbol
)
:
number
deprecated
since v4.0.0
Parameters
emitter:
EventEmitter
event:
string
|
symbol
Returns
number
Globals
"client"
"interfaces/channel"
"interfaces/message"
"interfaces/team"
"interfaces/user"
"user"
Client
constructor
_conn
Attempts
_connecting
_last
Pong
_messageID
_pending
_ping
Interval
_pong
Timeout
_reconnecting
additional
Headers
authenticated
auto
Reconnect
channels
connected
email
get
All
Users
group
has
Access
Token
host
http
Proxy
logger
me
message
Max
Runes
mfa
Token
options
password
preferences
self
socket
Url
teamID
teams
tlsverify
token
useTLS
users
ws
default
Max
Listeners
_api
Call
_chunk
Message
_get
Api
Url
_get
Socket
Url
_on
Add
User
ToTeam
_on
Channel
Last
Viewed
_on
Channels
_on
Check
IfTeam
Exists
_on
Create
Team
_on
Create
User
_on
Load
User
_on
Load
Users
_on
Login
_on
Me
_on
Members
From
Channels
_on
Messages
_on
Preferences
_on
Revoke
_on
Teams
_on
Teams
ByName
_on
Unreads
For
Channels
_on
Users
OfChannel
_send
add
Listener
add
User
ToChannel
add
User
ToTeam
channel
Route
check
IfTeam
Exists
connect
create
Direct
Channel
create
Group
Channel
create
Private
Channel
create
Team
create
User
custom
Message
dialog
disconnect
edit
Post
emit
event
Names
find
Channel
ByName
get
All
Channels
get
Channel
ByID
get
Max
Listeners
get
Me
get
Preferences
get
Team
ByName
get
Teams
get
User
ByEmail
get
User
ByID
get
User
Direct
Message
Channel
listener
Count
listeners
load
Channel
Last
Viewed
load
Channels
load
Members
From
Channels
load
Messages
From
Channel
load
Unreads
For
Channels
load
User
load
Users
load
Users
From
Channel
login
off
on
on
Message
once
post
Message
prepend
Listener
prepend
Once
Listener
raw
Listeners
react
reconnect
remove
All
Listeners
remove
Listener
revoke
set
Channel
Header
set
Max
Listeners
team
Route
token
Login
unreact
upload
File
listener
Count
api
Prefix
default
Ping
Interval
users
Route
Generated using
TypeDoc
since v4.0.0