npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-yunxin-im

v1.0.1

Published

## 安装

Downloads

23

Readme

yunxin-im

安装

$ npm install node-yunxin-im

使用

const YunxinIM = require('node-yunxin-im');
const yunxinIM = new YunxinIM('<你的AppKey>', '<你的AppSecret>');

// 创建用户
await yunxinIM.exec('user/create.action', {
  accid: 'accid',
  donnopOpen: false
});

// 创建群
await yunxinIM.exec('team/create.action', {
  tname: 'tname',
  owner: 'accid',
  members: JSON.stringify([]),
  msg: '邀请你来群',
  magree: 0,
  joinmode: 0
});

// path为/nimserver/的直接使用简化的命令就可以了
// path不为/nimserver/的需要指明全路径
// 例如: sms
await yunxinIM.exec('https://api.netease.im/sms/sendcode.action', {
  mobile: 'xxxxxxxxxxxx'
});

详细文档

测试

# 因为接口都相似,我只拿用户部分的接口作了测试
# 需要在test/1.user.js配置你的AppKey,AppSecret
$ mocha

错误码快查

code| 详细描述 ----|---- 200 | 操作成功 201 | 客户端版本不对,需升级sdk 301 | 被封禁 302 | 用户名或密码错误 315 | IP限制 403 | 非法操作或没有权限 404 | 对象不存在 405 | 参数长度过长 406 | 对象只读 408 | 客户端请求超时 413 | 验证失败(短信服务) 414 | 参数错误 415 | 客户端网络问题 416 | 频率控制 417 | 重复操作 418 | 通道不可用(短信服务) 419 | 数量超过上限 422 | 账号被禁用 431 | HTTP重复请求 500 | 服务器内部错误 503 | 服务器繁忙 508 | 消息撤回时间超限 509 | 无效协议 514 | 服务不可用 998 | 解包错误 999 | 打包错误 801 | 群人数达到上限 802 | 没有权限 803 | 群不存在 804 | 用户不在群 805 | 群类型不匹配 806 | 创建群数量达到限制 807 | 群成员状态错误 808 | 申请成功 809 | 已经在群内 810 | 邀请成功 9102 | 通道失效 9103 | 已经在他端对这个呼叫响应过了 11001 | 通话不可达,对方离线状态 13001 | IM主连接状态异常 13002 | 聊天室状态异常 13003 | 账号在黑名单中,不允许进入聊天室 13004 | 在禁言列表中,不允许发言 13005 | 用户的聊天室昵称、头像或成员扩展字段被反垃圾 10431 | 输入email不是邮箱 10432 | 输入mobile不是手机号码 10433 | 注册输入的两次密码不相同 10434 | 企业不存在 10435 | 登陆密码或帐号不对 10436 | app不存在 10437 | email已注册 10438 | 手机号已注册 10441 | app名字已经存在