1.0.2 • Published 6 years ago

@daorren/netease-im v1.0.2

Weekly downloads
29
License
-
Repository
-
Last release
6 years ago

netease-im

It is Netease IM server-side SDK for node.js. using it, you can develop instant messaging Apps (iOS and Android) backed by server side services in node.js

Use crypto-js for low version Node

##Supported APIs

  • User Account: Create, delete, update, block and unblock user account.
  • Messaging: Send many kinds of message to user or user list, also send system notification message.
  • Group: Create, delete, update and query teams, also add and remove members to/from team.

For more api information, you can reference Netease IM API Docs

Installation

npm install @daorren/netease-im

Quick Start

    var Promise = require('bluebird');
    var config = require('./config');
    var log4js = require('log4js');
    var logger = log4js.getLogger();
    logger.setLevel('DEBUG');
    
    
    var nim = new Nim({
        appsecret: config.appsecret,
        appkey: config.appkey,
        logger: logger
    });

    var userForm = {
        accid: accid,
        name: name,
        props: JSON.stringify({type: 'test'}),
        icon: 'http://wx.qlogo.cn/mmopen/CyYbk1vmHvYCTpBHH4UiblcOM6IEMibm2VweVnbTm5tnWib1rQG5v6t7779AEnDSkFf212MXOVXX29JvZlKicjhUxjpRYDnTPTES/0'
    };

    nim.createUser(userForm, function(err, result){
        ...
    });

Tests & Examples

For more example code, see netease-im/test

License

MIT License. A copy is included with the source.