航班实时起降查询调用代码实现

本文介绍如何利用聚合数据平台的接口实现航班实时起降查询功能,包括通过始发城市和航班号查询航班的详细步骤,并提供了HTTP GET/POST请求示例及JSON返回示例。
摘要由CSDN通过智能技术生成

航班实时起降查询代码实现功能:

当日航班,含国际 orgCity dstCity 通过始发城市查询航班 | flightNo 通过航班号查询航班。

接口名称:航班实时起降查询

接口平台:聚合数据

接口地址:http://www.juhe.cn/docs/api/id/99      http://op.juhe.cn/flight/df/fs

支持格式:json/xml

请求方式:HTTP GET/POST

请求示例:http://op.juhe.cn/flight/df/fs?key=APPKEY&orgCity=PEK&dstCity=WUH&flightNo&dtype=json


航班实时起降查询调用代码JSON返回示例:

{
    "resultcode": "200",
    "reason": "Success",
    "result": [
        {
            "FlightNo": "CZ9378",
            "Rate": "92.00",
            "DepCity": "北京首都",
            "DepCode": "PEK",
            "ArrCity": "武汉天河",
            "ArrCode": "WUH",
            "DepTerminal": "T2",
            "ArrTerminal": "T2",
            "DepScheduled": "2014-12-19T08:05:00",
            "ArrScheduled": "2014-12-19T10:15:00",
            "DepEstimated": "2014-12-19T08:23:00",
            "ArrEstimated": "2014-12-19T09:40:00",
            "DepActual": "2014-12-19T08:23:00",
            "ArrActual": "2014-12-19T10:09:00",
            "FlightState": "到达",
            "arrRate": "93"
        },
        {
            "FlightNo": "MU2460",
            "Rate": "92.00",
            "DepCity": "北京首都",
            "DepCode": "PEK",
            "ArrCity": "武汉天河",
            "ArrCode": "WUH",
            "DepTerminal": "T2",
            "ArrTerminal": "T2",
            "DepScheduled": "2014-12-19T08:05:00",
            "ArrScheduled": "2014-12-19T10:15:00",
            "DepEstimated": "2014-12-19T08:05:00",
            "ArrEstimated": "2014-12-19T10:15:00",
            "DepActual": "2014-12-19T08:23:00",
            "ArrActual": "2014-12-19T10:09:00",
            "FlightState": "到达",
            "arrRate": "90.67"
        },
        {
            "FlightNo": "MU3185",
            "Rate": "92.00",
            "DepCity": "北京首都",
            "DepCode": "PEK",
            "ArrCity": "武汉天河",
            "ArrCode": "WUH",
            "DepTerminal": "T2",
            "ArrTerminal": "T2",
            "DepScheduled": "2014-12-19T08:35:00",
            "ArrScheduled": "2014-12-19T10:45:00",
            "DepEstimated": "2014-12-19T08:51:00",
            "ArrEstimated": "2014-12-19T10:48:00",
            "DepActual": "2014-12-19T08:51:00",
            "ArrActual": "2014-12-19T10:38:00",
            "FlightState": "到达",
            "arrRate": "89.33"
        },
        {
            "FlightNo": "MF4777",
            "Rate": "92.00",
            "DepCity": "北京首都",
            "DepCode": "PEK",
            "ArrCity": "武汉天河",
            "ArrCode": "WUH",
            "DepTerminal": "T2",
            "ArrTerminal": "T2",
            "DepScheduled": "2014-12-19T08:35:00",
            "ArrScheduled": "2014-12-19T10:45:00",
            "DepEstimated": "2014-12-19T08:51:00",
            "ArrEstimated": "2014-12-19T10:48:00",
            "DepActual": "2014-12-19T08:51:00",
            "ArrActual": "2014-12-19T10:38:00",
            "FlightState": "到达",
            "arrRate": "89.67"
        },
        {
            "FlightNo": "CZ6605",
            "Rate": "95.00",
            "DepCity": "北京首都",
            "DepCode": "PEK",
            "ArrCity": "武汉天河",
            "ArrCode": "WUH",
            "DepTerminal": "T2",
            "ArrTerminal": "T2",
            "DepScheduled": "2014-12-19T08:35:00",
            "ArrScheduled": "2014-12-19T10:45:00",
            "DepEstimated": "2014-12-19T08:30:00",
            "ArrEstimated": "2014-12-19T10:38:00",
            "DepActual": "2014-12-19T08:51:00",
            "ArrActual": "2014-12-19T10:38:00",
            "FlightState": "到达",
            "arrRate": "90"
        },
        {
            "FlightNo": "CZ3118",
            "Rate": "92.00",
            "DepCity": "北京首都",
            "DepCode": "PEK",
            "ArrCity": "武汉天河",
            "ArrCode": "WUH",
            "DepTerminal": "T2",
            "ArrTerminal": "T2",
            "DepScheduled": "2014-12-19T10:55:00",
            "ArrScheduled": "2014-12-19T13:20:00",
            "DepEstimated": "0001-01-01T00:00:00",
            "ArrEstimated": "0001-01-01T00:00:00",
            "DepActual": "0001-01-01T00:00:00",
            "ArrActual": "0001-01-01T00:00:00",
            "FlightState": "延误",
            "arrRate": "95.33"
        },
        {
            "FlightNo": "MU3019",
            "Rate": "92.00",
            "DepCity": "北京首都",
            "DepCode": "PEK",
            "ArrCity": "武汉天河",
            "ArrCode": "WUH",
            "DepTerminal": "T2",
            "ArrTerminal": "T2",
            "DepScheduled": "2014-12-19T10:55:00",
            "ArrScheduled": "2014-12-19T13:20:00",
       
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值