Recipe query interface document

Source: Internet
Author: User

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. regularexpressions;

Using system. Web. Script. serialization;

Namespace weizhang

{

Class Program

{

Static void main (string [] ARGs)

{

String name = "ca5901 ";

String key = "**********************"; // applied key value

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

Supported format: JSON

HTTP Request Method: Get post

Demo: http://apis.haoservice.com/plan/s? Name = ca5901 & Key = yourkey

Return example:

{

"Error_code": 0,

"Reason": "successful ",

"Result ":[

{

"Name": "hu7779", // flight no.

"Complany": "Hainan Airlines Co., Ltd.", // airline

"Airmodel": "738", // Model

"Airage": NULL, // machine year

"Start": "Beijing", // departure city

"End": "Sanya", // target City

"Depcode": "Beijing", // departure city pinyin

"Arrcode": "Sanya", // city pinyin

"Startairport": "Capital Airport", // departure airport

"Endairport": "Phoenix airport", // arrival airport

"Status": "Arrival", // real-time aircraft status

"Deptime": "", // planned departure time

"Arrtime": "10: 40", // scheduled arrival time

"Dexpected": "06:45", // estimated departure time

"Aexpected": "10: 40", // estimated arrival time

"Dactual": "", // real-time departure time

"Aactual": "10: 20", // real-time arrival time

"Food": "meals available", // no meals available

"Ontimerate": NULL, // punctuality Rate

"Flytime": "3 hours and 32 minutes", // flight time

"Distance": "2710", // flight distance

"Averagedelay": NULL, // average latency

"Scheduledaysofweek": "1, 2, 3, 4, 5, 6, 7" // schedule (the number of weeks for this flight is separated by commas (,), for example, four days in a week: 1, 2, 5, 7)

}

]

}

 

Note:

For flight query, you must first have a key value, and then enter the flights you want to query;

If an error occurs, view the code table on this web page (http://www.haoservice.com/docs/4/query.

Recipe query interface document

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.