aboutsummaryrefslogtreecommitdiffstats
path: root/slack.py
blob: e91963739835dcfebd691489e17aee70b108f791 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from flask import Flask, jsonify, request
app = Flask(__name__)
app.config.from_envvar('CONF')

@app.route("/echo", methods=['POST'])
def echo():
    d = {'response_type': 'in_channel',
         'text': "I'm the echo bot!",
         'attachments': [
             {'text':request.form['text']}
         ]
    }
    return jsonify(d)

if __name__=="__main__":
    app.run()