Coder Social home page Coder Social logo

hubot-symphony's Introduction

hubot-symphony

Hubot adapter for Symphony developed by the Symphony Foundation

Build Status Coverage Status Code Climate Dependency Status bitHound Dependencies bitHound Dev Dependencies NSP Status

semantic-release Commitizen friendly

NPM

Usage

You must pass the following environment variables to hubot

  • HUBOT_SYMPHONY_HOST set to the url of your pod without the https:// prefix
  • HUBOT_SYMPHONY_PUBLIC_KEY set to the location of your bot account .pem public key file
  • HUBOT_SYMPHONY_PRIVATE_KEY set to the location of your bot account .pem private key file
  • HUBOT_SYMPHONY_PASSPHRASE set to the passphrase associated with your bot account private key

These arguments are passed through to the NodeJs request module as described here.

If you want to send a rich message you can call send with an Object instead of a String

module.exports = (robot) ->
  robot.respond /pug me/i, (msg) ->
    msg.http("http://pugme.herokuapp.com/random")
      .get() (err, res, body) ->
        pug = JSON.parse(body).pug
        msg.send pug
        msg.send {
          format: 'MESSAGEML'
          text: "<messageML><a href=\"#{pug}\"/></messageML>"
        }

Diagnostics

A simple diagnostic script is included to help confirm that you have all the necessary pieces to get started. You can run this as follows:

npm install hubot-symphony
npm run diagnostic -- --publicKey [key1.pem] --privateKey [key2.pem] --passphrase [changeit] --host [host.symphony.com]

If the script runs as expected it will obtain and log both session and key manager tokens, look up and log some details of the bot account and then create a datafeed and poll. If you send a message using the Symphony client to the bot account you should see the details logged.

Note

The privateKey.pem and publicKey.pem files under test/resources have been generated at random and are not real keys.

hubot-symphony's People

Contributors

jonfreedman avatar maoo avatar

Watchers

Vinay Mistry 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.