航班查询 接口

using System;

using System.Text;

using System.Net;

namespace weizhang

{

class Program

{

static void Main(string[] args)

{

string name="CA5901";

string key = "**********************";//申请的key值

string url = "http://apis.haoservice.com/plan/s?name="+name+"&key="+ key;

WebClient wc = new WebClient();

wc.Encoding = Encoding.UTF8;

string str = wc.DownloadString(url);

Console.WriteLine(str);

Console.ReadKey();

}

}

}

URL:http://apis.haoservice.com/plan/s

支持格式:json

http请求方式:GET POST

DEMO:http://apis.haoservice.com/plan/s?name=CA5901&key=yourkey

返回示例:

{

"error_code": 0,

"reason": "成功",

"result": [

{

"name": "HU7779",//航班号

"complany": "海南航空股份有限公司",//航空公司

"AirModel": "738",//机型

"AirAge": null,//机年

"start": "北京",//起飞城市

"end": "三亚",//降落城市

"DepCode": "BeiJing",//起飞城市拼音

"ArrCode": "SanYa",//降落城市拼音

"startAirport": "首都机场",//起飞机场

"endAirport": "凤凰机场",//降落机场

"status": "到达",//飞机实时状态

"DepTime": "06:45",//计划起飞时间

"ArrTime": "10:40",//计划到达时间

"Dexpected": "06:45 ",//预计起飞时间

"Aexpected": " 10:40",//预计到达时间

"Dactual": "06:48 ",//实时起飞时间

"Aactual": " 10:20",//实时到达时间

"food": "有餐食   ",//有无餐食

"OnTimeRate": null,//准点率

"FlyTime": "3小时32分",//飞行时间

"Distance": "2710KM  ",//飞行距离

"AverageDelay": null,//平均延时

"ScheduleDaysOfWeek": "1,2,3,4,5,6,7"//班期(有该航班的星期数,用英文逗号分隔,如一周中有4天:1,2,5,7)

}

]

}

备注:

航班查询,要先有key值,然后将自己想要查询的航班等输入;

若出现错误,请查看该网页(http://www.haoservice.com/docs/4/query)上的代码表.

时间: 2024-07-28 18:07:15

航班查询 接口的相关文章

航班查询接口

using System; using System.Text; using System.Net; namespace plane { class Program { static void Main(string[] args) { string name="CA5901"; string key = "**********************";//申请的key值 string url = "http://apis.haoservice.com/

航班查询接口文档

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Net.Security;using System.Security.Cryptography.X509Certificates;using System.Net;using System.IO;using System.IO.Compression;using System.Text.RegularExpr

简单试用航班查询接口

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Net.Security;using System.Security.Cryptography.X509Certificates;using System.Net;using System.IO;using System.IO.Compression;using System.Text.RegularExpr

航班查询接口演示

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Net.Security; using System.Security.Cryptography.X509Certificates; using System.Net; using System.IO; using System.IO.Compression; using System.Text.Re

自定义菜单查询接口

使用接口创建自定义菜单后,开发者还可使用接口查询自定义菜单的结构.另外请注意,在设置了个性化菜单后,使用本自定义菜单查询接口可以获取默认菜单和全部个性化菜单信息. 请求说明 http请求方式:GET https://api.weixin.qq.com/cgi-bin/menu/get?access_token=ACCESS_TOKEN 返回说明(无个性化菜单时) 对应创建接口,正确的Json返回结果: {     "menu": {         "button"

万网域名查询接口(API)的说明

1.域名查询接口采用HTTP,POST,GET协议:调用URL:http://panda.www.net.cn/cgi-bin/check.cgi参数名称:area_domain 值为标准域名,例:hichina.com调用举例:http://panda.www.net.cn/cgi-bin/check.cgi?area_domain=teapic.com 返回XML: <?xml version="1.0" encoding="gb2312"?> &l

API之IP地址查询---权威的IP地址查询接口集合

原文地址:http://yushine.iteye.com/blog/1717586 推荐实用IP138 http://www.baidu.com/s?wd=IP&rsv_spt=1&issp=1&f=8&rsv_bp=0&ie=utf-8&tn=19045005_9_pg&rsv_enter=1&rsv_sug3=2&rsv_sug4=60&rsv_sug1=1&rsv_sug2=0&inputT=520  

利用微信支付的订单查询接口可以在APP 中提高支付的可靠性

最近公司有一个应用,用户可以在微信公众号上面下单,也可以在APP 中下单. 当用户在公共号上面下单时,微信支付成功可以返回微信支付单号,但是在APP 中用户微信支付时,个别时候会出现用户没有付款成功,却在支付后的回调逻辑中执行了订单支付成功的逻辑. 显然在APP中微信支付的这种回调逻辑是不可靠的. (1)首先说明下为什么要拿到微信支付订单号 微信支付订单号是微信系统在支付成功后返回的订单号,比如这样的订单号:4007322001201705049543255213, 拿到这个订单号可以调用微信查

5. PHP接入支付宝单笔订单查询接口

巴西奥运会来了,刚好我又是做体育行业的互联网.哎!这个月又要加班成狗了.最近遇到好多莫名其妙的问题,待我忙完这段,再跟大家分享下.今天还是继续说说 Payment项目 今天主要说说支付宝订单查询接口. 接口调用 废话废话不多说.直接上支付宝订单查询的代码.微信的订单查询与此类似.后续也会更新文档. // 支付宝配置信息 $aliconfig = [ 'partner' => '2088xxxxx', 'md5_key' => 'xxxxxxxxxxxx', 'rsa_private_key'