Compare commits
No commits in common. "1a0253c56b9cc4381b4958197d086a5c7ee7aa3c" and "f56cdad6d0ec15e71eaf33c83799cc9f8c7140a1" have entirely different histories.
1a0253c56b
...
f56cdad6d0
@ -4,7 +4,6 @@ import (
|
||||
"errors"
|
||||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk"
|
||||
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
||||
"time"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -63,9 +62,6 @@ func (client *Client) Upload(req *UploadRequest) (resp *UploadResponse, err erro
|
||||
}
|
||||
// 必须设置content
|
||||
req.SetContent(req.FileStream)
|
||||
// 考虑网络不佳的情况,提高超时时间
|
||||
req.SetReadTimeout(10 * time.Second)
|
||||
|
||||
resp = CreateUploadResponse()
|
||||
err = client.DoAction(req, resp)
|
||||
return
|
||||
|
@ -109,10 +109,3 @@ func (c *Client) GetGameRealAuthInfo(req *GetGameRealAuthInfoReq) (resp *GetGame
|
||||
err = c.DoAction(req, resp)
|
||||
return
|
||||
}
|
||||
|
||||
// GetProtocolByCompany 根据主体获取用户协议
|
||||
func (c *Client) GetProtocolByCompany(req *GetProtocolByCompanyRep) (resp *GetProtocolByCompanyResp, err error) {
|
||||
resp = CreateGetProtocolByCompanyResp()
|
||||
err = c.DoAction(req, resp)
|
||||
return
|
||||
}
|
||||
|
@ -194,20 +194,3 @@ func TestGetGameVersion(t *testing.T) {
|
||||
}
|
||||
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)
|
||||
}
|
||||
|
@ -35,33 +35,3 @@ func CreateGetProtocolByGameIdResp() *GetProtocolByGameIdResp {
|
||||
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{},
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user