Web Apps


New Ryzom API

Python example to get api data, convert to json, and pretty print:

first install:
pip3 install requests xmltodict


#!/usr/bin/env python3

import json, requests, time, xmltodict

api = 'http://api.ryzom.com/time.php?format=xml'

response = requests.get(api)
jsondata = xmltodict.parse(response.text)
print(json.dumps(jsondata, sort_keys = True, indent = 4))

---

Tgwaste
Show topic
Last visit Fri Jan 27 20:38:43 2023 UTC
P_:

powered by ryzom-api