|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- package kuaishou
-
- import (
- zhios_third_party_utils "code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git/utils"
- "fmt"
- "strings"
- )
-
- /*
- app_id 开发者appKey
-
- grant_type 授权的类型,"code"
-
- code 2.2中获取到的code
-
- app_secret 开发者的appSecret
- */
- func GetKuaishouToken(args map[string]string) {
- url := "https://openapi.kwaixiaodian.com/oauth2/access_token"
- for k, v := range args {
- if strings.Contains(url, "?") == false {
- url += "?" + k + "=" + v
- } else {
- url += "&" + k + "=" + v
- }
- }
- get, err := zhios_third_party_utils.CurlGet(url, nil)
- fmt.Println(url)
- fmt.Println(string(get))
- fmt.Println(err)
-
- }
-
- /*
-
- */
- func GetKuaishouRefreshToken(args map[string]string) (string, error) {
- url := "https://openapi.kwaixiaodian.com/oauth2/refresh_token"
- get, err := zhios_third_party_utils.CurlPost(url, args, nil)
- fmt.Println(url)
- fmt.Println(string(get))
- fmt.Println(err)
- return string(get), err
- }
-
- //https://open.kwaixiaodian.com/zone/docs/api?name=open.distribution.investment.activity.open.list&version=1
- func GetKuishouActivity(signSecret string, param map[string]string) (string, error) {
-
- return SendGet("open.distribution.investment.activity.open.list", signSecret, param)
- }
-
- //https://open.kwaixiaodian.com/zone/docs/api?name=open.distribution.investment.activity.open.list&version=1
- func GetKuishouGoods(signSecret string, param map[string]string) (string, error) {
-
- return SendGet("open.distribution.investment.activity.open.item.list", signSecret, param)
- }
-
- ////https://open.kwaixiaodian.com/zone/docs/api?name=open.distribution.second.apply.investment.activity.list&version=1
- func GetKuishouMyActivity(signSecret string, param map[string]string) (string, error) {
-
- return SendGet("open.distribution.second.apply.investment.activity.list", signSecret, param)
- }
-
- //
- ////https://open.kwaixiaodian.com/zone/docs/api?name=open.distribution.second.apply.investment.activity.item.list&version=1
- func GetKuishouMyGoods(signSecret string, param map[string]string) (string, error) {
- return SendGet("open.distribution.second.apply.investment.activity.item.list", signSecret, param)
- }
-
- //https://open.kwaixiaodian.com/zone/docs/api?name=open.distribution.cps.leader.order.cursor.list&version=1
- func GetKuishouOrder(signSecret string, param map[string]string) (string, error) {
- return SendGet("open.distribution.cps.leader.order.cursor.list", signSecret, param)
- }
-
- //https://open.kwaixiaodian.com/zone/docs/api?name=open.distribution.cps.leader.order.detail&version=1
-
- //https://open.kwaixiaodian.com/zone/docs/api?name=open.distribution.cps.kwaimoney.selection.item.list&version=1
- func GetKuishouCpsGoods(signSecret string, param map[string]string) (string, error) {
- return SendGet("open.distribution.cps.kwaimoney.selection.item.list", signSecret, param)
- }
-
- func GetKuishouCpsGoodsDetail(signSecret string, param map[string]string) (string, error) {
- return SendGet("open.distribution.cps.kwaimoney.selection.item.detail", signSecret, param)
- }
- func GetKuishouCpsKlGoods(signSecret string, param map[string]string) (string, error) {
- return SendPost("open.distribution.cps.kwaimoney.link.parse", signSecret, param)
- }
- func GetKuishouCpsUrl(signSecret string, param map[string]string) (string, error) {
- return SendPost("open.distribution.cps.kwaimoney.link.create", signSecret, param)
- }
- func GetKuishouCpsPid(signSecret string, param map[string]string) (string, error) {
- return SendPost("open.distribution.cps.kwaimoney.pid.create", signSecret, param)
- }
- func GetKuishouCpsOrder(signSecret string, param map[string]string) (string, error) {
- return SendPost("open.distribution.cps.kwaimoney.order.list", signSecret, param)
- }
-
- //https://open.kwaixiaodian.com/zone/docs/api?name=open.distribution.selection.pick&version=1 橱窗
- func GetKuishouSelectionPick(signSecret string, param map[string]string) (string, error) {
- return SendPost("open.distribution.selection.pick", signSecret, param)
- }
|