Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hipchat-js-client

Package Overview
Dependencies
Maintainers
13
Versions
179
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hipchat-js-client

HipChat JS client for the browser

  • 0.17.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
18
increased by38.46%
Maintainers
13
Weekly downloads
 
Created
Source

HipChat JS Client

HipChat's BOSH/XMPP communication layer has always been a mystery to me. So, a few weeks ago I set out to educate myself on how it all worked -- this client library is the side-effect.

What is this?

How about some code?

// Bootstraps the HipChat connection using your existing
// HipChat browser session
new HipChat(
    {
        onConnectionChange: function(status, condition){
            console.log('INFO', 'connection status changed to ' + status + ': ' + condition);
        },

        onConnect: function(hc){
            // Let's join all the rooms that HipChat knows about from
            // the last session
            hc.joinAutoJoinRooms();

            // Let's listen to any messages that float by
            var msgSub = hc.on('message', msgHandler);

            // Let's listen in on any presence notifications
            var presenceSub = hc.on('presence', presenceHandler);
        }
    }
});

Get the point? If not, check out the specs to see what else it can do.

What can I do with this?

This little library will allow you to win the next ShipIt! Here are some ideas:

  • Build alternate browser based HipChat clients using Chrome Extensions/Apps
  • Build an ncurses like chat app and bring chat back to the terminal
  • Integrate HipChat closer to your favorite app

I built this mostly to educate myself and have a bit of fun, but if all goes well, this may be used in the next version of the HipChat web client.

Specs

To run the specs, you must symlink this to your HipChat VM's web dir (e.g., from ../web/www/js):

ln -s ../../../hipchat-js-client

You may then access the spec runner at:

https://<dev-vm-hostname>.hipchat.com/js/hipchat-js-client/specs.html

Wanna contribute?

Go for it. Fork, commit, push, and be merry.

FAQs

Package last updated on 01 Oct 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc