From 2e159050e9fcd3441b0e8487071d32b2f687e7f8 Mon Sep 17 00:00:00 2001 From: decentral1se Date: Sat, 3 Apr 2021 20:42:28 +0200 Subject: [PATCH] Grab published abra apps json file --- bin/app-json.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/bin/app-json.py b/bin/app-json.py index 96a1128..f361de6 100755 --- a/bin/app-json.py +++ b/bin/app-json.py @@ -53,6 +53,19 @@ def _run_cmd(cmd, shell=False): exit(1) +def get_published_apps_json(): + """Retrieve already published apps json.""" + url = "https://abra-apps.cloud.autonomic.zone" + + log.info(f"Retrieving {url}") + + try: + return get(url, timeout=5).json() + except Exception as exception: + log.error(f"Failed to retrieve {url}, saw {str(exception)}") + return {} + + def clone_all_apps(): """Clone all Co-op Cloud apps to ~/.abra/apps.""" if not exists(CLONES_PATH):