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

zby_im_sdk

v1.1.1

Published

直播云imSDK

Downloads

3

Readme

ImSdk 接口文档 (version 1.1.1)

环境配制

1.引入文件

1.1.script标签引入

    <script type="text/javascript" src="{sdk}/zby_im_sdk.js"></script>

1.2.npm+import引入

    // 安装
    npm i -D zby_im_sdk

    // 引入
    import ImSdk from "zby_im_sdk";

1.3.requirejs引入

    require(["{sdk}/zby_im_sdk.js"], function (ImSdk) {});

1.4.使用

    // 创建ImSdk对象
    let im = new ImSdk(options);

    // 绑定监听事件
    im.on("handlerConnected", function () {});

    // 初始化SDK
    im.initIm();

注:

(1) 客户端发送的authenticate事件 和客户端接收的事件unauthorized和authenticated事件与原来保持一致;

(2) 每个命名空间的join_room、leave_room、disconnect一致,只在control中列出;

(3) 所有字段必须填充,不需要该字段可以置为空;

(4) 输入、输出字段名整理为一致,所以客户端emit事件的参数名大都做了调整

(5) 带删除线的是去掉的字段

(6) 字段名全部为小写

(7) 除authenticate 事件外,emit都带Callback回调,回调的参数定义为:

"ack_status": {
    OK: {
        code: 0,
        message: "OK"
    },

    INTERNAL_ERROR: {
        code: 401,
        message: "服务器内部错误"
    },

    PERMISSION_DENY: {
        code: 201,
        message: "用户无权限"
    },

    PARAMETER_ERROR: {
        code: 201,
        message: "参数错误"
    }

    FAILED: {
        code: 400,
        message: "请求失败"
    }
}

2.1 control(on/emit事件)

2.2 chat(on/emit事件)

2.3 interact(on/emit事件)