hernandev/hipchat-laravel 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

hernandev/hipchat-laravel

最新稳定版本:2.0.1

Composer 安装命令:

composer require hernandev/hipchat-laravel

包简介

HipChat PHP Client Wrapper for Laravel 4 and 5

README 文档

README

Latest Stable Version Total Downloads License

This a HipChat PHP Client wrapper for Laravel 4 and 5

Installation

  • Include "hernandev/hipchat-laravel" inside the "require" section of composer.json file:

        ...
        "require": {
            ...,
            "hernandev/hipchat-laravel": "~2.0"
        }
        ...
  • Update composer dependencies by running:

    composer update
    
  • Insert 'Hernandev\HipchatLaravel\HipchatLaravelServiceProvider', in your 'providers' array, inside app/config/app.php:

    ...
    'providers' => [
        ...
        Hernandev\HipchatLaravel\HipchatLaravelServiceProvider::class,
    ],
  • Insert 'HipChat' => Hernandev\HipchatLaravel\Facade\HipChat:class, in your 'aliases' array, inside app/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.php file 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

统计信息

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

GitHub 信息

  • Stars: 27
  • Watchers: 1
  • Forks: 8
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-10-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固