第三方api接口
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 maanden geleden
11 maanden geleden
11 maanden geleden
11 maanden geleden
11 maanden geleden
11 maanden geleden
11 maanden geleden
11 maanden geleden
11 maanden geleden
11 maanden geleden
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. package tik_tok
  2. import (
  3. zhios_third_party_utils "code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git/utils"
  4. "fmt"
  5. "strings"
  6. )
  7. func CsjpLiveRoom(args map[string]string) (string, error) {
  8. params := map[string]interface{}{
  9. "page": zhios_third_party_utils.StrToInt(args["page"]),
  10. "page_size": zhios_third_party_utils.StrToInt(args["page_size"]),
  11. "sort_type": zhios_third_party_utils.StrToInt(args["sort_type"]),
  12. "sort_by": zhios_third_party_utils.StrToInt(args["sort_by"]),
  13. "status": zhios_third_party_utils.StrToInt(args["status"]),
  14. }
  15. if args["author_info"] != "" {
  16. params["author_info"] = args["author_info"]
  17. }
  18. send, err := CsjpSend(args["app_id"], args["app_secret"], "live/search", params)
  19. fmt.Println(send)
  20. fmt.Println(err)
  21. return send, err
  22. }
  23. func CsjpLiveRoomLink(args map[string]string) (string, error) {
  24. params := map[string]interface{}{
  25. "author_buyin_id": args["author_buyin_id"],
  26. "external_info": args["external_info"],
  27. "live_ext": args["live_ext"],
  28. "sort_by": zhios_third_party_utils.StrToInt(args["sort_by"]),
  29. "status": zhios_third_party_utils.StrToInt(args["status"]),
  30. }
  31. if args["share_type"] != "" {
  32. ex := strings.Split(args["share_type"], ",")
  33. ids := make([]int, 0)
  34. for _, v := range ex {
  35. ids = append(ids, zhios_third_party_utils.StrToInt(v))
  36. }
  37. params["share_type"] = ids
  38. }
  39. if args["product_id"] != "" {
  40. params["product_id"] = zhios_third_party_utils.StrToInt(args["product_id"])
  41. }
  42. send, err := CsjpSend(args["app_id"], args["app_secret"], "live/link", params)
  43. fmt.Println(send)
  44. fmt.Println(err)
  45. return send, err
  46. }