6
0

Compare commits

..

No commits in common. "1a0253c56b9cc4381b4958197d086a5c7ee7aa3c" and "f56cdad6d0ec15e71eaf33c83799cc9f8c7140a1" have entirely different histories.

4 changed files with 0 additions and 58 deletions

View File

@ -4,7 +4,6 @@ import (
"errors" "errors"
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk" "golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk"
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests" "golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
"time"
) )
const ( const (
@ -63,9 +62,6 @@ func (client *Client) Upload(req *UploadRequest) (resp *UploadResponse, err erro
} }
// 必须设置content // 必须设置content
req.SetContent(req.FileStream) req.SetContent(req.FileStream)
// 考虑网络不佳的情况,提高超时时间
req.SetReadTimeout(10 * time.Second)
resp = CreateUploadResponse() resp = CreateUploadResponse()
err = client.DoAction(req, resp) err = client.DoAction(req, resp)
return return

View File

@ -109,10 +109,3 @@ func (c *Client) GetGameRealAuthInfo(req *GetGameRealAuthInfoReq) (resp *GetGame
err = c.DoAction(req, resp) err = c.DoAction(req, resp)
return return
} }
// GetProtocolByCompany 根据主体获取用户协议
func (c *Client) GetProtocolByCompany(req *GetProtocolByCompanyRep) (resp *GetProtocolByCompanyResp, err error) {
resp = CreateGetProtocolByCompanyResp()
err = c.DoAction(req, resp)
return
}

View File

@ -194,20 +194,3 @@ func TestGetGameVersion(t *testing.T) {
} }
t.Log(resp) t.Log(resp)
} }
func TestClient_GetProtocolByCompany(t *testing.T) {
client, err := NewClient()
if err != nil {
t.Error(err)
return
}
req := CreateGetProtocolByCompanyRep()
req.Company = "GR"
req.Type = 0
resp, err := client.GetProtocolByCompany(req)
if err != nil {
t.Error(err)
return
}
t.Log(resp.Code, resp.Msg, resp.Data.Content)
}

View File

@ -35,33 +35,3 @@ func CreateGetProtocolByGameIdResp() *GetProtocolByGameIdResp {
BaseResponse: &responses.BaseResponse{}, BaseResponse: &responses.BaseResponse{},
} }
} }
type GetProtocolByCompanyRep struct {
*requests.RpcRequest
Company string `position:"Query" field:"company"`
Type int `position:"Query" field:"type"`
}
type GetProtocolByCompanyResp struct {
*responses.BaseResponse
Code int `json:"code"`
Msg string `json:"msg"`
Data struct {
Content string `json:"content"`
} `json:"data"`
}
func CreateGetProtocolByCompanyRep() *GetProtocolByCompanyRep {
req := &GetProtocolByCompanyRep{
RpcRequest: &requests.RpcRequest{},
}
req.InitWithApiInfo(HOST, VERSION, "/api/news/getProtocolByCompany")
req.Method = requests.GET
return req
}
func CreateGetProtocolByCompanyResp() *GetProtocolByCompanyResp {
return &GetProtocolByCompanyResp{
BaseResponse: &responses.BaseResponse{},
}
}