55 lines
1.5 KiB
Go
55 lines
1.5 KiB
Go
package stat
|
|
|
|
import (
|
|
"github.com/spf13/cast"
|
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
|
|
)
|
|
|
|
type SetSiteKeyReq struct {
|
|
*requests.RpcRequest
|
|
}
|
|
|
|
type SetSiteKeyParam struct {
|
|
AgentId int64 `json:"agent_id"`
|
|
SiteId int64 `json:"site_id"`
|
|
GameId int64 `json:"game_id"`
|
|
AdSource int64 `json:"ad_source"`
|
|
ConvertSourceType string `json:"convert_source_type"`
|
|
Key string `json:"key"`
|
|
Token string `json:"token"`
|
|
}
|
|
|
|
type SetSiteKeyResp struct {
|
|
*responses.BaseResponse
|
|
Code int `json:"code"`
|
|
Msg string `json:"msg"`
|
|
}
|
|
|
|
// CreateSetSiteKeyReq 写toutiao_key
|
|
func CreateSetSiteKeyReq(data SetSiteKeyParam) *SetSiteKeyReq {
|
|
req := &SetSiteKeyReq{
|
|
&requests.RpcRequest{},
|
|
}
|
|
|
|
req.InitWithApiInfo(HOST, VERSION, "api/site/setSiteKey")
|
|
req.Method = requests.POST
|
|
req.FormParams = make(map[string]string)
|
|
req.FormParams["agentid"] = cast.ToString(data.AgentId)
|
|
req.FormParams["siteid"] = cast.ToString(data.SiteId)
|
|
req.FormParams["game_id"] = cast.ToString(data.GameId)
|
|
req.FormParams["ad_source"] = cast.ToString(data.AdSource)
|
|
req.FormParams["convert_source_type"] = data.ConvertSourceType
|
|
req.FormParams["key"] = data.Key
|
|
req.FormParams["token"] = data.Token
|
|
|
|
return req
|
|
}
|
|
|
|
// CreateSetSiteKeyResp 写头条key
|
|
func CreateSetSiteKeyResp() *GetUserTotalPayResp {
|
|
return &GetUserTotalPayResp{
|
|
BaseResponse: &responses.BaseResponse{},
|
|
}
|
|
}
|