Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
9aa5924b97 | |||
|
66ee953f5f |
@ -132,3 +132,21 @@ func (client *Client) GetHotFaqList(req *GetHotFaqRequest) (resp *GetHotFaqRespo
|
|||||||
err = client.DoAction(req, resp)
|
err = client.DoAction(req, resp)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (client *Client) ClearFaqListCache(req *ClearFaqListCacheRequest) (resp *ClearFaqListCacheResponse, err error) {
|
||||||
|
resp = CreateClearFaqListCacheResponse()
|
||||||
|
err = client.DoAction(req, resp)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func (client *Client) ClearFaqDetailCache(req *ClearFaqDetailCacheRequest) (resp *ClearFaqDetailCacheResponse, err error) {
|
||||||
|
resp = CreateClearFaqDetailCacheResponse()
|
||||||
|
err = client.DoAction(req, resp)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func (client *Client) ClearHotFaqCache(req *ClearHotFaqCacheRequest) (resp *ClearHotFaqCacheResponse, err error) {
|
||||||
|
resp = CreateClearHotFaqCacheResponse()
|
||||||
|
err = client.DoAction(req, resp)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
@ -404,3 +404,56 @@ func TestGetFaqHotList(t *testing.T) {
|
|||||||
}
|
}
|
||||||
fmt.Printf(fmt.Sprintf("%v", res))
|
fmt.Printf(fmt.Sprintf("%v", res))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 清理faq列表缓存
|
||||||
|
func TestClearFaqListCache(t *testing.T) {
|
||||||
|
client, newErr := NewClient()
|
||||||
|
if newErr != nil {
|
||||||
|
panic(newErr)
|
||||||
|
}
|
||||||
|
req := CreateClearFaqListCacheRequest()
|
||||||
|
res, err := client.ClearFaqListCache(req)
|
||||||
|
if err != nil {
|
||||||
|
t.Error(err)
|
||||||
|
}
|
||||||
|
if res.Code != 0 {
|
||||||
|
t.Error("清理faq列表缓存失败")
|
||||||
|
}
|
||||||
|
fmt.Printf(fmt.Sprintf("%v", res))
|
||||||
|
}
|
||||||
|
|
||||||
|
// 清理faq详情缓存
|
||||||
|
func TestClearFaqDetailCache(t *testing.T) {
|
||||||
|
client, newErr := NewClient()
|
||||||
|
if newErr != nil {
|
||||||
|
panic(newErr)
|
||||||
|
}
|
||||||
|
req := CreateClearFaqDetailCacheRequest(FaqDetailRequest{
|
||||||
|
Id: int64(30),
|
||||||
|
})
|
||||||
|
res, err := client.ClearFaqDetailCache(req)
|
||||||
|
if err != nil {
|
||||||
|
t.Error(err)
|
||||||
|
}
|
||||||
|
if res.Code != 0 {
|
||||||
|
t.Error("清理faq详情缓存失败")
|
||||||
|
}
|
||||||
|
fmt.Printf(fmt.Sprintf("%v", res))
|
||||||
|
}
|
||||||
|
|
||||||
|
// 清理热门faq缓存
|
||||||
|
func TestClearHotFaqCache(t *testing.T) {
|
||||||
|
client, newErr := NewClient()
|
||||||
|
if newErr != nil {
|
||||||
|
panic(newErr)
|
||||||
|
}
|
||||||
|
req := CreateClearHotFaqCacheRequest()
|
||||||
|
res, err := client.ClearHotFaqCache(req)
|
||||||
|
if err != nil {
|
||||||
|
t.Error(err)
|
||||||
|
}
|
||||||
|
if res.Code != 0 {
|
||||||
|
t.Error("清理热门faq缓存失败")
|
||||||
|
}
|
||||||
|
fmt.Printf(fmt.Sprintf("%v", res))
|
||||||
|
}
|
||||||
|
@ -119,3 +119,83 @@ func CreateGetHotFaqResponse() (response *GetHotFaqResponse) {
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 清理faq树缓存
|
||||||
|
type ClearFaqListCacheRequest struct {
|
||||||
|
*requests.JsonRequest
|
||||||
|
}
|
||||||
|
type ClearFaqListCacheResponse struct {
|
||||||
|
*responses.BaseResponse
|
||||||
|
Code int `json:"code"`
|
||||||
|
Msg string `json:"msg"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func CreateClearFaqListCacheRequest() (req *ClearFaqListCacheRequest) {
|
||||||
|
req = &ClearFaqListCacheRequest{
|
||||||
|
JsonRequest: &requests.JsonRequest{},
|
||||||
|
}
|
||||||
|
req.InitWithApiInfo(HOST, VERSION, "/v1/faq/clear_list_cache")
|
||||||
|
|
||||||
|
req.Method = requests.POST
|
||||||
|
return
|
||||||
|
}
|
||||||
|
func CreateClearFaqListCacheResponse() (response *ClearFaqListCacheResponse) {
|
||||||
|
response = &ClearFaqListCacheResponse{
|
||||||
|
BaseResponse: &responses.BaseResponse{},
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 清理faq详情缓存
|
||||||
|
type ClearFaqDetailCacheRequest struct {
|
||||||
|
*requests.JsonRequest
|
||||||
|
Id int64 `position:"Json" field:"id"`
|
||||||
|
}
|
||||||
|
type ClearFaqDetailCacheResponse struct {
|
||||||
|
*responses.BaseResponse
|
||||||
|
Code int `json:"code"`
|
||||||
|
Msg string `json:"msg"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func CreateClearFaqDetailCacheRequest(param FaqDetailRequest) (req *ClearFaqDetailCacheRequest) {
|
||||||
|
req = &ClearFaqDetailCacheRequest{
|
||||||
|
JsonRequest: &requests.JsonRequest{},
|
||||||
|
Id: param.Id,
|
||||||
|
}
|
||||||
|
req.InitWithApiInfo(HOST, VERSION, "/v1/faq/clear_detail_cache")
|
||||||
|
|
||||||
|
req.Method = requests.POST
|
||||||
|
return
|
||||||
|
}
|
||||||
|
func CreateClearFaqDetailCacheResponse() (response *ClearFaqDetailCacheResponse) {
|
||||||
|
response = &ClearFaqDetailCacheResponse{
|
||||||
|
BaseResponse: &responses.BaseResponse{},
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 清理热门faq缓存
|
||||||
|
type ClearHotFaqCacheRequest struct {
|
||||||
|
*requests.JsonRequest
|
||||||
|
}
|
||||||
|
type ClearHotFaqCacheResponse struct {
|
||||||
|
*responses.BaseResponse
|
||||||
|
Code int `json:"code"`
|
||||||
|
Msg string `json:"msg"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func CreateClearHotFaqCacheRequest() (req *ClearHotFaqCacheRequest) {
|
||||||
|
req = &ClearHotFaqCacheRequest{
|
||||||
|
JsonRequest: &requests.JsonRequest{},
|
||||||
|
}
|
||||||
|
req.InitWithApiInfo(HOST, VERSION, "/v1/faq/clear_hot_list_cache")
|
||||||
|
|
||||||
|
req.Method = requests.POST
|
||||||
|
return
|
||||||
|
}
|
||||||
|
func CreateClearHotFaqCacheResponse() (response *ClearHotFaqCacheResponse) {
|
||||||
|
response = &ClearHotFaqCacheResponse{
|
||||||
|
BaseResponse: &responses.BaseResponse{},
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
@ -26,11 +26,11 @@ func TestGetGameInfo(t *testing.T) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
resp, err := client.GetGameInfo(CreateGetGameInfoByIdReq(8362, 1))
|
resp, err := client.GetGameInfo(CreateGetGameInfoByIdReq(797, 1))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
fmt.Println(resp.Code, resp.Msg, resp.Data)
|
fmt.Println(resp.Code, resp.Msg, resp.Data.GameHomeShortImage)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestChannelInfo(t *testing.T) {
|
func TestChannelInfo(t *testing.T) {
|
||||||
@ -179,3 +179,18 @@ func TestGetGameRealAuthInfo(t *testing.T) {
|
|||||||
}
|
}
|
||||||
t.Log(isBlockOutIos)
|
t.Log(isBlockOutIos)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestGetGameVersion(t *testing.T) {
|
||||||
|
client, err := NewClient()
|
||||||
|
if err != nil {
|
||||||
|
t.Error(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
req := CreateGetGameVersionReq(8071, "1.0.6")
|
||||||
|
resp, err := client.GetGameVersion(req)
|
||||||
|
if err != nil {
|
||||||
|
t.Error(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
t.Log(resp)
|
||||||
|
}
|
||||||
|
@ -287,6 +287,9 @@ type GameVersion struct {
|
|||||||
ExtData map[string]any `json:"ext_data"`
|
ExtData map[string]any `json:"ext_data"`
|
||||||
VersionStatus int `json:"version_status"`
|
VersionStatus int `json:"version_status"`
|
||||||
VersionTime int `json:"version_time"`
|
VersionTime int `json:"version_time"`
|
||||||
|
RequestDomain string `json:"request_domain"`
|
||||||
|
SpareRequestDomain string `json:"spare_request_domain"`
|
||||||
|
OtherRequestDomain string `json:"other_request_domain"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetGameVersionReq struct {
|
type GetGameVersionReq struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user