diff --git a/services/apk/client.go b/services/apk/client.go index f996e8e..9fd4f24 100644 --- a/services/apk/client.go +++ b/services/apk/client.go @@ -56,3 +56,11 @@ func (c *Client) RefreshApkR(req *RefreshApkRequest) (response *RefreshApkRespon err = c.DoAction(req, response) return } + +//获取打包日志 +func (c *Client) SearchApk(req *SearchApkRequest) (response *SearchApkResponse, err error) { + response = CreateSearchApkResponse() + + err = c.DoAction(req, response) + return +} diff --git a/services/apk/client_test.go b/services/apk/client_test.go index b386c36..5682b98 100644 --- a/services/apk/client_test.go +++ b/services/apk/client_test.go @@ -8,13 +8,14 @@ import ( func TestClient_GetUserInfo(t *testing.T) { c := NewClient() - req := CreateRefreshApkRequest() - req.CdnUrlArray = []string{"https://download.abc086.com/lyzzflb_ylh_ez1/lyzzflb_ylh_ez1_490809.apk"} + req := CreateSearchApkRequest() + req.GameIds = "3503" + req.Ver = "1.0.0" req.SetReadTimeout(60 * time.Second) - resp, err := c.RefreshApkR(req) + resp, err := c.SearchApk(req) fmt.Println(req) - fmt.Println(resp) + fmt.Println(resp.GetHttpContentString()) fmt.Println(err) } diff --git a/services/apk/search_apk.go b/services/apk/search_apk.go new file mode 100644 index 0000000..016b726 --- /dev/null +++ b/services/apk/search_apk.go @@ -0,0 +1,71 @@ +package apk + +import ( + "golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests" + "golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses" + "time" +) + +type SearchApkRequest struct { + *requests.RpcRequest + StartTime string `position:"Body" field:"startTime" default:"" ` + EndTime string `position:"Body" field:"endTime" default:"" ` + State string `position:"Body" field:"state" default:"" ` + SiteIds string `position:"Body" field:"siteIds" default:"" ` + Ver string `position:"Body" field:"ver" default:"" ` + SiteId int `position:"Body" field:"siteId" default:"" ` + GameIds string `position:"Body" field:"gameIds" default:"" ` + Autor string `position:"Body" field:"autor" default:"" ` + Page int `position:"Body" field:"page" default:"1" ` + Pagesize int `position:"Body" field:"pagesize" default:"20" ` + Order string `position:"Body" field:"order" default:"" ` +} + +type ApkLog struct { + ID int `json:"Id"` + GameID int `json:"GameId"` + GameName string `json:"GameName"` + Ver string `json:"Ver"` + Top int `json:"Top"` + AgentID int `json:"AgentId"` + SiteID int `json:"SiteId"` + Addtime time.Time `json:"Addtime"` + Edittime time.Time `json:"Edittime"` + State int `json:"State"` + Times int `json:"Times"` + ReleaseTime int `json:"ReleaseTime"` + Env int `json:"Env"` + AliOss int `json:"AliOss"` + NeedCdn bool `json:"NeedCdn"` + Autor string `json:"Autor"` + IsAugment bool `json:"IsAugment"` +} + +type SearchApkResponse struct { + *responses.BaseResponse + Code int `json:"code"` + Status bool `json:"status"` + Msg string `json:"msg"` + Data struct { + Page int `json:"Page"` + PageSize int `json:"PageSize"` + Total int `json:"Total"` + List []ApkLog `json:"List"` + } `json:"data"` +} + +func CreateSearchApkRequest() (req *SearchApkRequest) { + req = &SearchApkRequest{ + RpcRequest: &requests.RpcRequest{}, + } + req.InitWithApiInfo(HOST, VERSION, "/api/apk/list") + req.Method = requests.POST + return +} + +func CreateSearchApkResponse() (response *SearchApkResponse) { + response = &SearchApkResponse{ + BaseResponse: &responses.BaseResponse{}, + } + return +}