Skip to content

Instantly share code, notes, and snippets.

@brianr
Created December 4, 2012 00:04
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 brianr/4199228 to your computer and use it in GitHub Desktop.
Save brianr/4199228 to your computer and use it in GitHub Desktop.
sample ratchet.io. api usage including custom fingerprint and title
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