在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
func TestAliAfpAdapter_AskAd_Banner(t *testing.T) { apiData := getApiData() apiData.ApiInfo.ApiPositionSID = "63538378" apiData.AdRequst.AdWidth = 300 apiData.AdRequst.AdHeigh = 250 apiData.AdRequst.AdType = models.AD_TYPE_BANNER //adapter := &AliAfpAdapter{} //resp, err := adapter.AskAd(apiData) json := `JSON字符串` //fmt.Println(json) tresp := &aliafpResponse{} err := tresp.UnmarshalJSON([]byte(json)) if err != nil { t.Error("unmarshal banner json error:" + err.Error()) } respData, err := getAliafpResponse(tresp, apiData.AdRequst, apiData.AdidData, apiData.ApiInfo) if err != nil { t.Error("get banner response error:" + err.Error()) } spew.Dump(respData) if respData.AdId == "" { } }
|
请发表评论