Giter VIP home page Giter VIP logo

drjors2 / hipchat Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tobeychris/hipchat-room-message-apiv2

0.0 2.0 0.0 16 KB

This is a simple perl script that will use Hipchat's API v2 to message a room after passing in the room name, authentication token and a message. Also includes features for selecting the colour, notifying the room, passing in an html message, using a proxy and using API v1 should you so choose.

License: GNU General Public License v2.0

Perl 100.00%

hipchat's Introduction

hipchat (hipchat-room-message-APIv2)

This is a simple perl script that will use Hipchat's API v2 to message a room after passing in the room name, authentication token and a message. Also includes features for selecting the colour, notifying the room, passing in an html message, using a proxy and using API v1 should you so choose.

This script was developed in a CentOS 6.4 environment and has not been tested anywhere else.

Sample Script Output: This script will send a notification to hipchat.

Usage:
	-room      Hipchat room name or ID.                      Example: '-room "test"'
	-token     Hipchat Authentication token.                 Example: '-token"abc"'
	-message   Message to be sent to room.                   Example: '-message"Hello World!"'
	-type      (Optional) Hipchat message type (text|html).  Example: '-type "text"'                   (default: text)
	-API       (Optional) Hipchat API Version. (v1|v2).      Example: '-type "v2"'                     (default: v2)
	-notify    (Optional) Message will trigger notification. Example: '-notify "true"'                 (default: false)
	-colour    (Optional) Message colour (y|r|g|p|g|random)  Example: '-colour "green"'                (default: yellow)
	-from      (Optional) Name message is to be sent from.   Example: '-from "Test"'                   (only used with APIv1)
	-proxy     (Optional) Network proxy to use.              Example: '-proxy "http://127.0.0.1:3128"'

Basic Example:
	hipchat.pl -room "test" -token "abc" -message "Hello World!" 

Full Example:
	hipchat.pl -room "test" -token "abc" -message "Hello World!" -type text -api v2 -notify true -colour green -proxy http://127.0.0.1:3128

Sample Successful Call:

>$hipchat.pl -room Jenkins -token abc -message 'Hello World!' -colour green -proxy http://127.0.0.1:3128 

Hipchat notification posted successfully.

Sample Unsuccessful Call (bad token):

>$hipchat.pl -room Jenkins -token abd -message 'Hello World!' -colour green -proxy http://127.0.0.1:3128 

Hipchat notification failed!
401 Unauthorized

hipchat's People

Contributors

drjors2 avatar jjtoth avatar mimoralea avatar tobeychris 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.