1
0
Fork 0
mirror of https://github.com/YunoHost/apps.git synced 2024-09-03 20:06:07 +02:00

appstore: add route to obtain popularity data info

This commit is contained in:
Alexandre Aubin 2023-09-25 15:24:23 +02:00
parent 7c13156a26
commit 281b41fc6b

View file

@ -113,6 +113,11 @@ def browse_catalog():
) )
@app.route("/popularity.json")
def popularity_json():
return {app: len(stars) for app, stars in get_stars().items()}
@app.route("/app/<app_id>") @app.route("/app/<app_id>")
def app_info(app_id): def app_info(app_id):
infos = get_catalog()["apps"].get(app_id) infos = get_catalog()["apps"].get(app_id)