Skip to content
Permalink
Browse files

post to pixela

  • Loading branch information...
hoto17296 committed Oct 16, 2018
1 parent 02704c0 commit dfd14f1ef068943a61a9092d9df6142f20ea5519
Showing with 11 additions and 0 deletions.
  1. +11 −0 lambda/main.py
@@ -29,6 +29,17 @@ def post_to_slack():
urllib.request.urlopen(req)


def post_to_pixela():
url = '{}/decrement'.format(os.environ.get('PIXELA_GRAPH_URL'))
headers = {
'Content-Length': 0,
'X-User-Token': os.environ.get('PIXELA_API_TOKEN'),
}
req = urllib.request.Request(url, None, headers, method='put')
urllib.request.urlopen(req)


def handler(event, context):
save_to_db()
post_to_slack()
post_to_pixela()

0 comments on commit dfd14f1

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.