Chinese introduction to iOS weather application code, ios code

Source: Internet
Author: User

Chinese introduction to iOS weather application code, ios code

Weather application interpretation Request Parameters

Q: Location (the city name can be given, or the longitude and latitude of the city can be directly given) Example: q = beijing

Example q = 48.834, 2.394 num_of_days: days to be predicted

Example: num_of_days = 2 tp: Weather Forecast every few hours

Example: tp = 1; tp = 3 (default); tp = 6; tp = 12; tp = 24 key: key after successful registration

Example: key = 61dcb484acc1f6cfb08aad9c4ac3d939 format: returned data format

Example: format = json

The final request API: http://api.worldweatheronline.com/free/v2/weather.ashx?

Q = beijing & num_of_days = 5 & format = json & tp = 4 & key = a7bdb4aff27ae387b9db730f56ef4

Return json data display content

1. "current_condition": returns the current temperature, wind speed, and other information of a certain place.

"Cloudcover": Percentage of cloud coverage (unit: percentage)

"FeelsLikeC": Somatosensory temperature (unit: degree Celsius)

"FeelsLikeF": Somatosensory temperature (unit: Fahrenheit: F = C × 9/5 + 32)

"Humidity": Current moderate percentage (unit: percentage)

"Observation_time": Observation Time (UTC time is used, that is, the world's unified/standard time, UTC + 0800 = Beijing Time)

"PrecipMM": precipitation (unit: millimeters)

"Pressure": pressure (unit: petabyte)

"Temp_C": Current temperature (unit: degree Celsius)

"Temp_F": Current temperature (unit: Fahrenheit: F = C × 9/5 + 32)

"Visibility": visibility (unit: km)

"WeatherCode": current weather condition code (Sunny/cloudy /)

Link: http://www.worldweatheronline.com/feed/wwoConditionCodes.txt "weatherDesc": weather condition description

"WeatherIconUrl": Weather icon url

"Winddir16Point": wind direction (North Wind: N Dongfeng: E south wind: S west wind: W)

"WinddirDegree": direction of Wind "windspeedKmph": wind speed (unit: km/hour) "windspeedMiles": wind speed (unit: miles/hour)

2. "request": displays the request parameter "query": the request location information.

 

"Type": Request Location type

3. "weather": displays the weather conditions of the predicted days (depending on the num_of_days value assignment)

 

"Astpolicmy": displays the current Sunrise, sunset, moon out, and moon fall time (type: array), "date": prediction/Forecast Time

"Hourly": displays the weather condition per hour (type: array)

"Chanceoffog": Percentage of FOG (unit: percentage)

"Chanceoffrost": Frost probability (unit: percentage)

"Chanceofhightemp": High Temperature probability (unit: percentage)

"Chanceofovercast": the probability of a cloudy day or a cloudy day (unit: percentage)

"Chanceofrain": Percentage of rain (unit: percentage)

"Chanceofremdry": drying probability (unit: percentage)

"Chanceofsnow": snow probability (unit: percentage)

"Chanceofsunshine": Sunday probability (unit: percentage)

"Chanceofthunder": Percentage of thunder hits (unit: percentage)

"Chanceofwindy": wind blow probability (unit: percentage)

"Cloudcover": cloud coverage rate (unit: percentage)

 

"DewPointC": condensation temperature (unit: degree Celsius)

"DewPointF": condensation temperature (unit: Fahrenheit)

"FeelsLikeC": Somatosensory temperature (unit: degree Celsius)

"FeelsLikeF": Somatosensory temperature (unit: Fahrenheit)

"HeatIndexC": Thermal Index (unit: degree Celsius)

"HeatIndexF": Thermal Index (unit: Fahrenheit)

"Humidity": humidity (unit: percentage)

"PrecipMM": precipitation (unit: millimeters)

"Pressure": pressure (unit: petabyte)

 

"TempC": predicted temperature (unit: degree Celsius)

"TempF": predicted temperature (unit: Fahrenheit)

"Time": local time (Format: hmm; example: 100 or 1500)

"Visibility": visibility (unit: km)

"WeatherCode": Description weather code (http://www.worldweatheronline.com/feed/wwoConditionCodes.txt) "weatherDesc": weather condition description

"WeatherIconUrl": Weather icon url

"WindChillC": Cold wind temperature (unit: degree Celsius)

"WindChillF": Cold wind temperature (unit: Fahrenheit)

"Winddir16Point": wind direction (North Wind: N Dongfeng: E south wind: S west wind: W) "winddirDegree": wind direction (unit: Degree)

"WindGustKmph": gust wind speed (unit: km/hour)

"WindGustMiles": gust wind speed (unit: miles/hour)

"WindspeedKmph": wind speed (unit: km/hour)

"WindspeedMiles": wind speed (unit: miles/hour)

"MaxtempC": predicted maximum temperature (Celsius) "maxtempF": predicted maximum temperature (Fahrenheit) "mintempC": predicted minimum temperature (Celsius)

"MintempF": predicted minimum temperature (Fahrenheit) "uvIndex": UV Index

Related Article

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.