添加国美api,删除老版本蜂鸟API,添加抖音授权api、
This commit is contained in:
39
platformapi/gome_live_show/token_model.go
Normal file
39
platformapi/gome_live_show/token_model.go
Normal file
@@ -0,0 +1,39 @@
|
||||
package gome_live_show
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/baseapi/platformapi"
|
||||
"net/http"
|
||||
"sync"
|
||||
)
|
||||
|
||||
// 注册请求api
|
||||
type API struct {
|
||||
code string `json:"code"` // 商户码
|
||||
appKey string `json:"appKey"` // appkey
|
||||
sign string `json:"sign"` // 签名
|
||||
timestamp string `json:"timestamp"` // 请求时间戳
|
||||
appSecret string `json:"app_secret"` // 私钥
|
||||
refreshToken string `json:"refresh_token"` // 刷新token
|
||||
expiration string `json:"expiration"` // 刷新token过期时间
|
||||
sessionToken string `json:"session_token"` // token
|
||||
version string `json:"version"` // 版本
|
||||
locker sync.RWMutex
|
||||
client *http.Client
|
||||
config *platformapi.APIConfig
|
||||
}
|
||||
|
||||
// 国美token
|
||||
type gomeToken struct {
|
||||
Code int64 `json:"code"`
|
||||
Timestamp int64 `json:"timestamp"`
|
||||
Data *TokenInfo `json:"data"`
|
||||
RequestId string `json:"request_id"`
|
||||
}
|
||||
|
||||
// 获取token
|
||||
type TokenInfo struct {
|
||||
SessionToken string `json:"sessionToken"` // 商家令牌 sessionToken String
|
||||
Expiration string `json:"expiration"` // 授权到期时间
|
||||
RefreshToken string `json:"refreshToken"` // 刷新令牌
|
||||
AppKey string `json:"appKey"` // 应用 code
|
||||
}
|
||||
Reference in New Issue
Block a user