//获取卖家信息 protected void Button1_Click(object sender, EventArgs e) { //Display(TextBox1.Text); /* ITopClient client = new DefaultTopClient(url, appkey, appsecret);//实例化ITopClient类 UserGetRequest req = new UserGetRequest(); //实例化具体API对应的Request类 req.Fields = "user_id,nick,created,buyer_credit,type,sex"; req.Nick = "sandbox_c_1"; UserGetResponse rsp = client.Execute(req);//执行API请求并将该类转换为response对象 */ ITopClient client = new DefaultTopClient(url, appkey, appsecret); UserBuyerGetRequest req = new UserBuyerGetRequest(); req.Fields = "nick,sex"; UserBuyerGetResponse response = client.Execute(req, sessionKey); Label1.Text = response.Body; /* 暂时关闭卖家查询,以便调试买家信息查询 ITopClient client = new DefaultTopClient(url, appkey, appsecret); UserSellerGetRequest req = new UserSellerGetRequest(); //req.Fields = "nick,sex"; req.Fields = "user_id,nick,sex,seller_credit,type,has_more_pic,item_img_num,item_img_size,prop_img_num,prop_img_size,auto_repost,promoted_type,status,alipay_bind,consumer_protection,avatar,liangpin,sign_food_seller_promise,has_shop,is_lightning_consignment,has_sub_stock,is_golden_seller,vip_info,magazine_subscribe,vertical_market,online_gamin"; UserSellerGetResponse response = client.Execute(req, sessionKey); //Label1.Text = response.Body; Label3.Text = response.User.Nick; Label2.Text = sessionKey; Label1.Text = response.User.Type; */ }
protected void Button5_Click(object sender, EventArgs e) { DefaultTopClient client = new DefaultTopClient(url, appkey, appsecret); //client.SetDisableTrace(true); UserBuyerGetRequest req = new UserBuyerGetRequest(); req.Fields = "nick,sex"; //UserBuyerGetResponse response = client.Execute(req, sessionKey); //Label2.Text = response.Body; }