import requests
URL_API = "https://api.nutra.tk"
+# TODO: try all of these; cache (save in prefs.json) the one which works first
+URLS_API = (
+ "https://api.nutra.tk",
+ "https://216.218.216.163/api", # prod
+ "https://216.218.228.93/api", # dev
+)
REQUEST_READ_TIMEOUT = 18
REQUEST_CONNECT_TIMEOUT = 5
req.raise_for_status()
return dict(req.json())
+ # TODO: move this outside class; support with host iteration helper method
def post_bug(self, bug: tuple) -> None:
"""Post a bug report to the developer."""
print("posting bug report...")