Example #1
0
        elif command == "5":
            print("(statistic)", "\n")
            print("Print type of product")
            print("F.e.: 'phone charger'")
            product = input("Product: ")
            pprint(seller.get_product_statistic(product))

        elif command == "6":
            print("(recommendations)", "\n")
            print("Give me a list of your products using their id.")
            print("F.e.: 32922653638, 32954832491")
            products = input("Products: ").split(", ")
            list_of_products = list(map(lambda id: int(id), products))
            print(list_of_products)
            try:
                pprint(seller.get_personal_recommendations(list_of_products))
            except ApiException as e:
                print("Some problems with server data for your input.")
                print(e)
        else:
            print("You called wrong command.")
            print()

# Buyer's author is Yana Kryshchuk
elif usertype == '1':

    buyer = Buyer(nick)

    print("Print 'stop' to finish program.")
    print()