Git Product home page Git Product logo

hipchat-php's Introduction

hipchat-php

A PHP library for interacting with the HipChat REST API.

Composer Installation

HipChat-PHP can be installed with Composer (http://getcomposer.org/). Add the following to your composer.json file. Composer will handle the autoloading.

{
    "require": {
        "hipchat/hipchat-php": ">=1.0.0"
    }
}

Usage

$token = '<your api token>';
$hc = new HipChat\HipChat($token);

// list rooms
foreach ($hc->get_rooms() as $room) {
  echo " - $room->room_id = $room->name\n";
}

// send a message to the 'Development' room from 'API'
$hc->message_room('Development', 'API', 'This is just a test message!');

Testing

You can test this library (and your API key) using the example.php script as follows. It should print a list of your rooms and users.

./example.php <your api token>

To test the library itself, run the PHPUnit tests:

phpunit tests/

hipchat-php's People

Contributors

adriankirchner avatar anaxamaxan avatar apfelbox avatar dshimy avatar dxjones avatar eeroniemi avatar erikjohannessen avatar frittenkeez avatar kyleamathews avatar powdahound avatar thinkspill avatar zerkms avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.