hernandev/hipchat-laravel
Composer 安装命令:
composer require hernandev/hipchat-laravel
包简介
HipChat PHP Client Wrapper for Laravel 4 and 5
README 文档
README
This a HipChat PHP Client wrapper for Laravel 4 and 5
Installation
-
Include
"hernandev/hipchat-laravel"inside the"require"section ofcomposer.jsonfile:... "require": { ..., "hernandev/hipchat-laravel": "~2.0" } ...
-
Update composer dependencies by running:
composer update -
Insert
'Hernandev\HipchatLaravel\HipchatLaravelServiceProvider',in your'providers'array, insideapp/config/app.php:... 'providers' => [ ... Hernandev\HipchatLaravel\HipchatLaravelServiceProvider::class, ],
-
Insert
'HipChat' => Hernandev\HipchatLaravel\Facade\HipChat:class,in your'aliases'array, insideapp/config/app.php:... 'aliases' => [ ... 'HipChat' => Hernandev\HipchatLaravel\Facade\HipChat::class, ],
-
To Publish the configuration files you will need, run:
php artisan vendor:publish --tag=laravel -
Edit
app/config/hipchat.phpfile updating it your credentials / configurations:'api_token' => 'insert_your_api_token', 'app_name' => 'Your App Name', 'default_room' => null, // this is optional
Usage
Note: when 'default_room' is set on config file, there is not need to call ::setRoom('room_name'), use it only if want to work with a room that is not the default one.
-
Notify in a Room
HipChat::setRoom('RoomName'); HipChat::sendMessage('My Message'); // you have two optional parameters, `color` and `notify` // the 'red' will set the message color, and the third parameter when `true` notify all users on the room HipChat::sendMessage('My Message', 'red', true);
-
Get a Room Details
HipChat::setRoom('RoomName'); HipChat::getRoom(); // StdObject
-
Verify is a room exists
HipChat::setRoom('RoomName'); HipChat::roomExists(); // boolean
-
Get Rooms List
HipChat::getRooms(); // json
-
Retrieve Message History for a Room
HipChat::setRoom('RoomName'); return HipChat::getRoomsHistory(); // json
-
Change Room Topic
HipChat::setRoom('RoomName'); return HipChat::setRoomTopic('New Topic via API'); // boolean
-
Get a List of Users
HipChat::getUsers(); // json
-
Get an User details
HipChat::setUser('me@me.com'); // you can use id, email or @mention_name HipChat::getUser(); // StdObject
-
Create an Room
HipChat::setUser('me@me.com'); // you can use id, email or @mention_name // see optional fields on code HipChat::createRoom('New Room Name'); // boolean
-
Get a List of Users
HipChat::getUsers(); // json
-
Delete a room
HipChat::setRoom('RoomName'); HipChat::deleteRoom(); // boolean
-
Create User
// email, first_name last_name, mention_name, title HipChat::createUser('me2@me2.com', 'First Last', 'mention', 'title'); // boolean
-
Update User Info
// you can use email, mention name or user_id HipChat::setUser('me@me.com'); // same signature as create_user method, pass null the fields you dont want to update HipChat::updateUser(null, 'NewFirst New Last'); // boolean
hernandev/hipchat-laravel 适用场景与选型建议
hernandev/hipchat-laravel 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 33.27k 次下载、GitHub Stars 达 27, 最近一次更新时间为 2014 年 10 月 08 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「package」 「laravel」 「hipchat」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 hernandev/hipchat-laravel 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 hernandev/hipchat-laravel 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 hernandev/hipchat-laravel 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
PHP library for HipChat
PHP client for HipChat. Designed for incidental notifications from an application.
Beep is a lightweight Laravel package for sending notifications to your team via Slack and HipChat
HipChat module (api and logger) for Zend Framework 2
Sends an error from your OctoberCMS application directly to email, HipChat, Slack, NewRelic and more.
HipChat driver for BotMan
统计信息
- 总下载量: 33.27k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 27
- 点击次数: 9
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-10-08