The task of this API is to provide a fallback option if a look for a given shop is not complete. Then there should be the option to to show either the latest, or the most clicked look. The Top Looks API provides this functionality by returning (a dict of) a list of URLs of the top looks. There are some filter options described in Usage
Besides the Top Looks API which includes the endpoint to get these URLs, there exists a local database string the required information and another API + script to fill this database and update it. The data to fill the database is gathered from distributer.py
which pushes the billing data created by the Look API (v3).
The following image describes the connections between the single parts of Top Looks:
Top Looks API:
The main algorithm is located in app/top_look_id_getter.py
The main endpoint is located in app/routers/top_look.py
Top Looks Fill DB:
The main algorithm for filling the database and the endpoint are located in app/routers/fill_db.py
The main algorithm for completing the database entries is located in app/update_collections.py
/get_top_look
distributer.py
in TopLooksFillDB): /in
Output:
Input:
The data is stored in a local MongoDB: frontend05-hpc.picalike.corpex-kunden.de:27021 > top_looks_db
looks
stores the data required for mode “latest”count
stores the data required for mode “top”distributer.py
(and in general the Look API and billing system)