Coder Social home page Coder Social logo

flyte-hipchat's Introduction

flyte-hipchat

Build Status Docker Stars Docker Pulls

A HipChat pack for Flyte.

Bulding

Must have dep installed

  • Run dep ensure
  • Run go test ./...
  • Run go build

Configuration

The plugin is configured using environment variables:

ENV VAR Default Description Example
FLYTE_API - The API endpoint to use http://localhost:8080
HIPCHAT_TOKENS - The API tokens to use, comma separated token_abc
DEFAULT_JOIN_ROOM - A room to join by default when launched 1234
BKP_DIR $TMPDIR Directory where to backup joined rooms /flyte-hipchat

Example FLYTE_API=http://localhost:8080 HIPCHAT_TOKENS=token_abc DEFAULT_JOIN_ROOM=1234 ./flyte-hipchat

Commands

All the events have the same fields as the command input plus error, which is omitted if the command was successful

SendMessage

{
    "roomId": "...", // required
    "message": "..." // required
}

Returned events

MessageSent

{
    "roomId": "...",
    "message": "..."
}

SendMessageFailed

{
    "roomId": "...",
    "message": "...",
    "error": "..."
}

SendNotification

{
    "roomId": "...",        // required
    "message": "...",       // required
    "messageFormat": "...", // [text|html] default text
    "notify": "...",        // [true|false] default false
    "color": "...",         // [yellow|green|red|purple|gray|random] defaults to yellow
    "from": "..."           // required
}

Returned events

NotificationSent

{
    "roomId": "...",
    "message": "...",
    "messageFormat": "...",
    "notify": "...",
    "color": "...",
    "from": "..."
}

SendNotificationFailed

{
    "roomId": "...",
    "message": "...",
    "messageFormat": "...",
    "notify": "...",
    "color": "...",
    "from": "...",
    "error": "..."
}

Broadcast

Same as send message, but without room id. Message will be sent to all the rooms that pack has joined.

{
    "message": "..." // required
}

Returned events

BroadcastSent

{
    "message": "..."
}

BroadcastFailed

{
    "message": "...",
    "error": "..."
}

JoinRoom

Joins room, pack will start sending ReceivedMessage events there's new message in the room

{
    "roomId": "..." // required
}

Returned events

RoomJoined

{
    "roomId": "..."
}

JoinRoomFailed

{
    "roomId": "...",
    "error": "..."
}

LeaveRoom

Leaves HipChat room, room will not be monitored for incoming messages.

{
    "roomId": "..." // required
}

Returned events

RoomLeft

{
    "roomId": "..."
}

LeaveRoomFailed

{
    "roomId": "...",
    "error": "..."
}

Events

ReceivedMessage

{
    "id": "...",
    "roomId": "...",
    "date": "...",
    "from": {
        "id": "...",
        "name": "...",
        "mentionName": "...",
    },
    "mentions": [
        {
            "id": "...",
            "name": "...",
            "mentionName": "...",
        }
    ],
    "message": "...",
    "messageFormat": "...",
    "type": "..."
}

flyte-hipchat's People

Contributors

dangorst1066 avatar dvdthms avatar pamelin 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.