彩票查询接口
using System;
using System.Text;
using System.Net;
namespace caipiao
{
class Program
{
static void Main(string[] args)
{
string key = "****************************";//申请的key值
int id=3;
string url = "="+id+"&key="+key;
WebClient wc = new WebClient();
wc.Encoding = Encoding.UTF8;
string str = wc.DownloadString(url);
Console.WriteLine(str);
Console.ReadKey();
}
}
}
彩票查询接口返回示例
接口信息
URL:
支持格式:json
http请求方式:GET
DEMO:=3&key=您申请的APPKEY
返回结果:
{
"reason":"Success",
"error_code":0,
"result":{
"lottery":"福彩3D", /*彩票类型*/
"lottery_no":"2014054", /*期号*/
"lottery_time":"2014-03-03", /*开奖日期*/
"lottery_nums":"2 5 7 ", /*开奖号码*/
"lottery_sales":"53,297,148" /*本期销量*/
}
}
备注:
先在网页 ()上申请key值,填入参数.
若有错误,请参照一下代码表
错误代码表:
返回码 说明
0 成功
10001 错误的请求KEY
10002 该KEY无请求权限
10003 KEY过期
10004 错误的SDK KEY
10005 应用未审核超时,请提交认证
10007 未知的请求源,(服务器没有获取到IP地址)
10008 被禁止的IP
10009 被禁止的KEY
10011 当前IP请求超过限制
10012 当前Key请求超过限制
10013 测试KEY超过请求限制
10020 接口维护
10021 接口停用
10022 appKey按需剩余请求次数为零
10023 请求IP无效
10024 网络错误
10025 没有查询到结果
转载于:.html
本文发布于:2024-01-31 20:50:29,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/170670542931266.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |