nyzx-imjs

0.1.6 • Public • Published

im-login

使用方式

import {init,imLogin} from 'nyzx-im'
init(mode) //mode test serve 
imLogin(userId,identity) // userId 用户id  identity   用户身份
createSingleCharMessage(to,content) //创建单聊消息
/**
 * to 
 *  userId
 *  userType
 * content 通过createContent 创建的消息体
 * 
 * */
createContent(type,lastMsg,msgType,content) 
// type 消息的大类型 
// lastMsg 最后一句话 
// msgType 消息的具体类型  
// content 此消息需要的参数

registerCallback(events,callback)

events 

const events = {
    NEW_MESSAGE:'NEW_MESSAGE'
}

Readme

Keywords

none

Package Sidebar

Install

npm i nyzx-imjs

Weekly Downloads

1

Version

0.1.6

License

ISC

Unpacked Size

482 kB

Total Files

8

Last publish

Collaborators

  • whd15890182384