Giter VIP home page Giter VIP logo

hubot-sns's Introduction

hubot-sns

Build Status

Hubot script for receiving notifications from AWS Simple Notification Service

Quick Start

  1. Subscribe Hubot to SNS

    hubot-sns adds an endpoint at /hubot/sns that receives both subscription requests and notifications . By default, hubot-sns will confirm any subscription requests sent from SNS so you can simply subscribe your hubot in the console and it will automatically start receiving notifications.

  2. Handle incoming notifications

    hubot-sns sends an event when notifications are received. You can use robot.on to handle these events. Your event handler can choose to handle all notifications or add individual handlers for specific topics.

scripts/your_script.coffee

module.exports = (robot) ->

Handle all notifications

robot.on "sns:notification", (msg) -> """ Received notification: TopicArn: #{msg.topicArn} Topic: #{msg.topic} Message Id: #{msg.messageId} Subject: #{msg.subject} Message: #{msg.message} """

Handle a specific topic (named mytopic in this example):

robot.on "sns:notification:mytopic", (msg) -> """ Received notification: TopicArn: #{msg.topicArn} Topic: #{msg.topic} Message Id: #{msg.messageId} Subject: #{msg.subject} Message: #{msg.message} """

hubot-sns's People

Contributors

mdouglass avatar toadkicker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

toadkicker

hubot-sns's Issues

Do you mind if I add this to hubot-aws?

Hello!

I'm putting together the SNS features for hubot-aws (yoheimuta/hubot-aws#47) and this code definitely compliments that effort. It can ship right along side it without modification, and include your comments/credits. If you're ok with that happening let me know!

Thanks,

Todd

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.