Skip to content

nim.talkex.NIMTalkEx

Zvicii edited this page Feb 10, 2023 · 6 revisions

Class: NIMTalkEx

nim/talkex.NIMTalkEx

Hierarchy

Table of contents

Methods

Properties

Constructors

Methods

eventNames

eventNames(): keyof NIMTalkExEvents[]

Return an array listing the events for which the emitter has registered listeners.

Returns

keyof NIMTalkExEvents[]

Inherited from

EventEmitter.eventNames

Defined in

node_modules/eventemitter3/index.d.ts:15


listeners

listeners<T>(event): (...args: ArgumentMap<NIMTalkExEvents>[Extract<T, keyof NIMTalkExEvents>]) => void[]

Return the listeners registered for a given event.

Type parameters

Name Type
T extends keyof NIMTalkExEvents

Parameters

Name Type
event T

Returns

(...args: ArgumentMap<NIMTalkExEvents>[Extract<T, keyof NIMTalkExEvents>]) => void[]

Inherited from

EventEmitter.listeners

Defined in

node_modules/eventemitter3/index.d.ts:20


listenerCount

listenerCount(event): number

Return the number of listeners listening to a given event.

Parameters

Name Type
event keyof NIMTalkExEvents

Returns

number

Inherited from

EventEmitter.listenerCount

Defined in

node_modules/eventemitter3/index.d.ts:27


emit

emit<T>(event, ...args): boolean

Calls each of the listeners registered for a given event.

Type parameters

Name Type
T extends keyof NIMTalkExEvents

Parameters

Name Type
event T
...args ArgumentMap<NIMTalkExEvents>[Extract<T, keyof NIMTalkExEvents>]

Returns

boolean

Inherited from

EventEmitter.emit

Defined in

node_modules/eventemitter3/index.d.ts:32


on

on<T>(event, fn, context?): NIMTalkEx

Add a listener for a given event.

Type parameters

Name Type
T extends keyof NIMTalkExEvents

Parameters

Name Type
event T
fn (...args: ArgumentMap<NIMTalkExEvents>[Extract<T, keyof NIMTalkExEvents>]) => void
context? any

Returns

NIMTalkEx

Inherited from

EventEmitter.on

Defined in

node_modules/eventemitter3/index.d.ts:40


addListener

addListener<T>(event, fn, context?): NIMTalkEx

Type parameters

Name Type
T extends keyof NIMTalkExEvents

Parameters

Name Type
event T
fn (...args: ArgumentMap<NIMTalkExEvents>[Extract<T, keyof NIMTalkExEvents>]) => void
context? any

Returns

NIMTalkEx

Inherited from

EventEmitter.addListener

Defined in

node_modules/eventemitter3/index.d.ts:45


once

once<T>(event, fn, context?): NIMTalkEx

Add a one-time listener for a given event.

Type parameters

Name Type
T extends keyof NIMTalkExEvents

Parameters

Name Type
event T
fn (...args: ArgumentMap<NIMTalkExEvents>[Extract<T, keyof NIMTalkExEvents>]) => void
context? any

Returns

NIMTalkEx

Inherited from

EventEmitter.once

Defined in

node_modules/eventemitter3/index.d.ts:54


removeListener

removeListener<T>(event, fn?, context?, once?): NIMTalkEx

Remove the listeners of a given event.

Type parameters

Name Type
T extends keyof NIMTalkExEvents

Parameters

Name Type
event T
fn? (...args: ArgumentMap<NIMTalkExEvents>[Extract<T, keyof NIMTalkExEvents>]) => void
context? any
once? boolean

Returns

NIMTalkEx

Inherited from

EventEmitter.removeListener

Defined in

node_modules/eventemitter3/index.d.ts:63


off

off<T>(event, fn?, context?, once?): NIMTalkEx

Type parameters

Name Type
T extends keyof NIMTalkExEvents

Parameters

Name Type
event T
fn? (...args: ArgumentMap<NIMTalkExEvents>[Extract<T, keyof NIMTalkExEvents>]) => void
context? any
once? boolean

Returns

NIMTalkEx

Inherited from

EventEmitter.off

Defined in

node_modules/eventemitter3/index.d.ts:69


removeAllListeners

removeAllListeners(event?): NIMTalkEx

Remove all listeners, or those of the specified event.

Parameters

Name Type
event? keyof NIMTalkExEvents

Returns

NIMTalkEx

Inherited from

EventEmitter.removeAllListeners

Defined in

node_modules/eventemitter3/index.d.ts:79


initEventHandlers

initEventHandlers(): void

注册全局回调

Returns

void

Defined in

ts/nim/talkex.ts:53


addCollect

addCollect(collect_info, cb): Promise<[NIMResCode, CollectInfo]>

添加收藏

Parameters

Name Type Description
collect_info CollectInfo 收藏内容
cb null | AddCollectCallback 执行结果回调函数

Returns

Promise<[NIMResCode, CollectInfo]>

void 无返回值

Defined in

ts/nim/talkex.ts:63


removeCollects

removeCollects(collect_list, cb): Promise<[NIMResCode, number]>

批量删除收藏

Parameters

Name Type Description
collect_list RemoveCollectsParm 要删除的收藏列表
cb null | RemoveCollectsCallback 执行结果回调函数

Returns

Promise<[NIMResCode, number]>

void 无返回值

Defined in

ts/nim/talkex.ts:79


updateCollectExt

updateCollectExt(collect_match_param, ext, cb): Promise<[NIMResCode, CollectInfo]>

更新收藏扩展字段

Parameters

Name Type Description
collect_match_param MatchCollectParm 根据收藏的id 与 create time去匹配收藏内容
ext string 收藏的扩展字段内容
cb null | UpdateCollectCallback 执行结果回调函数

Returns

Promise<[NIMResCode, CollectInfo]>

void 无返回值

Defined in

ts/nim/talkex.ts:96


queryCollectList

queryCollectList(query_collect_list_param, cb): Promise<[NIMResCode, number, CollectInfoList]>

分页查询收藏列表

Parameters

Name Type Description
query_collect_list_param QueryCollectsParm 查询参数
cb null | QueryCollectsCallback 执行结果回调函数

Returns

Promise<[NIMResCode, number, CollectInfoList]>

void 无返回值

Defined in

ts/nim/talkex.ts:112


addQuickComment

addQuickComment(msg, info, cb): Promise<[NIMResCode, QuickCommentInfo]>

添加快捷回复

Parameters

Name Type Description
msg IMMessage 被回复的消息
info QuickCommentInfo 回复的内容及设置
cb null | AddQuickCommentCallback 执行结果回调函数

Returns

Promise<[NIMResCode, QuickCommentInfo]>

void 无返回值

Defined in

ts/nim/talkex.ts:129


removeQuickComment

removeQuickComment(msg, param, cb): Promise<[NIMResCode, string]>

删除快捷回复

Parameters

Name Type Description
msg IMMessage 被删除的消息
param RemoveQuickCommentParam 删除设置
cb null | RemoveQuickCommentCallback 执行结果回调函数

Returns

Promise<[NIMResCode, string]>

void 无返回值

Defined in

ts/nim/talkex.ts:146


queryQuickCommentList

queryQuickCommentList(query_param, cb): Promise<[NIMResCode, QueryQuickCommentsResponse]>

查询快捷回复

Parameters

Name Type Description
query_param QueryQuickCommentsParam 查询参数,一次最多只能查询20条消息的快捷回复
cb null | QueryQuickCommentCallback 执行结果回调函数

Returns

Promise<[NIMResCode, QueryQuickCommentsResponse]>

void 无返回值

Defined in

ts/nim/talkex.ts:162


addPinMessage

addPinMessage(msg, info, cb): Promise<[NIMResCode, string, number, PinMessageInfo]>

Pin某条消息

Parameters

Name Type Description
msg IMMessage 要Pin的消息
info PinMessageInfo -
cb null | PinMessageCallback 执行结果回调函数

Returns

Promise<[NIMResCode, string, number, PinMessageInfo]>

void 无返回值

Defined in

ts/nim/talkex.ts:180


unPinMessage

unPinMessage(modify_param, cb): Promise<[NIMResCode, string, number, string]>

取消Pin某条消息

Parameters

Name Type Description
modify_param ModifyPinMessageParam UnPin Message 参数
cb null | UnPinMessageCallback 执行结果回调函数

Returns

Promise<[NIMResCode, string, number, string]>

void 无返回值

Defined in

ts/nim/talkex.ts:196


updatePinMessage

updatePinMessage(modify_param, cb): Promise<[NIMResCode, string, number, PinMessageInfo]>

更新 Pin Message ext字段

Parameters

Name Type Description
modify_param ModifyPinMessageParam 更新 Pin Message 参数
cb null | UpdatePinMessageCallback 执行结果回调函数

Returns

Promise<[NIMResCode, string, number, PinMessageInfo]>

void 无返回值

Defined in

ts/nim/talkex.ts:212


queryAllPinMessage

queryAllPinMessage(session, to_type, cb): Promise<[NIMResCode, string, number, QueryAllPinMessageResponse]>

查询会话的所有 Pin Message

Parameters

Name Type Description
session string 会话ID
to_type number 会话类型
cb null | QueryPinMessageCallback 执行结果回调函数

Returns

Promise<[NIMResCode, string, number, QueryAllPinMessageResponse]>

void 无返回值

Defined in

ts/nim/talkex.ts:229

Properties

talkex

talkex: NIMTalkExAPI

Defined in

ts/nim/talkex.ts:46

Constructors

constructor

new NIMTalkEx()

Overrides

EventEmitter<NIMTalkExEvents&gt;.constructor

Defined in

ts/nim/talkex.ts:47

Clone this wiki locally