Ver código fonte

碧海剧场

master
huangjiajun 9 meses atrás
pai
commit
5c8d80b56d
2 arquivos alterados com 45 adições e 0 exclusões
  1. +20
    -0
      playlet_bihai/api.go
  2. +25
    -0
      playlet_bihai/playlet_bihai.go

+ 20
- 0
playlet_bihai/api.go Ver arquivo

@@ -0,0 +1,20 @@
package playlet_bihai

import (
zhios_third_party_utils "code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git/utils"
"fmt"
)

func SendPost(method string, token string, param map[string]string) (string, error) {
url := "https://distributionapi.qinronmedia.com/" + method
header := map[string]string{}
if token != "" {
header = map[string]string{
"Authorization": "Bearer " + token,
}
}
get, err := zhios_third_party_utils.CurlPost(url, zhios_third_party_utils.SerializeStr(param), header)
fmt.Println(string(get))
fmt.Println(err)
return string(get), err
}

+ 25
- 0
playlet_bihai/playlet_bihai.go Ver arquivo

@@ -0,0 +1,25 @@
package playlet_bihai

//https://console-docs.apipost.cn/preview/6df4dac69ed4fe2e/e84becfee59b6d83?target_id=55e570ad-d893-4c3d-b469-91fe0f1eea30
func Login(args map[string]string) (string, error) {

post, err := SendPost("api/v1/user/login/key", "", args)
return post, err
}

func VideoList(token string, args map[string]string) (string, error) {
post, err := SendPost("api/v1/open/video/list", token, args)
return post, err
}
func CreateLink(token string, args map[string]string) (string, error) {
post, err := SendPost("api/v1/open/create/link", token, args)
return post, err
}
func OrderList(token string, args map[string]string) (string, error) {
post, err := SendPost("api/v2/open/order/list", token, args)
return post, err
}
func RefundOrderList(token string, args map[string]string) (string, error) {
post, err := SendPost("api/v1/open/refund/order/list", token, args)
return post, err
}

Carregando…
Cancelar
Salvar