Compare commits
No commits in common. "master" and "v1.2.34" have entirely different histories.
@ -130,11 +130,3 @@ func (c *Client) GetLoginBg(req *GetLoginBgReq) (resp *GetLoginBgResp, err error
|
||||
err = c.DoAction(req, resp)
|
||||
return
|
||||
}
|
||||
|
||||
// GetLabelListByCate
|
||||
// 通过分类获取标签列表
|
||||
func (c *Client) GetLabelListByCate(req *GetLabelListByCateRep) (response *GetLabelListByCateResp, err error) {
|
||||
response = CreateGetLabelListByCateResp()
|
||||
err = c.DoAction(req, response)
|
||||
return
|
||||
}
|
||||
|
||||
@ -1,47 +0,0 @@
|
||||
package game
|
||||
|
||||
import (
|
||||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
||||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
|
||||
)
|
||||
|
||||
type GetLabelListByCateRep struct {
|
||||
*requests.RpcRequest
|
||||
}
|
||||
|
||||
type GetLabelListByCateResp struct {
|
||||
*responses.BaseResponse
|
||||
Code int `json:"code"`
|
||||
Msg string `json:"msg"`
|
||||
Data struct {
|
||||
List []Label `json:"list"`
|
||||
} `json:"data"`
|
||||
}
|
||||
|
||||
type Label struct {
|
||||
Id int `json:"id"`
|
||||
CateId int `json:"cate_id"`
|
||||
LabelName string `json:"label_name"`
|
||||
Status int `json:"status"`
|
||||
RelateUserNum int `json:"relate_user_num"`
|
||||
CreateBy string `json:"create_by"`
|
||||
UpdateBy string `json:"update_by"`
|
||||
}
|
||||
|
||||
func CreateGetLabelListByCateRep(cateIds string) *GetLabelListByCateRep {
|
||||
req := &GetLabelListByCateRep{
|
||||
RpcRequest: &requests.RpcRequest{},
|
||||
}
|
||||
req.InitWithApiInfo(HOST, VERSION, "/api/label/getLabelListByCate")
|
||||
req.FormParams = map[string]string{
|
||||
"cate_ids": cateIds,
|
||||
}
|
||||
req.Method = requests.POST
|
||||
return req
|
||||
}
|
||||
|
||||
func CreateGetLabelListByCateResp() *GetLabelListByCateResp {
|
||||
return &GetLabelListByCateResp{
|
||||
BaseResponse: &responses.BaseResponse{},
|
||||
}
|
||||
}
|
||||
@ -79,11 +79,3 @@ func (c *Client) UpdateUserState(req *UpdateUserStateRequest) (response *UpdateU
|
||||
err = c.DoAction(req, response)
|
||||
return
|
||||
}
|
||||
|
||||
// GetUserLabels
|
||||
// 获取用户标签
|
||||
func (c *Client) GetUserLabels(req *GetUserLabelsRequest) (response *GetUserLabelsResponse, err error) {
|
||||
response = CreateGetUserLabelsResponse()
|
||||
err = c.DoAction(req, response)
|
||||
return
|
||||
}
|
||||
|
||||
@ -200,47 +200,3 @@ func CreateGetUserGameSignResponse() (response *GetUserGameSignResponse) {
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
type GetUserLabelsRequest struct {
|
||||
*requests.RpcRequest
|
||||
}
|
||||
|
||||
type GetUserLabelsResponse struct {
|
||||
*responses.BaseResponse
|
||||
Code int `json:"code"`
|
||||
Msg string `json:"msg"`
|
||||
Data []UserLabel `json:"data"`
|
||||
}
|
||||
|
||||
type UserLabel struct {
|
||||
LabelId int64 `json:"label_id"`
|
||||
UserName string `json:"user_name"`
|
||||
}
|
||||
|
||||
// CreateGetUserLabelsRequest 获取用户标签
|
||||
func CreateGetUserLabelsRequest(userNames, labelIds string) (req *GetUserLabelsRequest) {
|
||||
ts, sign := GetSign()
|
||||
|
||||
req = &GetUserLabelsRequest{
|
||||
RpcRequest: &requests.RpcRequest{},
|
||||
}
|
||||
req.InitWithApiInfo(HOST, VERSION, "/remote_login.php")
|
||||
req.FormParams = map[string]string{
|
||||
"act": "info",
|
||||
"do": "get_user_labels",
|
||||
"user_names": userNames,
|
||||
"label_ids": labelIds,
|
||||
"time": fmt.Sprintf("%v", ts),
|
||||
"sign": sign,
|
||||
}
|
||||
|
||||
req.Method = requests.POST
|
||||
return
|
||||
}
|
||||
|
||||
func CreateGetUserLabelsResponse() (response *GetUserLabelsResponse) {
|
||||
response = &GetUserLabelsResponse{
|
||||
BaseResponse: &responses.BaseResponse{},
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@ -142,11 +142,3 @@ func (c *Client) UserLogin(req *UserLoginRequest) (resp *UserLoginResponse, err
|
||||
err = c.DoAction(req, resp)
|
||||
return
|
||||
}
|
||||
|
||||
func (c *Client) SetSiteKey(req *SetSiteKeyReq) (resp *SetSiteKeyResp, err error) {
|
||||
resp = &SetSiteKeyResp{
|
||||
BaseResponse: &responses.BaseResponse{},
|
||||
}
|
||||
err = c.DoAction(req, resp)
|
||||
return
|
||||
}
|
||||
|
||||
@ -314,25 +314,3 @@ func TestUserLogin(t *testing.T) {
|
||||
}
|
||||
t.Log(resp.Code, resp.Data)
|
||||
}
|
||||
|
||||
func TestSetSiteKey(t *testing.T) {
|
||||
client, err := NewClient()
|
||||
if err != nil {
|
||||
t.Log(err)
|
||||
return
|
||||
}
|
||||
resp, err := client.SetSiteKey(CreateSetSiteKeyReq(SetSiteKeyParam{
|
||||
AgentId: 1213123,
|
||||
SiteId: 1231122,
|
||||
GameId: 1,
|
||||
AdSource: 1,
|
||||
ConvertSourceType: "1",
|
||||
Key: "1",
|
||||
Token: "1",
|
||||
}))
|
||||
if err != nil {
|
||||
t.Log(err)
|
||||
return
|
||||
}
|
||||
_ = resp
|
||||
}
|
||||
|
||||
@ -1,54 +0,0 @@
|
||||
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{},
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user