Created
April 5, 2017 10:25
-
-
Save boffbowsh/fac07010490a15fa855deae43c5271c6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib | |
import json | |
def lambda_handler(event, context): | |
json_text = json.dumps({ | |
"text": "Tea is ready at Corestom", | |
"icon_url": "https://emoji.slack-edge.com/T026J8X3T/corestum/30c38516350c8fc6.png", | |
"username": "Corestom Teabot" | |
}) | |
params = urllib.urlencode({'payload': json_text}) | |
f = urllib.urlopen("<insert hook URL here>", params) | |
print f.read() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment