Skip to content

Commit

Permalink
Merge pull request #21 from deckerego/ifttt_fixes
Browse files Browse the repository at this point in the history
Add version to Maker event sent to IFTTT
  • Loading branch information
deckerego authored Feb 1, 2017
2 parents ddc13b4 + 6b6d988 commit 3145c68
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/hackclock/runapp/Libs/IFTTT.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class IFTTT:
__KEY = None
__HEADERS = { "Content-type": "application/json" }
__NAME = "hackclock"
__VERSION = "HackClock 2.0.0"

def __init__(self, key):
self.__NAME = platform.node()
Expand All @@ -27,7 +28,7 @@ def sendMakerEvent(self, eventName):
return

datejson = datetime.datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%S.%fZ')
body = json.dumps({"value1": self.__NAME, "value2": datejson})
body = json.dumps({"value1": self.__NAME, "value2": datejson, "value3": self.__VERSION})
logger.info("IFTTT Body: %s" % body)

conn = httplib.HTTPSConnection(self.__SERVER, self.__PORT)
Expand Down

0 comments on commit 3145c68

Please sign in to comment.