public IHttpActionResult OptimusGet(TbkDgOptimusMaterialRequest req) { ITopClient client = new DefaultTopClient(_tbkApiUrl, _appkey, _secret, _format); req.AdzoneId = _adzoneId; TbkDgOptimusMaterialResponse rsp = client.Execute(req); return(Json(rsp.Body)); }
/// <summary> /// taobao.tbk.dg.optimus.material( 淘宝客物料下行-导购 ) /// </summary> public static void GetDgOptimusMaterial() { var client = GetClient(); TbkDgOptimusMaterialRequest req = new TbkDgOptimusMaterialRequest(); req.PageSize = 20L; req.AdzoneId = 123L; //mm_xxx_xxx_xxx的第三位,Must req.PageNo = 1L; //第几页,默认:1 req.MaterialId = 123L; //官方的物料Id(详细物料id见:https://tbk.bbs.taobao.com/detail.html?appId=45301&postId=8576096) req.DeviceValue = "xxx"; //智能匹配-设备号加密后的值(MD5加密需32位小写) req.DeviceEncrypt = "MD5"; //智能匹配-设备号加密类型:MD5 req.DeviceType = "IMEI"; //智能匹配-设备号类型:IMEI,或者IDFA,或者UTDID(UTDID不支持MD5加密) req.ContentId = 323L; //内容专用-内容详情ID req.ContentSource = "xxx"; //内容专用-内容渠道信息 req.ItemId = 33243L; //商品ID,用于相似商品推荐 TbkDgOptimusMaterialResponse rsp = client.Execute(req); Console.WriteLine(rsp.Body); }