Last active
August 26, 2017 00:30
-
-
Save AmusingThrone/bad595c3dd93744294c2e47ad5448be1 to your computer and use it in GitHub Desktop.
Hoven API V1 Python 3 Example
This file contains 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 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