Skip to content

Instantly share code, notes, and snippets.

@tym-xqo
Last active October 27, 2015 20:42
Show Gist options
  • Save tym-xqo/d416afd44b9af7b79a99 to your computer and use it in GitHub Desktop.
Save tym-xqo/d416afd44b9af7b79a99 to your computer and use it in GitHub Desktop.
def status_post(message, nickname, color):
token = os.getenv('STATUSTOKEN')
payload = {
'status': message,
'color': color,
'token': token
}
url = 'http://status.pedicel.xyz:5007'
headers = {'content-type': "application/json"}
url = '/'.join([url, nickname])
response = requests.post(url, headers=headers, data=json.dumps(payload))
return response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment