本代码示例是基于C#的六派数据接口进行数据请求 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/pinduoduo/ 申请API服务
以下是完整代码示例:
class Response
{
public string statusCode;
}
static void Main(string[] args)
{
string method = "POST";
string url = "http://open.liupai.net/pdd/detail";
Dictionary<string, string> param = new Dictionary<string, string>();
param.Add("appkey", "yourappsecret");
param.Add("itemid", "参数1");//商品id
Dictionary<string, string> headers = null;
string result = api_send_request(method, url, param, headers);
if (result == "")
{
//返回内容异常,发送请求失败
Console.WriteLine("发送请求失败");
return;
}
Response res = new JavaScriptSerializer().Deserialize<Response>(result);
if (res.statusCode == "200") //有个别接口计费状态码为其他;请注意甄别
{
//状态码为200, 说明请求成功
Console.WriteLine(string.Format("请求成功: {0}", result));
}
else
{
//状态码非200, 说明请求失败
Console.WriteLine(string.Format("请求失败: {0}", result));
}
Console.ReadLine();
}
本代码示例是基于C#的六派数据接口进行数据请求 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/pinduoduo/ 申请API服务
以下是完整代码示例:
class Response
{
public string statusCode;
}
static void Main(string[] args)
{
string method = "POST";
string url = "http://open.liupai.net/pdd/info";
Dictionary<string, string> param = new Dictionary<string, string>();
param.Add("appkey", "yourappsecret");
param.Add("shopId", "799515840");//店铺id
Dictionary<string, string> headers = null;
string result = api_send_request(method, url, param, headers);
if (result == "")
{
//返回内容异常,发送请求失败
Console.WriteLine("发送请求失败");
return;
}
Response res = new JavaScriptSerializer().Deserialize<Response>(result);
if (res.statusCode == "200") //有个别接口计费状态码为其他;请注意甄别
{
//状态码为200, 说明请求成功
Console.WriteLine(string.Format("请求成功: {0}", result));
}
else
{
//状态码非200, 说明请求失败
Console.WriteLine(string.Format("请求失败: {0}", result));
}
Console.ReadLine();
}
本代码示例是基于C#的六派数据接口进行数据请求 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/pinduoduo/ 申请API服务
以下是完整代码示例:
class Response
{
public string statusCode;
}
static void Main(string[] args)
{
string method = "POST";
string url = "http://open.6api.net/pdd/detailPlus";
Dictionary<string, string> param = new Dictionary<string, string>();
param.Add("appkey", "yourappsecret");
param.Add("itemId", "421771841337");//商品id
Dictionary<string, string> headers = null;
string result = api_send_request(method, url, param, headers);
if (result == "")
{
//返回内容异常,发送请求失败
Console.WriteLine("发送请求失败");
return;
}
Response res = new JavaScriptSerializer().Deserialize<Response>(result);
if (res.statusCode == "200") //有个别接口计费状态码为其他;请注意甄别
{
//状态码为200, 说明请求成功
Console.WriteLine(string.Format("请求成功: {0}", result));
}
else
{
//状态码非200, 说明请求失败
Console.WriteLine(string.Format("请求失败: {0}", result));
}
Console.ReadLine();
}
本代码示例是基于C#的六派数据接口进行数据请求 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/pinduoduo/ 申请API服务
以下是完整代码示例:
class Response
{
public string statusCode;
}
static void Main(string[] args)
{
string method = "POST";
string url = "http://open.liupai.net/pdd/search";
Dictionary<string, string> param = new Dictionary<string, string>();
param.Add("appkey", "yourappsecret");
param.Add("keyword", "笔记本电脑");//搜索关键词
param.Add("page", "1");//分页值
param.Add("minPrice", "10");//最低价
param.Add("maxPrice", "100");//最高价
param.Add("sort", "default");//排序
Dictionary<string, string> headers = null;
string result = api_send_request(method, url, param, headers);
if (result == "")
{
//返回内容异常,发送请求失败
Console.WriteLine("发送请求失败");
return;
}
Response res = new JavaScriptSerializer().Deserialize<Response>(result);
if (res.statusCode == "200") //有个别接口计费状态码为其他;请注意甄别
{
//状态码为200, 说明请求成功
Console.WriteLine(string.Format("请求成功: {0}", result));
}
else
{
//状态码非200, 说明请求失败
Console.WriteLine(string.Format
本代码示例是基于C#的六派数据接口进行数据请求 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/pinduoduo/ 申请API服务
以下是完整代码示例:
class Response
{
public string statusCode;
}
static void Main(string[] args)
{
string method = "POST";
string url = "http://open.liupai.net/pdd/commentLabel";
Dictionary<string, string> param = new Dictionary<string, string>();
param.Add("appkey", "yourappsecret");
param.Add("itemId", "5914165983");//商品id
Dictionary<string, string> headers = null;
string result = api_send_request(method, url, param, headers);
if (result == "")
{
//返回内容异常,发送请求失败
Console.WriteLine("发送请求失败");
return;
}
Response res = new JavaScriptSerializer().Deserialize<Response>(result);
if (res.statusCode == "200") //有个别接口计费状态码为其他;请注意甄别
{
//状态码为200, 说明请求成功
Console.WriteLine(string.Format("请求成功: {0}", result));
}
else
{
//状态码非200, 说明请求失败
Console.WriteLine(string.Format("请求失败: {0}", result));
}
Console.ReadLine();
}
本代码示例是基于C#的六派数据接口进行数据请求 API服务请求的代码示例,使用前你需要:
①:通过https://www.6api.net/api/pinduoduo/ 申请API服务
以下是完整代码示例:
class Response
{
public string statusCode;
}
static void Main(string[] args)
{
string method = "POST";
string url = "http://open.liupai.net/pdd/comment";
Dictionary<string, string> param = new Dictionary<string, string>();
param.Add("appkey", "yourappsecret");
param.Add("itemId", "5914165983");//商品id
param.Add("labelId", "0");//标签id
param.Add("page", "1");//分页值
Dictionary<string, string> headers = null;
string result = api_send_request(method, url, param, headers);
if (result == "")
{
//返回内容异常,发送请求失败
Console.WriteLine("发送请求失败");
return;
}
Response res = new JavaScriptSerializer().Deserialize<Response>(result);
if (res.statusCode == "200") //有个别接口计费状态码为其他;请注意甄别
{
//状态码为200, 说明请求成功
Console.WriteLine(string.Format("请求成功: {0}", result));
}
else
{
//状态码非200, 说明请求失败
Console.WriteLine(string.Format("请求失败: {0}", result));
}
Console.ReadLine();
}