Skip to content

nim_def.client_def.NIMClientAPI

Zvicii edited this page Feb 10, 2023 · 4 revisions

Interface: NIMClientAPI

nim_def/client_def.NIMClientAPI

Table of contents

Methods

Methods

Init

Init(appKey, appDataDir, appInstallDir, config): boolean

Parameters

Name Type
appKey string
appDataDir string
appInstallDir string
config SDKConfig

Returns

boolean

Defined in

ts/nim_def/client_def.ts:387


InitEventHandlers

InitEventHandlers(): void

Returns

void

Defined in

ts/nim_def/client_def.ts:389


Login

Login(appKey, account, password, cb, jsonExtension): boolean

Parameters

Name Type
appKey string
account string
password string
cb null | LoginCallback
jsonExtension string

Returns

boolean

Defined in

ts/nim_def/client_def.ts:391


Logout

Logout(logoutType, cb, jsonExtension): void

Parameters

Name Type
logoutType NIMLogoutType
cb null | LogoutCallback
jsonExtension string

Returns

void

Defined in

ts/nim_def/client_def.ts:393


Cleanup

Cleanup(jsonExtension): void

Parameters

Name Type
jsonExtension string

Returns

void

Defined in

ts/nim_def/client_def.ts:395


GetSDKConfig

GetSDKConfig(): SDKConfig

Returns

SDKConfig

Defined in

ts/nim_def/client_def.ts:397


LoginCustomDataToJson

LoginCustomDataToJson(customData): string

Parameters

Name Type
customData string

Returns

string

Defined in

ts/nim_def/client_def.ts:399


GetLoginState

GetLoginState(jsonExtension): NIMLoginState

Parameters

Name Type
jsonExtension string

Returns

NIMLoginState

Defined in

ts/nim_def/client_def.ts:401


Relogin

Relogin(jsonExtension): void

Parameters

Name Type
jsonExtension string

Returns

void

Defined in

ts/nim_def/client_def.ts:403


KickOtherClient

KickOtherClient(clients): void

Parameters

Name Type
clients string[]

Returns

void

Defined in

ts/nim_def/client_def.ts:405


SetMultiportPushConfigAsync

SetMultiportPushConfigAsync(switch_on, cb, jsonExtension): void

Parameters

Name Type
switch_on boolean
cb null | MultiportPushConfigCallback
jsonExtension string

Returns

void

Defined in

ts/nim_def/client_def.ts:407


GetMultiportPushConfigAsync

GetMultiportPushConfigAsync(cb, jsonExtension): void

Parameters

Name Type
cb null | MultiportPushConfigCallback
jsonExtension string

Returns

void

Defined in

ts/nim_def/client_def.ts:409


GetSDKVersion

GetSDKVersion(): string

Returns

string

Defined in

ts/nim_def/client_def.ts:411


GetServerCurrentTime

GetServerCurrentTime(cb, calcLocal): void

Parameters

Name Type
cb null | GetCurrentServerTimeCallback
calcLocal boolean

Returns

void

Defined in

ts/nim_def/client_def.ts:413


GetCurrentUserAccount

GetCurrentUserAccount(): string

Returns

string

Defined in

ts/nim_def/client_def.ts:415

Clone this wiki locally