-
Notifications
You must be signed in to change notification settings - Fork 2
node nim.ChatRoom
node-nim.ChatRoom
-
↳
ChatRoom
- eventNames
- listeners
- listenerCount
- emit
- on
- addListener
- once
- removeListener
- off
- removeAllListeners
- initEventHandlers
- init
- cleanup
- independentEnter
- anonymousEnter
- enter
- exit
- getLoginState
- setMsgsBatchReport
- sendMsg
- getMembersOnlineAsync
- getMembersByTagOnlineAsync
- getMembersCountByTagOnlineAsync
- getMessageHistoryOnlineAsync
- getMessageHistoryByTagsOnlineAsync
- setMemberAttributeOnlineAsync
- getInfoAsync
- getMemberInfoByIDsAsync
- kickMemberAsync
- setProxy
- tempMuteMemberAsync
- tempMuteMemberByTagAsync
- updateRoomInfoAsync
- updateMyRoomRoleAsync
- queueOfferAsync
- queuePollAsync
- queueListAsync
- queueHeaderAsync
- queueDropAsync
- queueBatchUpdateAsync
- updateLocation
- updateTags
▸ eventNames(): keyof ChatRoomEvents
[]
Return an array listing the events for which the emitter has registered listeners.
keyof ChatRoomEvents
[]
node_modules/eventemitter3/index.d.ts:15
▸ listeners<T
>(event
): (...args
: ArgumentMap
<ChatRoomEvents
>[Extract
<T
, keyof ChatRoomEvents
>]) => void
[]
Return the listeners registered for a given event.
Name | Type |
---|---|
T |
extends keyof ChatRoomEvents
|
Name | Type |
---|---|
event |
T |
(...args
: ArgumentMap
<ChatRoomEvents
>[Extract
<T
, keyof ChatRoomEvents
>]) => void
[]
node_modules/eventemitter3/index.d.ts:20
▸ listenerCount(event
): number
Return the number of listeners listening to a given event.
Name | Type |
---|---|
event |
keyof ChatRoomEvents
|
number
node_modules/eventemitter3/index.d.ts:27
▸ emit<T
>(event
, ...args
): boolean
Calls each of the listeners registered for a given event.
Name | Type |
---|---|
T |
extends keyof ChatRoomEvents
|
Name | Type |
---|---|
event |
T |
...args |
ArgumentMap <ChatRoomEvents >[Extract <T , keyof ChatRoomEvents >] |
boolean
node_modules/eventemitter3/index.d.ts:32
▸ on<T
>(event
, fn
, context?
): ChatRoom
Add a listener for a given event.
Name | Type |
---|---|
T |
extends keyof ChatRoomEvents
|
Name | Type |
---|---|
event |
T |
fn |
(...args : ArgumentMap <ChatRoomEvents >[Extract <T , keyof ChatRoomEvents >]) => void
|
context? |
any |
node_modules/eventemitter3/index.d.ts:40
▸ addListener<T
>(event
, fn
, context?
): ChatRoom
Name | Type |
---|---|
T |
extends keyof ChatRoomEvents
|
Name | Type |
---|---|
event |
T |
fn |
(...args : ArgumentMap <ChatRoomEvents >[Extract <T , keyof ChatRoomEvents >]) => void
|
context? |
any |
node_modules/eventemitter3/index.d.ts:45
▸ once<T
>(event
, fn
, context?
): ChatRoom
Add a one-time listener for a given event.
Name | Type |
---|---|
T |
extends keyof ChatRoomEvents
|
Name | Type |
---|---|
event |
T |
fn |
(...args : ArgumentMap <ChatRoomEvents >[Extract <T , keyof ChatRoomEvents >]) => void
|
context? |
any |
node_modules/eventemitter3/index.d.ts:54
▸ removeListener<T
>(event
, fn?
, context?
, once?
): ChatRoom
Remove the listeners of a given event.
Name | Type |
---|---|
T |
extends keyof ChatRoomEvents
|
Name | Type |
---|---|
event |
T |
fn? |
(...args : ArgumentMap <ChatRoomEvents >[Extract <T , keyof ChatRoomEvents >]) => void
|
context? |
any |
once? |
boolean |
node_modules/eventemitter3/index.d.ts:63
▸ off<T
>(event
, fn?
, context?
, once?
): ChatRoom
Name | Type |
---|---|
T |
extends keyof ChatRoomEvents
|
Name | Type |
---|---|
event |
T |
fn? |
(...args : ArgumentMap <ChatRoomEvents >[Extract <T , keyof ChatRoomEvents >]) => void
|
context? |
any |
once? |
boolean |
node_modules/eventemitter3/index.d.ts:69
▸ removeAllListeners(event?
): ChatRoom
Remove all listeners, or those of the specified event.
Name | Type |
---|---|
event? |
keyof ChatRoomEvents
|
ChatRoomModule.removeAllListeners
node_modules/eventemitter3/index.d.ts:79
▸ initEventHandlers(): void
void
ChatRoomModule.initEventHandlers
ts/chatroom/chatroom.ts:71
▸ init(app_install_dir
, json_extension
): boolean
Name | Type |
---|---|
app_install_dir |
string |
json_extension |
string |
boolean
ts/chatroom/chatroom.ts:75
▸ cleanup(json_extension
): void
Name | Type |
---|---|
json_extension |
string |
void
ts/chatroom/chatroom.ts:79
▸ independentEnter(room_id
, info
, config
): boolean
Name | Type |
---|---|
room_id |
number |
info |
ChatRoomIndependentEnterInfo |
config |
ChatRoomConfig |
boolean
ChatRoomModule.independentEnter
ts/chatroom/chatroom.ts:83
▸ anonymousEnter(room_id
, anonymity_info
, info
, config
): boolean
Name | Type |
---|---|
room_id |
number |
anonymity_info |
ChatRoomAnoymityEnterInfo |
info |
ChatRoomEnterInfo |
config |
ChatRoomConfig |
boolean
ts/chatroom/chatroom.ts:87
▸ enter(room_id
, request_login_data
, info
, json_extension
): boolean
Name | Type |
---|---|
room_id |
number |
request_login_data |
string |
info |
ChatRoomEnterInfo |
json_extension |
string |
boolean
ts/chatroom/chatroom.ts:91
▸ exit(room_id
, json_extension
): void
Name | Type |
---|---|
room_id |
number |
json_extension |
string |
void
ts/chatroom/chatroom.ts:95
▸ getLoginState(room_id
, json_extension
): NIMChatRoomLoginState
Name | Type |
---|---|
room_id |
number |
json_extension |
string |
ts/chatroom/chatroom.ts:99
▸ setMsgsBatchReport(set_batch
, json_extension
): void
Name | Type |
---|---|
set_batch |
boolean |
json_extension |
string |
void
ChatRoomModule.setMsgsBatchReport
ts/chatroom/chatroom.ts:103
▸ sendMsg(room_id
, msg
, json_extension
): boolean
Name | Type |
---|---|
room_id |
number |
msg |
ChatRoomMessage |
json_extension |
string |
boolean
ts/chatroom/chatroom.ts:107
▸ getMembersOnlineAsync(room_id
, parameters
, cb
, json_extension
): Promise
<[number
, number
, ChatRoomMemberInfo
[]]>
Name | Type |
---|---|
room_id |
number |
parameters |
ChatRoomGetMembersParameters |
cb |
null | GetMembersCallback
|
json_extension |
string |
Promise
<[number
, number
, ChatRoomMemberInfo
[]]>
ChatRoomModule.getMembersOnlineAsync
ts/chatroom/chatroom.ts:111
▸ getMembersByTagOnlineAsync(room_id
, parameters
, cb
, json_extension
): Promise
<[number
, number
, ChatRoomMemberInfo
[]]>
Name | Type |
---|---|
room_id |
number |
parameters |
ChatRoomGetMembersByTagParameters |
cb |
null | GetMembersCallback
|
json_extension |
string |
Promise
<[number
, number
, ChatRoomMemberInfo
[]]>
ChatRoomModule.getMembersByTagOnlineAsync
ts/chatroom/chatroom.ts:132
▸ getMembersCountByTagOnlineAsync(room_id
, parameters
, cb
, json_extension
): Promise
<[number
, NIMResCode
, number
]>
Name | Type |
---|---|
room_id |
number |
parameters |
ChatRoomGetMembersParameters |
cb |
null | GetMembersCountByTagCallback
|
json_extension |
string |
Promise
<[number
, NIMResCode
, number
]>
ChatRoomModule.getMembersCountByTagOnlineAsync
ts/chatroom/chatroom.ts:153
▸ getMessageHistoryOnlineAsync(room_id
, parameters
, cb
, json_extension
): Promise
<[number
, number
, ChatRoomMessage
[]]>
Name | Type |
---|---|
room_id |
number |
parameters |
ChatRoomGetMsgHistoryParameters |
cb |
null | GetMsgHistoryCallback
|
json_extension |
string |
Promise
<[number
, number
, ChatRoomMessage
[]]>
ChatRoomModule.getMessageHistoryOnlineAsync
ts/chatroom/chatroom.ts:174
▸ getMessageHistoryByTagsOnlineAsync(room_id
, parameters
, cb
, json_extension
): Promise
<[number
, number
, ChatRoomMessage
[]]>
Name | Type |
---|---|
room_id |
number |
parameters |
ChatRoomGetMsgHistoryByTagsParameters |
cb |
null | GetMsgHistoryCallback
|
json_extension |
string |
Promise
<[number
, number
, ChatRoomMessage
[]]>
ChatRoomModule.getMessageHistoryByTagsOnlineAsync
ts/chatroom/chatroom.ts:195
▸ setMemberAttributeOnlineAsync(room_id
, parameters
, cb
, json_extension
): Promise
<[number
, NIMResCode
, ChatRoomMemberInfo
]>
Name | Type |
---|---|
room_id |
number |
parameters |
ChatRoomSetMemberAttributeParameters |
cb |
null | SetMemberAttributeCallback
|
json_extension |
string |
Promise
<[number
, NIMResCode
, ChatRoomMemberInfo
]>
ChatRoomModule.setMemberAttributeOnlineAsync
ts/chatroom/chatroom.ts:216
▸ getInfoAsync(room_id
, cb
, json_extension
): Promise
<[number
, NIMResCode
, ChatRoomInfo
]>
Name | Type |
---|---|
room_id |
number |
cb |
null | GetChatRoomInfoCallback
|
json_extension |
string |
Promise
<[number
, NIMResCode
, ChatRoomInfo
]>
ts/chatroom/chatroom.ts:237
▸ getMemberInfoByIDsAsync(room_id
, ids
, cb
, json_extension
): Promise
<[number
, NIMResCode
, ChatRoomMemberInfo
[]]>
Name | Type |
---|---|
room_id |
number |
ids |
string [] |
cb |
null | GetMembersCallback
|
json_extension |
string |
Promise
<[number
, NIMResCode
, ChatRoomMemberInfo
[]]>
ChatRoomModule.getMemberInfoByIDsAsync
ts/chatroom/chatroom.ts:252
▸ kickMemberAsync(room_id
, id
, notify_ext
, cb
, json_extension
): Promise
<[number
, NIMResCode
]>
Name | Type |
---|---|
room_id |
number |
id |
string |
notify_ext |
string |
cb |
null | KickMemberCallback
|
json_extension |
string |
Promise
<[number
, NIMResCode
]>
ChatRoomModule.kickMemberAsync
ts/chatroom/chatroom.ts:273
▸ setProxy(type
, host
, port
, user
, password
): void
Name | Type |
---|---|
type |
NIMChatRoomProxyType |
host |
string |
port |
number |
user |
string |
password |
string |
void
ts/chatroom/chatroom.ts:290
▸ tempMuteMemberAsync(room_id
, accid
, duration
, need_notify
, notify_ext
, cb
, json_extension
): Promise
<[number
, NIMResCode
, ChatRoomMemberInfo
]>
Name | Type |
---|---|
room_id |
number |
accid |
string |
duration |
number |
need_notify |
boolean |
notify_ext |
string |
cb |
null | TempMuteMemberCallback
|
json_extension |
string |
Promise
<[number
, NIMResCode
, ChatRoomMemberInfo
]>
ChatRoomModule.tempMuteMemberAsync
ts/chatroom/chatroom.ts:294
▸ tempMuteMemberByTagAsync(room_id
, target_tag
, duration
, need_notify
, notify_ext
, cb
, notify_tags
, json_extension
): Promise
<[number
, NIMResCode
, ChatRoomMemberInfo
]>
Name | Type |
---|---|
room_id |
number |
target_tag |
string |
duration |
number |
need_notify |
boolean |
notify_ext |
string |
cb |
null | TempMuteMemberCallback
|
notify_tags |
string |
json_extension |
string |
Promise
<[number
, NIMResCode
, ChatRoomMemberInfo
]>
ChatRoomModule.tempMuteMemberByTagAsync
ts/chatroom/chatroom.ts:321
▸ updateRoomInfoAsync(room_id
, room_info
, need_notify
, notify_ext
, cb
, json_extension
): Promise
<[number
, NIMResCode
]>
Name | Type |
---|---|
room_id |
number |
room_info |
ChatRoomInfo |
need_notify |
boolean |
notify_ext |
string |
cb |
null | UpdateRoomInfoCallback
|
json_extension |
string |
Promise
<[number
, NIMResCode
]>
ChatRoomModule.updateRoomInfoAsync
ts/chatroom/chatroom.ts:350
▸ updateMyRoomRoleAsync(room_id
, info
, need_notify
, notify_ext
, cb
, json_extension
): Promise
<[number
, NIMResCode
]>
Name | Type |
---|---|
room_id |
number |
info |
ChatRoomMemberInfo |
need_notify |
boolean |
notify_ext |
string |
cb |
null | UpdateMyRoomRoleCallback
|
json_extension |
string |
Promise
<[number
, NIMResCode
]>
ChatRoomModule.updateMyRoomRoleAsync
ts/chatroom/chatroom.ts:375
▸ queueOfferAsync(room_id
, element
, option
, cb
, json_extension
): Promise
<[number
, NIMResCode
, ChatRoomQueueElement
]>
Name | Type |
---|---|
room_id |
number |
element |
ChatRoomQueueElement |
option |
ChatRoomQueueOfferOption |
cb |
null | QueueOfferCallback
|
json_extension |
string |
Promise
<[number
, NIMResCode
, ChatRoomQueueElement
]>
ChatRoomModule.queueOfferAsync
ts/chatroom/chatroom.ts:400
▸ queuePollAsync(room_id
, element_key
, cb
, json_extension
): Promise
<[number
, NIMResCode
, ChatRoomQueueElement
]>
Name | Type |
---|---|
room_id |
number |
element_key |
string |
cb |
null | QueuePollCallback
|
json_extension |
string |
Promise
<[number
, NIMResCode
, ChatRoomQueueElement
]>
ts/chatroom/chatroom.ts:423
▸ queueListAsync(room_id
, cb
, json_extension
): Promise
<[number
, NIMResCode
, ChatRoomQueueElement
[]]>
Name | Type |
---|---|
room_id |
number |
cb |
null | QueueListCallback
|
json_extension |
string |
Promise
<[number
, NIMResCode
, ChatRoomQueueElement
[]]>
ts/chatroom/chatroom.ts:444
▸ queueHeaderAsync(room_id
, cb
, json_extension
): Promise
<[number
, NIMResCode
, ChatRoomQueueElement
]>
Name | Type |
---|---|
room_id |
number |
cb |
null | QueueHeaderCallback
|
json_extension |
string |
Promise
<[number
, NIMResCode
, ChatRoomQueueElement
]>
ChatRoomModule.queueHeaderAsync
ts/chatroom/chatroom.ts:459
▸ queueDropAsync(room_id
, cb
, json_extension
): Promise
<[number
, NIMResCode
]>
Name | Type |
---|---|
room_id |
number |
cb |
null | QueueDropCallback
|
json_extension |
string |
Promise
<[number
, NIMResCode
]>
ts/chatroom/chatroom.ts:474
▸ queueBatchUpdateAsync(room_id
, batch_elements
, need_notify
, notify_ext
, cb
, json_extension
): Promise
<[number
, NIMResCode
, string
[]]>
Name | Type |
---|---|
room_id |
number |
batch_elements |
ChatRoomBatchMembers |
need_notify |
boolean |
notify_ext |
string |
cb |
null | QueueBatchUpdateCallback
|
json_extension |
string |
Promise
<[number
, NIMResCode
, string
[]]>
ChatRoomModule.queueBatchUpdateAsync
ts/chatroom/chatroom.ts:489
▸ updateLocation(room_id
, location
, cb
, json_extension
): Promise
<null
| [number
, NIMResCode
]>
Name | Type |
---|---|
room_id |
number |
location |
NIMChatRoomLocation |
cb |
null | UpdateLocationCallback
|
json_extension |
string |
Promise
<null
| [number
, NIMResCode
]>
ts/chatroom/chatroom.ts:514
▸ updateTags(room_id
, tags_info
, cb
, json_extension
): Promise
<null
| [number
, NIMResCode
]>
Name | Type |
---|---|
room_id |
number |
tags_info |
ChatRoomUpdateTagsInfo |
cb |
null | UpdateTagsCallback
|
json_extension |
string |
Promise
<null
| [number
, NIMResCode
]>
ts/chatroom/chatroom.ts:539
• chatroom: any
ts/chatroom/chatroom.ts:65
• new ChatRoom()
ts/chatroom/chatroom.ts:66
- chatroom/chatroom
- chatroom_def/chatroom_def
- nim/client
- nim/data_sync
- nim/friend
- nim/global
- nim/msglog
- nim/nos
- nim/online_session
- nim/pass_through_proxy
- nim/plugin
- nim/session
- nim/subscribe_event
- nim/super_team
- nim/sysmsg
- nim/talk
- nim/talkex
- nim/team
- nim/tool
- nim/user
- nim_def/client_def
- nim_def/data_sync_def
- nim_def/doc_trans_def
- nim_def/friend_def
- nim_def/global_def
- nim_def/msglog_def
- nim_def/nos_def
- nim_def/online_session_def
- nim_def/pass_through_proxy_def
- nim_def/plugin_def
- nim_def/session_def
- nim_def/subscribe_event_def
- nim_def/super_team_def
- nim_def/sysmsg_def
- nim_def/talk_def
- nim_def/talkex_def
- nim_def/team_def
- nim_def/tool_def
- nim_def/user_def
- node-nim
- qchat/attachment
- qchat/channel
- qchat/channel_category
- qchat/instance
- qchat/message
- qchat/role
- qchat/server
- qchat/system_notification
- qchat_def/attachment_def
- qchat_def/channel_def
- qchat_def/instance_def
- qchat_def/message_def
- qchat_def/public_def
- qchat_def/role_def
- qchat_def/server_def
- qchat_def/system_notification_def