承接 atdev/rocket-chat 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

atdev/rocket-chat

最新稳定版本:1.0.14

Composer 安装命令:

composer require atdev/rocket-chat

包简介

Rocket Chat REST API PHP Wrapper Library

README 文档

README

This is a wrapper for Rest API of Rocket Chat: https://developer.rocket.chat/reference/api/rest-api

Installation

This library is installed via Composer. You will need to require atdev/rocket-chat:

composer require atdev/rocket-chat:~1.0

How to use

LOGIN

// Firstly, init
\ATDev\RocketChat\Chat::setUrl("http://chat.me"); // No trailing /

// Now, login
$result = \ATDev\RocketChat\Chat::login("[USER LOGIN]", "[USER PASSWORD]");

if (!$result) {

	// Log the error
	$error = \ATDev\RocketChat\Chat::getError();
}

GET CURRENTLY LOGGED IN USER

$who = \ATDev\RocketChat\Chat::me();

if (!$who) {

	// Log the error
	$error = \ATDev\RocketChat\Chat::getError();
}

LOGOUT

\ATDev\RocketChat\Chat::logout();

Now, when you are logged in, you can:

Manage Users

Manage Channels

Manage Groups

Manage Messages

Manage Ims

Manage Roles

Unit tests

Tests are run by ./vendor/bin/phpunit tests. Although the library code is designed to be compatible with php 5.6, testing requires php 7.3 as minimum because of phpunit version 9.

PHP Code Fixer

PHP-CS-Fixer is used to fix automatically coding standard issues. .php_cs.dist is set to handle PSR-12 coding style. To lint code against code style run ./vendor/bin/php-cs-fixer fix --verbose --show-progress=estimating --dry-run. To fix code styles automatically run above command without --dry-run option.

统计信息

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

GitHub 信息

  • Stars: 28
  • Watchers: 6
  • Forks: 18
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-05-18