第三方api接口
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

kuaishou.go 5.0 KiB

1 år sedan
1 år sedan
1 år sedan
1 år sedan
1 år sedan
1 år sedan
1 år sedan
1 år sedan
1 år sedan
2 månader sedan
1 år sedan
2 månader sedan
9 månader sedan
2 månader sedan
1 år sedan
2 månader sedan
1 år sedan
2 månader sedan
1 år sedan
2 månader sedan
1 år sedan
2 månader sedan
1 år sedan
2 månader sedan
1 år sedan
2 månader sedan
1 år sedan
9 månader sedan
9 månader sedan
9 månader sedan
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. package kuaishou
  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. /*
  8. app_id 开发者appKey
  9. grant_type 授权的类型,"code"
  10. code 2.2中获取到的code
  11. app_secret 开发者的appSecret
  12. */
  13. func GetKuaishouToken(args map[string]string) (string, error) {
  14. url := "https://openapi.kwaixiaodian.com/oauth2/access_token"
  15. for k, v := range args {
  16. if strings.Contains(url, "?") == false {
  17. url += "?" + k + "=" + v
  18. } else {
  19. url += "&" + k + "=" + v
  20. }
  21. }
  22. get, err := zhios_third_party_utils.CurlGet(url, nil)
  23. fmt.Println(url)
  24. fmt.Println(string(get))
  25. fmt.Println(err)
  26. return string(get), err
  27. }
  28. /*
  29. */
  30. func GetKuaishouRefreshToken(args map[string]string) (string, error) {
  31. url := "https://openapi.kwaixiaodian.com/oauth2/refresh_token"
  32. get, err := zhios_third_party_utils.CurlPost(url, args, nil)
  33. fmt.Println(url)
  34. fmt.Println(string(get))
  35. fmt.Println(err)
  36. return string(get), err
  37. }
  38. // https://open.kwaixiaodian.com/zone/new/docs/api?name=open.distribution.selection.offline&version=1
  39. func GetKuishouSelectionPickOffline(signSecret string, param map[string]string) (string, error) {
  40. return SendPost("open.distribution.selection.offline", signSecret, param)
  41. }
  42. // https://open.kwaixiaodian.com/zone/docs/api?name=open.distribution.investment.activity.open.list&version=1
  43. func GetKuishouActivity(signSecret string, param map[string]string) (string, error) {
  44. return SendGet("open.distribution.investment.activity.open.list", signSecret, param)
  45. }
  46. // https://open.kwaixiaodian.com/zone/new/docs/api?name=open.distribution.investment.activity.item.detail&version=1
  47. func GetKuishouGoodsDetail(signSecret string, param map[string]string) (string, error) {
  48. return SendGet("open.distribution.investment.activity.item.detail", signSecret, param)
  49. }
  50. // https://open.kwaixiaodian.com/zone/docs/api?name=open.distribution.investment.activity.open.list&version=1
  51. func GetKuishouGoods(signSecret string, param map[string]string) (string, error) {
  52. return SendGet("open.distribution.investment.activity.open.item.list", signSecret, param)
  53. }
  54. // //https://open.kwaixiaodian.com/zone/docs/api?name=open.distribution.second.apply.investment.activity.list&version=1
  55. func GetKuishouMyActivity(signSecret string, param map[string]string) (string, error) {
  56. return SendGet("open.distribution.second.apply.investment.activity.list", signSecret, param)
  57. }
  58. // //https://open.kwaixiaodian.com/zone/docs/api?name=open.distribution.second.apply.investment.activity.item.list&version=1
  59. func GetKuishouMyGoods(signSecret string, param map[string]string) (string, error) {
  60. return SendGet("open.distribution.second.apply.investment.activity.item.list", signSecret, param)
  61. }
  62. // https://open.kwaixiaodian.com/zone/docs/api?name=open.distribution.cps.leader.order.cursor.list&version=1
  63. func GetKuishouOrder(signSecret string, param map[string]string) (string, error) {
  64. return SendGet("open.distribution.cps.leader.order.cursor.list", signSecret, param)
  65. }
  66. //https://open.kwaixiaodian.com/zone/docs/api?name=open.distribution.cps.leader.order.detail&version=1
  67. // https://open.kwaixiaodian.com/zone/docs/api?name=open.distribution.selection.pick&version=1 橱窗
  68. func GetKuishouSelectionPick(signSecret string, param map[string]string) (string, error) {
  69. return SendPost("open.distribution.selection.pick", signSecret, param)
  70. }
  71. // https://open.kwaixiaodian.com/zone/docs/api?name=open.user.info.get&version=1 用户信息
  72. func GetKuishouUser(signSecret string, param map[string]string) (string, error) {
  73. return SendGet("open.user.info.get", signSecret, param)
  74. }
  75. func GetKuishouOrderDetail(signSecret string, param map[string]string) (string, error) {
  76. return SendGet("open.distribution.cps.leader.order.detail", signSecret, param)
  77. }
  78. // https://open.kwaixiaodian.com/zone/docs/api?name=open.distribution.cps.kwaimoney.selection.item.list&version=1
  79. func GetKuishouCpsGoods(signSecret string, param map[string]string) (string, error) {
  80. return SendGet("open.distribution.cps.kwaimoney.selection.item.list", signSecret, param)
  81. }
  82. func GetKuishouCpsGoodsDetail(signSecret string, param map[string]string) (string, error) {
  83. return SendGet("open.distribution.cps.kwaimoney.selection.item.detail", signSecret, param)
  84. }
  85. func GetKuishouCpsKlGoods(signSecret string, param map[string]string) (string, error) {
  86. return SendPost("open.distribution.cps.kwaimoney.link.parse", signSecret, param)
  87. }
  88. func GetKuishouCpsUrl(signSecret string, param map[string]string) (string, error) {
  89. return SendPost("open.distribution.cps.kwaimoney.link.create", signSecret, param)
  90. }
  91. func GetKuishouCpsPid(signSecret string, param map[string]string) (string, error) {
  92. return SendPost("open.distribution.cps.kwaimoney.pid.create", signSecret, param)
  93. }
  94. func GetKuishouCpsOrder(signSecret string, param map[string]string) (string, error) {
  95. return SendPost("open.distribution.cps.kwaimoney.order.list", signSecret, param)
  96. }
  97. func GetKuishouCpsChannel(signSecret string, param map[string]string) (string, error) {
  98. return SendGet("open.distribution.cps.kwaimoney.selection.channel.list", signSecret, param)
  99. }