定制 salamander/yun-xin-helper 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

salamander/yun-xin-helper

最新稳定版本:1.1.1

Composer 安装命令:

composer require salamander/yun-xin-helper

包简介

php sdk for NetEase YunXin

README 文档

README

推荐使用composer:composer require salamander/yun-xin-helper

使用

创建实例

$appKey = '****'; // 网易云信分配的账号
$appSecrt = '****'; // 网易云信分配的密钥
$entrance = new \YunXinHelper\Entrance($appKey, $appSecrt);

用户

# 创建用户
$entrance->user()->create($accid, $name, $icon);


# 用户基本信息更新
$entrance->user()->update($accid, $token);


# 封禁用户
$entrance->user()->block($accid);


# 解禁用户
$entrance->user()->unblock($accid);


# 更新用户名片
$entrance->user()->updateUserInfo($accid, $name, $icon);


# 批量获取用户名片
$entrance->user()->getUserInfos($accids);

消息功能

# 文本消息
$entrance->chat()->sendTextMsg($accidFrom, $to, $open, $text);

# 图片消息
$entrance->chat()->sendPictureMsg($accidFrom, $to, $open,
        $picName, $picMD5, $picUrl, $picExt, $picWidth, $picHeight, $picSize);

# 批量文本消息
$entrance->chat()->sendTextBatchMsg($accidFrom, $accidsTo, $text);


# 发送自定义系统通知
$entrance->chat()->sendAttachMsg($from, CHAT::CHAT_ONT_TO_ONE, $to, $attach);

统计信息

  • 总下载量: 6.43k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-12-12