Created
December 4, 2012 00:04
-
-
Save brianr/4199228 to your computer and use it in GitHub Desktop.
sample ratchet.io. api usage including custom fingerprint and title
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
import json | |
import time | |
import requests | |
access_token = 'xxxxx' | |
payload = { | |
'access_token': access_token, | |
'data': { | |
'environment': 'test', | |
'body': { | |
'message': {'body': "hello", 'name': 'brian'} | |
}, | |
'timestamp': int(time.time()), | |
'level': 'info', | |
'fingerprint': 'x' * 40, | |
'title': 'custom title yo' | |
} | |
} | |
resp = requests.post('https://submit.ratchet.io/api/1/item/', data=json.dumps(payload)) | |
print resp | |
print resp.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment