×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Text
Posted by: Sergey Zagranychnyi
Added: Nov 4, 2021 12:59 PM
Views: 1959
Tags: no tags
  1. from apps.common.services.spoton.restaurant_reporting import RestaurantReportingService
  2. from apps.common.services.spoton.google_food_ordering import GoogleFoodOrderingService
  3. from apps.common.entities.menu import Menu
  4.  
  5. gfo_service = GoogleFoodOrderingService()
  6. spoton_menu_items = gfo_service.get_menu("603e63de62f04a695acedae6")
  7. menu = Menu.from_gfo_data(spoton_menu_items["data"])
  8. # print(merchant_id)
  9. ids = RestaurantReportingService().get_top_selling_items_ids("603e63de62f04a695acedae6")
  10. return Response(data=menu.get_top_selling_menu_items_info(ids), status=status.HTTP_200_OK)