10.8.0 • Published 4 months ago

node-nim v10.8.0

Weekly downloads
-
License
ISC
Repository
github
Last release
4 months ago

NetEase Electron IM SDK

codecov GitHub all releases
中文
API Document

Table of Contents

Introduction

node-nim is a Node.js wrapper for the NetEase IM PC SDK, enabling you to utilize all of its features in your preferred frontend framework with native platform performance.
For comprehensive documentation, changelog, and technical support, please visit https://dev.yunxin.163.com/.

Runtime Requirements

RuntimeVersion
Electron>= v8.5.5
Node.js>= v12.13.0

System Requirements

SystemRequirements
Windows>= Windows 7
macOS>= 10.13.0
Linuxglibc >= 2.23

Supported Platforms

PlatformArchitecture
Windowsx64
Windowsia32
macOSx64
macOSarm64
Linuxx64
Linuxarm64

Installation

node-nim is an NPM package that can be installed using the npm install command.
It will automatically download the prebuilt binary file that fits your current platform.

npm install node-nim --save-dev

Maybe you need to build ia32 app on x64 platform or something like that, you can use --arch and --platform to specify the platform you want to build.

  • Windows x64
npm install node-nim --save-dev --arch=x64 --platform=win32
  • Windows x86
npm install node-nim --save-dev --arch=ia32 --platform=win32
  • macOS x64
npm install node-nim --save-dev --arch=x64 --platform=darwin
  • macOS arm64
npm install node-nim --save-dev --arch=arm64 --platform=darwin
  • Linux x64
npm install node-nim --save-dev --arch=x64 --platform=linux
  • Linux arm64
npm install node-nim --save-dev --arch=arm64 --platform=linux

Build From Source

Technically, native nim sdk is shipped with a prebuilt node-nim.node binary file, so there is no need to build it yourself..
But if you want to add personal features or simply prefer to do so, feel free to build it!
Build Requirements:

  • Node.js
  • npm
  • CMake
  • CMake supported generator(Unix Makefiles, Ninja, Visual Studio, Xcode...)

Now you are all set to build, run following commands in the root directory of the project:

cmake -Bbuild
cmake --build build --config Release

Now, you have your own node-nim binary file in the build directory.

Quick Start

First, you need to import the node-nim module:

// ES6 Module
import * as NIM from 'node-nim'
// CommonJS
const NIM = require('node-nim')

After importing the module, you can directly use the three types of objects we have instantiated for you, such as IM, chatroom, and qchat. Here is an example:

// IM related functions
NIM.nim.client.init('', '', '', {})
NIM.nim.client.cleanup('')

// Chatroom related functions
NIM.chatroom.init('', '')
NIM.chatroom.cleanup()

// QChat related functions
NIM.qchat.instance.init({ appkey: 'your appkey', app_data_path: 'qchat' })
NIM.qchat.instance.cleanup({})

The objects that can be directly accessed through NIM.nim are:

Object NameDescription
clientClient module
dataSyncData sync module
friendFriend module
globalGlobal module
msglogMessage log module
nosObject storage module
onlineSessionOnline session module
passThroughProxyPass-through proxy module
sessionLocal session module
subscribeEventEvent subscription module
superTeamSuper team module
sysMsgSystem message module
talkTalk module
teamTeam module
toolTool module
userUser module
pluginPlugin module
talkExMessage extension module, PIN messages, quick comments, collections

The object that can be directly accessed through NIM.chatroom corresponds to ChatRoomModule, and you can directly access the member functions under this object.

The objects that can be directly accessed through NIM.qchat are:

Object NameDescription
instanceQChat instance module
serverQChat server module
channelQChat channel module
channelCategoryQChat channel category module
messageQChat message module
systemNotificationQChat system notification module
attachmentQChat attachment module
roleQChat role module
10.8.0

5 months ago

10.8.0-beta.77

6 months ago

10.8.0-beta.78

6 months ago

10.7.0

7 months ago

10.8.0-beta.55

6 months ago

10.6.0

8 months ago

10.6.1

7 months ago

10.8.10-beta.142

4 months ago

10.8.10-beta.141

4 months ago

10.8.10-beta.153

4 months ago

10.5.1

8 months ago

10.5.2

8 months ago

10.8.10-beta.161

4 months ago

10.8.10-beta.167

4 months ago

10.8.10-beta.166

4 months ago

10.8.10-beta.163

4 months ago

10.6.0-beta.0

8 months ago

9.16.12

8 months ago

10.8.10-beta.171

4 months ago

9.18.0

10 months ago

10.5.0

9 months ago

10.4.0-beta.1

11 months ago

10.3.0-beta.1

1 year ago

9.16.8

12 months ago

9.16.9

12 months ago

10.3.1-beta.1

12 months ago

9.16.5

1 year ago

9.16.6

1 year ago

9.16.7

1 year ago

9.16.10

11 months ago

9.16.11

11 months ago

9.16.4-alpha

1 year ago

9.16.3

1 year ago

9.16.2

1 year ago

9.16.1

1 year ago

9.16.0

1 year ago

9.15.7-alpha

1 year ago

9.15.6

1 year ago

9.15.5

1 year ago

9.15.4

1 year ago

9.15.3

1 year ago

10.2.2

1 year ago

9.15.2

1 year ago

10.2.2-beta.1

1 year ago

9.15.1

1 year ago

9.15.0

1 year ago

9.14.4

1 year ago

10.2.0

1 year ago

9.14.3

1 year ago

9.14.2

2 years ago

9.13.0

2 years ago

9.12.0

2 years ago

9.12.1

2 years ago

9.11.1

2 years ago

9.11.0

2 years ago

7.8.13-rc.4

2 years ago

7.8.13-rc.3

2 years ago

7.8.13-rc.6

2 years ago

7.8.13-rc.5

2 years ago

7.8.13-rc.2

2 years ago

7.8.13-rc.1

2 years ago

9.10.0

2 years ago

7.8.13

2 years ago

9.9.0

2 years ago

9.9.2

2 years ago

9.8.0

3 years ago

9.7.0

3 years ago

9.5.0-rc.1

3 years ago

9.2.1-rc.2

3 years ago

9.2.1-rc.1

3 years ago

9.2.9-rc.1

3 years ago

9.2.6-rc.1

3 years ago

9.3.0-rc.2

3 years ago

9.4.0-rc.1

3 years ago

9.3.0-rc.1

3 years ago

9.2.0-rc.1

3 years ago

9.2.8-rc.1

3 years ago

9.2.5-rc.1

3 years ago

9.2.5-rc.2

3 years ago

9.2.5-rc.3

3 years ago

9.1.0-rc.7

3 years ago

9.1.0-rc.6

3 years ago

9.1.0-rc.9

3 years ago

9.1.0-rc.8

3 years ago

9.1.0-rc.10

3 years ago

9.1.0-rc.5

3 years ago

9.1.0-rc.1

3 years ago

9.1.0-rc.3

3 years ago

9.1.0-rc.2

3 years ago

9.1.0-rc.4

3 years ago

9.1.0

3 years ago

8.8.0

4 years ago

7.8.3

4 years ago

7.8.3-rc.2

4 years ago

7.8.3-rc.1

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.2.0

4 years ago