Skip to content

Instantly share code, notes, and snippets.

@grim13b
Created February 5, 2017 07:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grim13b/565ebd7da949db98e748b214b32214fb to your computer and use it in GitHub Desktop.
Save grim13b/565ebd7da949db98e748b214b32214fb to your computer and use it in GitHub Desktop.
Lambda Python 経由で Hipchat にメッセージを送る例1
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