INNER CODE UNIT · Python
get_own_profile
zapek/Xeres · scripts/bot/bot.py:78
def get_own_profile():
r = requests.get(XERES_API_URL + XERES_API_PREFIX + "/profiles/1")
if r.status_code != 200:
raise RuntimeError("Couldn't get own profile")
return json.loads(r.text)
def get_own_identity():
r = requests.get(XERES_API_URL + XERES_API_PREFIX + "/identities/1")
if r.status_code != 200:
raise RuntimeError("Couldn't get own identity")
return json.loads(r.text)
def get_own_location():
r = requests.get(XERES_API_URL + XERES_API_PREFIX + "/locations/1")
if r.status_code != 200:
raise RuntimeError("Couldn't get own location")