Skip to content

Instantly share code, notes, and snippets.

@AmusingThrone
Last active August 26, 2017 00:30
Show Gist options
  • Save AmusingThrone/bad595c3dd93744294c2e47ad5448be1 to your computer and use it in GitHub Desktop.
Save AmusingThrone/bad595c3dd93744294c2e47ad5448be1 to your computer and use it in GitHub Desktop.
Hoven API V1 Python 3 Example
import json
import requests
r = requests.get("http://api.amusingthrone.com/hoven/v1/?stats");
data = json.loads(r.text)
try:
print("Users: {}".format(data['users']))
print("Servers: {}".format(data['servers']))
print("Status: {}".format(data['status']))
except Exception as e:
print("Error: {}".format(data['message']))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment