Created
February 5, 2017 07:10
-
-
Save grim13b/565ebd7da949db98e748b214b32214fb to your computer and use it in GitHub Desktop.
Lambda Python 経由で Hipchat にメッセージを送る例1
This file contains hidden or 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
def _header(auth_token): | |
return { | |
u'Content-Type': u'application/json', | |
u'Authorization': u'Bearer %s' % auth_token | |
} | |
def _payload(sender, notify, color, message_format, message): | |
return json.dumps({ | |
u'from': sender, | |
u'notify': notify, | |
u'message_format': message_format, | |
u'color': color, | |
u'message': message | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment