api_test.py 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. import requests
  2. import json
  3. # url = "http://127.0.0.1:7960/brandcultivation/api/v1/recommend"
  4. # payload = {
  5. # "city_uuid": "00000000000000000000000011445301",
  6. # "product_code": "440298",
  7. # "recall_cust_count": 500,
  8. # "delivery_count": 1100
  9. # }
  10. # headers = {'Content-Type': 'application/json'}
  11. # response = requests.post(url, data=json.dumps(payload), headers=headers)
  12. # print(response.json())
  13. # url = "http://127.0.0.1:7960/brandcultivation/api/v1/report"
  14. # payload = {
  15. # "city_uuid": "00000000000000000000000011445301",
  16. # "product_code": "440298",
  17. # }
  18. # headers = {'Content-Type': 'application/json'}
  19. # response = requests.post(url, data=json.dumps(payload), headers=headers)
  20. # print(response.json())
  21. url = "http://127.0.0.1:7960/brandcultivation/api/v1/eval_report"
  22. payload = {
  23. "city_uuid": "00000000000000000000000011445301",
  24. "product_code": "440298",
  25. "start_time": "2025/2/10",
  26. "end_time": "2025/2/16"
  27. }
  28. headers = {'Content-Type': 'application/json'}
  29. response = requests.post(url, data=json.dumps(payload), headers=headers)
  30. print(response.json())