We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.

Only Essential Cookies
Accept All

Content Ability Development Guide

1. Content Data Access Interface Specifications

Huawei uses a service aggregation gateway to periodically call the developer server interfaces to obtain content data and save the data to the database. In addition, Huawei provides interfaces for developer servers to call for real-time content data synchronizationPerformance Requirements

2. Developer Content Data Access

Before importing content data, check the total data volume and daily data change volume by using the following checklist.

Expand
Check Item Description Result
Total data volume Total number of data records that a developer can provide for Huawei.  
Daily data change volume Number of daily changed data records that a developer can provide for Huawei.  
Data size Maximum size of a single data record.  
Sync frequency Frequency of full or incremental synchronization.  

3. Security Requirements

3.1 Interface Protocol and Header Fields

Interface protocol: HTTPS
HTTPS certificate: Use a certificate issued by a valid CA. A self-signed certificate is not allowed.
Data format: Both the request and response are in JSON format.
Request method: POST
Packet compression: Responses must be compressed in GZ format to reduce bandwidth consumption.
Persistent connection: HTTP keep-alive is supported to avoid repeated TLS connection establishment. Huawei servers use persistent connections to call interfaces.
The following is an example of a request header:
POST / HTTP/1.1
Content-Type : application/json;charset=UTF-8
Host : your.host.of.api
Accept : application/json
Accept-Charset : utf-8
Content-Length : 1024

4. Result Codes

4.1 Service Result Code Definition

Expand
HTTP Status Code Service Result Code Description
200 0 OK
400 1 Invalid parameter
400 2 Incorrect signature
400 3 Too many parameters
400 4 Unsupported signature method
400 5 Invalid/Used timestamp parameter
400 6 Unsupported open API
401 12 Session key invalid or no longer valid
403 31 Forbidden
400 32 Data parse error
400 80 Request timeout
500 101 Unknown error
500 102 Server internal error
500 103 Service temporarily unavailable

Definition of ContentTypeId

Expand
ContentTypeId Value Description
1001 Financial information.
1003 Sports information.
10031001 Member information.
10031002 Team information.
10031003 Schedule information.
10031004 Real-time situations.
10031005 League information.
1009 Speech metadata information.
1010 Music metadata information.
1011 Weather data synchronization.
10111001 Weather data synchronization on the hour and on the half hour.
10111002 Weather data synchronization on the quarter hour.

5. Sports Event Interface List

5.1 Server URL

</>

5.2 Interface for Obtaining Team Information

5.2.1 Basic Information

Method: POST
URL: /sports/teams
Function: To obtain the information about sports teams.

5.2.2 Request Header

None

5.2.3 Request Message

Name: requestBody
Mandatory: Yes
Type: SportsTeamInfoReq
Description: Request message.

5.2.4 Response Message

1. Status code: 200
Response body type: SportsTeamInfoRsp
Description: The query is successful and the query result is returned.

5.3 Interface for Obtaining Sports League Information

5.3.1 Basic Information

Method: POST
URL: /sports/leagues
Function: To obtain information about sports leagues.

5.3.2 Request Header

None

5.3.3 Request Message

Name: requestBody
Mandatory: Yes
Type: SportsLeagueInfoReq
Description: Request message.

5.3.4 Response Message

1. Status code: 200
Response body type: SportsLeagueInfoRsp
Description: The query is successful and the query result is returned.

5.4 Interface for Obtaining Sports Schedule Information

5.4.1 Basic Information

Method: POST
URL: /sports/schedules
Function: To obtain information about sports schedules.

5.4.2 Request Header

None

5.4.3 Request Message

Name: requestBody
Mandatory: Yes
Type: SportsScheduleInfo
Description: Request message.

5.4.4 Response Message

1. Status code: 200
Response body type: SportsScheduleInfoRsp
Description: The query is successful and the query result is returned.

5.5 Basic Type Structure

5.5.1 LeagueId

League ID, which is NBA (NBA), UK_EPL (Premier League), ITA_SERIEA (Serie A), ESP_LALIGA (La Liga), GEM_BUNDESLIGA (Bundesliga), FRA_L1 (Ligue 1), CN_CBA (CBA), or CN_CSL (Chinese Super League).

Expand
Type Value Range
string Enumerated values: NBA, UK_EPL, ITA_SERIEA, ESP_LALIGA, GEM_BUNDESLIGA, FRA_L1, CN_CBA, and CN_CSL

5.5.2 DateTimeFormatString

Time format: yyyyMMddHHmmss

Expand
Type Value Range
string Regular expression pattern: [0-9]{14}

5.5.3 DateFormatString

Date format: yyyy-HH-dd

Expand
Type Value Range
string Regular expression pattern: [0-9]{4}-[0-9]{1,2}-[0-9]{1,2}

5.6 Object Type Structure

5.6.1 SportsTeamInfoReq

Query by league ID list.

Expand
Parameter Name Description Mandatory Type Value Range
leagueIds League ID. Use commas (,) to separate multiple league IDs. No LeagueId[] Maximum number of items: 32

5.6.2 SportsTeamInfoRsp

Expand
Parameter Name Description Mandatory Type Value Range
data   Yes SportsTeamInfoItem[] Maximum number of items: 32

5.6.3 SportsLeagueInfoReq

Query by league ID list.
No parameter.

5.6.4 SportsLeagueInfoRsp

Expand
Parameter Name Description Mandatory Type Value Range
data   Yes SportsLeagueInfoItem[] Maximum number of items: 32

5.6.5 SportsTeamInfoItem

Expand
Parameter Name Description Mandatory Type Value Range
teamId Team ID. Yes string Maximum length: 32 characters
teamName Team name. Yes string Maximum length: 64 characters
leagueId League ID, which is NBA (NBA), UK_EPL (Premier League), ITA_SERIEA (Serie A), ESP_LALIGA (La Liga), GEM_BUNDESLIGA (Bundesliga), FRA_L1 (Ligue 1), CN_CBA (CBA), or CN_CSL (Chinese Super League). Yes string(LeagueId)  
leagueName League name. Yes string Maximum length: 32 characters
alias Team alias. No string Maximum length: 64 characters
logo Team logo. Yes Image  
hot Popularity: 0: not popular; 1: popular. Yes int Enumerated values: 0 and 1
desc Brief description of a team. No string Maximum length: 512 characters
homePage Link to the team homepage. No Interaction  
chiefCoach Chief coach. No string Maximum length: 64 characters

5.6.6 SportsLeagueInfoItem

Expand
Parameter Name Description Mandatory Type Value Range
leagueId League ID, which is NBA (NBA), UK_EPL (Premier League), ITA_SERIEA (Serie A), ESP_LALIGA (La Liga), GEM_BUNDESLIGA (Bundesliga), FRA_L1 (Ligue 1), CN_CBA (CBA), or CN_CSL (Chinese Super League). Yes string(LeagueId)  
leagueName League name. Yes string Maximum length: 32 characters
logo Team logo. No Image  

5.6.7 SportsScheduleInfo

The query modes of the SportsScheduleInfo request are as follows: (1) Query of league schedules by league ID, start date, and end date. (2) Query of all known league schedules in a specified period by start date and end date.

Expand
Parameter Name Description Mandatory Type Value Range
leagueId League ID, which is NBA (NBA), UK_EPL (Premier League), ITA_SERIEA (Serie A), ESP_LALIGA (La Liga), GEM_BUNDESLIGA (Bundesliga), FRA_L1 (Ligue 1), CN_CBA (CBA), or CN_CSL (Chinese Super League). No string(LeagueId)  
beginDate Query start date (for example, 2018-09-09). No string Maximum length: 20 characters
endDate Query end date (for example, 2018-09-09). No string Maximum length: 20 characters

5.6.8 SportsScheduleInfoRsp

Expand
Parameter Name Description Mandatory Type Value Range
data   Yes SportsScheduleInfoItem[] Maximum number of items: 256

5.6.9 SportsScheduleInfoItem

Expand
Parameter Name Description Mandatory Type Value Range
matchId ID of a sports game. Yes string Maximum length: 32 characters
leagueId League ID, which is NBA (NBA), UK_EPL (Premier League), ITA_SERIEA (Serie A), ESP_LALIGA (La Liga), GEM_BUNDESLIGA (Bundesliga), FRA_L1 (Ligue 1), CN_CBA (CBA), or CN_CSL (Chinese Super League). Yes string(LeagueId)  
leagueName League name. Yes string Maximum length: 32 characters
pubTime Schedule release time. Yes string Maximum length: 20 characters
season Season, in a format similar to 2017-2018. Yes string Maximum length: 32 characters
round Round, for example, the first round. No string Maximum length: 32 characters
beginTime Start time of a sports game. Yes string Maximum length: 20 characters
status Status. 1: not started; 2: in progress; 3: ended Yes string Maximum length: 8 characters
process Current progress, which is valid only for a sports game whose status value is 2 (in progress). For example, in the second quarter. Yes string Maximum length: 32 characters
gameTime Elapsed time, which is valid only for a sports game whose status value is 2 (in progress). Yes string Maximum length: 32 characters
matchType Competition type, for example, regular season or playoffs. Yes string Maximum length: 32 characters
informations Information about the competition. Yes SportsScheduleInformationItem[]  
hot Popularity. 0: not popular; 1: popular. Yes int Enumerated values: 0 and 1
homeTeam Home team information. No SportsScheduleTeam  
awayTeam Away team information. No SportsScheduleTeam  

5.6.10 SportsScheduleInformationItem

Information about the competition.

Expand
Parameter Name Description Mandatory Type Value Range
title Information title. Yes string Maximum length: 128 characters
infoType Information type. The options are TEXTLIVE, VIDEOLIVE, and IMAGE. Yes string Maximum length: 16 characters. Enumerated values: TEXTLIVE, VIDEOLIVE, and IMAGE
link   No Interaction  
image Single image information. No Image  

5.6.11 SportsScheduleTeam

Team information.

Expand
Parameter Name Description Mandatory Type Value Range
teamId Team ID. Yes string Maximum length: 32 characters
teamName Team name. Yes string Maximum length: 64 characters
logo Team logo URL. Yes string Maximum length: 512 characters
score Score. No long  
prescore Big score. No long  

5.6.12 Interaction

Expand
Parameter Name Description Mandatory Type Value Range
webURL HTML5 link to be redirected when a card is touched. The value must be an HTTPS URL. No string Maximum length: 512 characters
deepLink Redirect to a native app. No NativeAppLinkInteraction  
quickApp Redirect to a Quick app. No QuickAppLinkInteraction  

5.6.13 NativeAppLinkInteraction

Redirect to a native app.

Expand
Parameter Name Description Mandatory Type Value Range
url Deep link to an app. Yes string Maximum length: 512 characters
appName App name. No string Maximum length: 256 characters
appPackage App package name. Yes string Maximum length: 256 characters
minVersion Minimum app version number. Yes long  
minAndroidAPILevel Minimum Android API level. No long  

5.6.14 QuickAppLinkInteraction

Redirect to a Quick app.

Expand
Parameter Name Description Mandatory Type Value Range
url Deep link to a Quick app. Yes string Maximum length: 512 characters
minPlatformVersion Minimum version number of the Quick app engine. Yes long  
minVersion Minimum version number of the Quick app. Yes long  

5.6.15 Image

Single image information.

Expand
Parameter Name Description Mandatory Type Value Range
url Image URL, which must be in HTTPS format. Yes string Maximum length: 512 characters
widthPixels Image width, in pixels. Yes long Minimum value: 1. Maximum value: 16384
heightPixels Image height, in pixels. Yes long Minimum value: 1. Maximum value: 16384

5.6.16 ImageInfo

Image information. At least one image must be provided.

Expand
Parameter Name Description Mandatory Type Value Range
small Small image. No Image  
medium Medium image. No Image  
large Large image. No Image  

6 Weather Interface List

API key weather Info is used for providing ready access to weather information.

6.1 Request

The following describes the request for weather information.

  1. Scenario A: In the case where the user does not enter the location and time, HAG invokes CP using the longitude and latitude of the user device and the time on the server. Each of the longitude, the latitude, and the time on the server is passed by using a separate field in the request body instead of a slot.

  2. Scenario B: HAG invokes CP by using IP address of the endpoint and the time on the server. The IP address is passed using a slot. The time on the server is passed using a separate field in the request body.

  3. Scenario C: In the case where the user queries about weather with speech input identifying the name of a city, the name of either a county or a district in the city, or a combination of any of the names, HAG invokes CP using the user provided name or names plus the time on the server. Names of the city and district/county are passed using slots.
    a. If the user queries about weather in Nanjing, the parameters to be used are city name and time on the server.
    b. If the user queries about weather in Yuhuatai District of Nanjing, the parameters to be used are city name, district name, and time on the server.
    c. If the user queries about weather in Jiangning County of Nanjing, the parameters to be used are city name, county name, and time on the server.
    d. If the user queries about weather in Yuhuatai District/Jiangning County, the parameters to be used are district/county name and time on the server.

Constraint 1: A city name may be one of a city outside China, for example London.

Constraint 2: Compatibility is required among names of the parameters. Full style consistency is not required for the names.

Example Request Message:

Collapse
Word wrap
Dark theme
Copy code
  1. {
  2. "slots": {
  3. "ip": {
  4. "name": "ip",
  5. "slotType": "string",
  6. "values": [
  7. {"real":"10.10.10.10"}
  8. ]
  9. },
  10. "city": {
  11. "name": "city",
  12. "slotType": "string",
  13. "values": [
  14. {"real":"Nanjing"}
  15. ]
  16. },
  17. "district": {
  18. "name": "district",
  19. "slotType": "string",
  20. "values": [
  21. {"real":"Yuhuatai District"}
  22. ]
  23. },
  24. "county": {
  25. "name": "county",
  26. "slotType": "string",
  27. "values": [
  28. {"real":"Jiangning County"}
  29. ]
  30. }
  31. }
  32. }
Expand
Component Name Description Required or Not Type Value Range
timestamp Request time on the server, which is not passed in the slot information. For details, see the definition of the request body that invokes the CP page. Yes DateTimeFormatString  
location Geographical location, which is not passed in the slot information. For details, see the definition of the request body that invokes the CP page. Yes Location  
ip IP address (IPv4) of the user device Yes String Maximum length: 32 characters
city City name, such as Nanjing / the City of Nanjing and London / the City of London. A support for both of the forms of naming is necessary. Yes String Maximum length: 32 characters
district Name of a district affiliated to the city, such as Yuhuatai / Yuhuatai District. Yes String Maximum length: 32 characters
county Name of a country affiliated to the city, such as Jiangjing / Jiangning County. Yes   Maximum length: 32 characters

6.2 Response

The following describes the response that delivers the weather information.
Example Response Message:

Collapse
Word wrap
Dark theme
Copy code
  1. {
  2. "items":[{
  3. "aqi":{
  4. "co":7,
  5. "no2":23,
  6. "o3":10,
  7. "pm10":52,
  8. "pm25":104,
  9. "so2":7,
  10. "aqivalue":137,
  11. "aqivalueText":"good",
  12. "aqidesc":"The air is fresh. It is good to go for a walk outside."
  13. },
  14. "city":{
  15. "name":"Nanjing",
  16. "timezone":"Asia/shanghai",
  17. "provicename":"Jiangsu Province",
  18. "countryname":"China"
  19. },
  20. "condition":{
  21. "weatherid":21,
  22. "cnweatherid":21,
  23. "humidity":"60",
  24. "temperature":25,
  25. "realfeel":20,
  26. "winddir":"NW",
  27. "windspeed":3,
  28. "updatetime":1547119922807,
  29. "pressure":1020 ,
  30. "uVIndex":1,
  31. "uVIndexText":"weak",
  32. "mobileLink":{
  33. "webURL":"webURL",
  34. "deepLink":{
  35. "url":"",
  36. "appName":"appName",
  37. "appPackage":"appPackage",
  38. "minVersion":1.0,
  39. "minAndroidAPILevel":1.0
  40. },
  41. "quickApp":{
  42. "url":"url",
  43. "minPlatformVersion":1.0,
  44. "minVersion":1.0
  45. }
  46. }
  47. },
  48. "dailys":{
  49. "dailyweathers":[
  50. {
  51. "moonphase":"WaxingGibbous",
  52. "moonRise":1547119922807,
  53. "moonSet":1547119922807,
  54. "sunRise":1547119922807,
  55. "sunSet":1547119922807,
  56. "maxTemp":27,
  57. "minTemp":17,
  58. "conditionDay":{
  59. "weatherid":21,
  60. "cnweatherid":21,
  61. "winddir":"E",
  62. "windlevel":2,
  63. "windspeed":3
  64. },
  65. "conditionNight":{
  66. "weatherid":21,
  67. "cnweatherid":21,
  68. "winddir":"NW",
  69. "windlevel":2,
  70. "windspeed":3
  71. },
  72. "publicTime":1547119922807,
  73. "sources":[""]
  74. }
  75. ],
  76. "publictime":1547119922807,
  77. "mobileLink":{
  78. "webURL":"webURL",
  79. "deepLink":{
  80. "url":"",
  81. "appName":"appName",
  82. "appPackage":"appPackage",
  83. "minVersion":1.0,
  84. "minAndroidAPILevel":1.0
  85. },
  86. "quickApp":{
  87. "url":"url",
  88. "minPlatformVersion":1.0,
  89. "minVersion":1.0
  90. }
  91. }
  92. },
  93. "hourlys":{
  94. "hourlyweathers": [{
  95. "weatherid":21,
  96. "cnweatherid":21,
  97. "Isdaynight":false,
  98. "rainProbability":30,
  99. "date":1547119922807,
  100. "temp":27
  101. }],
  102. "mobileLink":{
  103. "webURL":"webURL",
  104. "deepLink":{
  105. "url":"",
  106. "appName":"appName",
  107. "appPackage":"appPackage",
  108. "minVersion":1.0,
  109. "minAndroidAPILevel":1.0
  110. },
  111. "quickApp":{
  112. "url":"url",
  113. "minPlatformVersion":1.0,
  114. "minVersion":1.0
  115. }
  116. }
  117. },
  118. "liveInfos": [{
  119. "code": "1",
  120. "level": 2,
  121. "name": "dressing index",
  122. "updatetime": 1550490100768,
  123. "day": "2019-02-18",
  124. "content": "woolen sweater or thick coat" ,
  125. "status": "cold"
  126. }, {
  127. "code": "2",
  128. "level": 3,
  129. "name": "sports index",
  130. "updatetime": 1550490100765,
  131. "day": "2019-02-18",
  132. "content": "",
  133. "status": "unfavorable"
  134. }, {
  135. "code": "3",
  136. "level": 3,
  137. "name": "cold index",
  138. "updatetime": 1550490100762,
  139. "day": "2019-02-18",
  140. "content": "",
  141. "status": "easy to catch cold"
  142. }, {
  143. "code": "4",
  144. "level": 1,
  145. "name": "car wash index",
  146. "updatetime": 1550490100764,
  147. "day": "2019-02-18",
  148. "content": "",
  149. "status": "favorable"
  150. }, {
  151. "code": "5",
  152. "level": 1,
  153. "name": "travel index",
  154. "updatetime": 1550490100762,
  155. "day": "2019-02-18",
  156. "content": "",
  157. "status": "unfavorable"
  158. }, {
  159. "code": "6",
  160. "level": 1,
  161. "name": "UV index",
  162. "updatetime": 1550490100764,
  163. "day": "2019-02-18",
  164. "content": "",
  165. "status": "weakest UV light"
  166. }],
  167. "alert":{
  168. "title":"title",
  169. "content":"main body",
  170. "level":2,
  171. "LevelName":"yellow",
  172. "publicTime":1547119922807,
  173. "type":1,
  174. "typeName":"typhoon"
  175. }
  176. }]
  177. }
Expand
Component Name Description Required or Not Type Value Range
items   Yes WeatherInfoDetail[] Maximum number of items: 1

6.3 Structure

6.3.1 WeatherInfoDetail

Structure of WeatherInfoDetail is shown in the following table.

Expand
Component Name Description Required or Not Type Value Range
aqi Air quality index Yes WeatherAqi  
city Information on the city, including the time zone of the city or area Yes WeatherCity  
condition Real-time information on current weather Yes WeatherCondition  
dailys Weather data of the eight days starting from yesterday, to be returned in the order of time Yes Dailys  
hourlys Weather during each of the hours Yes Hourlyweathers  
liveInfos Information on the indexes of living Yes WeatherLiveInfo[] Maximum number of items: 30
alert Information on weather alerts No WeatherAlertInfo  

6.3.2 WeatherAqi

WeatherAqi delivers information on the air quality index.
Structure of WeatherAqi is shown in the following table.

Expand
Component Name Description Required or Not Type Value Range
co Carbon monoxide index Yes Number /
no2 Nitrogen dioxide index Yes Number /
o3 Ozone index Yes Number /
pm10 Concentration of PM10 Yes Number /
pm25 Concentration of PM2.5 Yes Number /
so2 Sulfur dioxide index Yes Number /
aqivalue Numerical value of the air quality index Yes Integer /
aqivalueText Description of the air quality level
Level 1: excellent
Level 2: good
Level 3: mildly polluted
Level 4: moderately polluted
Level 5: heavily polluted
Level 6: severely polluted
Yes String /
aqidesc One-sentence description of the air quality to be reported to the user, for example, “Weather in Nanjing today is good enough for having some outdoor activities.” Yes String Maximum length: 128 characters

6.3.3 WeatherCity

WeatherCity delivers information on the city, including the time zone of the city or area.

Expand
Component Name Description Required or Not Type Value Range
name Name of the city Yes String Maximum length: 32 characters
timezone Time zone where the city is located, in the Alson format, for example, Asia/shanghai Yes String Maximum length: 32 characters
provicename Name of the province Yes String Maximum length: 32 characters
countryname Name of the country Yes String Maximum length: 32 characters

6.3.4 CnWeatheridDef

CnWeatheridDef delivers the weather ID, with the values explained below:
00: Sunny
01: Cloudy
02: Overcast
03: Shower
04: Thundershower
05: Thundershower with hail
06: Sleet
07: Light rain
08: Moderate rain
09: Heavy rain
10: Storm
11: Heavy storm
12: Severe storm
13: Snow flurry
14: Light snow
15: Moderate snow
16: Heavy snow
17: Snowstorm
18: Foggy
19: Ice rain
20: Duststorm
21: Light to moderate rain
22: Moderate to heavy rain
23: Heavy rain to storm
24: Storm to heavy storm
25: Heavy to severe storm
26: Light to moderate snow
27: Moderate to heavy snow
28: Heavy snow to snowstorm
29: Dust
30: Sand
31: Sandstorm
53: Haze
99: Unknown
Structure of CnWeatheridDef is shown in the following table.

Expand
Type Value Range
Integer Enumerated value: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 53, 99.

6.3.5 WinddirDef

WinddirDef delivers the wind direction.
Structure of WinddirDef is shown in the following table.

Expand
Type Value Range
String Maximum length: 16
Enumerated value: NE, E, SE, S, SW, W, N, NW

6.3.6 WeatherCondition

WeatherCondition delivers real-time information on current weather.

Expand
Component Name Description Required or Not Type Value Range
weatherid ID of the type of current weather in the AccuWeather system of 44 weather types. Each type of weather requires a display of icons and background animations of the weather phenomenon for both the daytime and the night. Yes Long  
cnweatherid ID of the type of current weather in the Chinese system of 33 weather types. Each type of weather requires a display of icons and background animations of the weather phenomenon for both the daytime and the night. Yes Long  
humidity Humidity in percentage terms. HAG automatically adds the % sign to complete the figure. Yes String Maximum length: 32 characters
temperature Temperature in Celsius degree Yes Number  
realfeel Apparent temperature in Celsius degree Yes Number  
winddir Wind direction, for example, northeasterly wind Yes String Maximum length: 32 characters
windspeed Wind speed Yes Integer  
updatetime Release date Yes Number  
pressure Pressure in hectopascal Yes Number  
uVIndex UV index Yes Long  
uVIndexText Explanation of the UV index Yes String Maximum length: 32 characters
mobileLink URL for linking to the real-time weather information Yes Interaction  

6.3.7 Dailys

Dailys delivers weather data of the eight days starting from yesterday, to be returned in the order of time.
Structure of Dailys is shown in the following table.

Expand
Component Name Description Required or Not Type Value Range
dailyweathers Daily weather Yes DayWeatherInfo[] Maximum number of items: 8
publictime Release date No Number  
mobileLink   No Interaction  

6.3.8 DayWeatherInfo

DayWeatherInfo delivers information on daily weather.
Structure of DayWeatherInfo is shown in the following table.

Expand
Component Name Description Required or Not Type Value Range
moonphase Lunar phase
It has eight possibilities: new, waxing crescent, first, waxing gibbous, full, waning gibbous, last, and waning crescent.
No string Maximum length: 32 characters
Enumerated value: New, Waxing crescent, First, WaxingGibbous, Full, WaningGibbous, Last, WaningCrescent.
moonRise Moonrise No Number  
moonSet Moonset No Number  
sunRise Sunrise Yes Number  
sunSet Sunset Yes Number  
maxtemp Maximum temperature in Celsius degree Yes Number  
mintemp Minimum temperature in Celsius degree Yes Number  
publictime Code of the date for which the weather information is posted, which after conversion corresponds to a date of one of the next seven days, for example, 2019-1-21. Yes Number  
conditionDay Daytime weather Yes DayNightCondition  
conditionNight Night weather Yes DayNightCondition  
sources Description of the source of the forecast, which is used for display on the screen Yes string[] Maximum number of items: 16
Each item is subject to the check rule (that the maximum length is 128 characters).

6.3.9 DayNightCondition

DayNightCondition delivers information on daytime and night weather.

Expand
Component Name Description Required or Not Type Value Range
weatherid ID of the type of weather in the AccuWeather system of 44 weather types. Each type of weather requires a display of icons and background animations of the weather phenomenon for both the daytime and the night. HAG does not use this ID for now. Yes Intege  
cnweatherid Weather ID Yes Integer (CnWeatheridDef) Value of CnWeatheridDef
winddir Wind direction Yes String (WinddirDef)  
windlevel Wind level, which is a combination of the daytime and night wind levels. For example, level 3 to 4 indicates wind of level 3 during daytime and wind of level 4 in the night. Level 0 indicates breeze. Yes Integer Minimum value: 0
Maximum value: 17 windspeed Wind speed in km/h Yes Integer

6.3.10 Hourlys

Hourlys delivers information on weather in the next 24 hours starting from the current hour, to be returned in the order of time.
Structure of Hourlys is shown in the following table.

Expand
Component Name Description Required or Not Type Value Range
weatherid ID of the type of weather in the AccuWeather system of 44 weather types. Each type of weather requires a display of icons and background animations of the weather phenomenon. HAG does not use this ID for now. Yes Integer  
cnweatherid Weather ID Yes Integer (CnWeatheridDef) Value of CnWeatheridDef
date Code of time for which the weather information is posted, which after conversion corresponds to an hour in the future, for example, 2019-1-21 16:00. Yes Long  
temp Temperature in Celsius degree Yes Number  
rainprobability Precipitation rate in percentage terms. No % sign is needed in the return value. HAG automatically adds the % sign to complete the figure. Yes Number  
Isdaynight Indicates whether it is daytime or night. Yes Boolean Enumerated value: false or true

6.3.11 DressingIdxDef

DressingIdxDef delivers the dressing index, with the value explained below:

  • 1: down coat - frigid.
  • 2: thick coat - cold.
  • 3: sweater - cool.
  • 4: thin coat - slightly cozy.
  • 5: long-sleeved clothes - cozy.
  • 6: short-sleeved clothes - hot.
  • 7: short-sleeved clothes - scorching.

Structure of DressingIdxDef is shown in the following table.

Expand
Type Value Range
Integer Enumerated value: 1, 2, 3, 4, 5, 6, 7

6.3.12 SportsIdxDef

SportsIdxDef delivers the sports index, with the values explained below:

  • 1: favorable for sports
  • 2: slightly favorable for sports
  • 3: not favorable for sports
    Structure of SportsIdxDef is shown in the following table.
Expand
Type Value Range
Integer Enumerated value: 1, 2, 3

6.3.13 ColdIdxDef

ColdIdxDef delivers the cold index.

  • 1: little chance to catch cold
  • 2: slightly easy to catch cold
  • 3: easy to catch cold
  • 4: very easy to catch cold
    Structure of ColdIdxDef is shown in the following table.
Expand
Type Value Range
Integer Enumerated value: 1, 2, 3, 4

6.3.14 CarWashIdxDef

CarWashIdxDef delivers the car wash index.

  • 1: not favorable
  • 2: slightly unfavorable
  • 3: slightly favorable
  • 4: favorable

Structure of CarWashIdxDef is shown in the following table.

Expand
Type Value Range
Integer Enumerated value: 1, 2, 3, 4

6.3.15 TourismIdxDef

TourismIdxDef delivers the tourism index.

  • 1: not favorable
  • 2: slightly unfavorable
  • 3: slightly favorable
  • 4: favorable

Structure of TourismIdxDef is shown in the following table.

Expand
Type Value Range
Integer Enumerated value: 1, 2, 3, 4

6.3.16 UVIdxDef

UVIdxDef delivers the UV index.

  • 1: weakest UV light
  • 2: weak UV light
  • 3: moderate UV light
  • 4: strong UV light
  • 5: very strong UV light

Structure of UVIdxDef is shown in the following table.

Expand
Type Value Range
Integer Enumerated value: 1, 2, 3, 4, 5

6.3.17 WeatherLiveInfo

WeatherLiveInfo delivers information provided for daily life based on the weather condition.
Structure of WeatherLiveInfo f is shown in the following table.

Expand
Component Name Description Required or Not Type Value Range
code Code for the type of the index of living
1: dressing index
2: sports index
3: cold index
4: car wash index
5: tourism index
6: UV index
Yes String Maximum length: 16
day Date, in the format of yyyy-MM-dd, for example: 2018-02-23 Yes DateFormatString  
level Level of the index Yes Integer The value depends on the index type.
name Name of the index, including dressing index, sports, cold index, car wash index, tourism index, and UV index Yes String Maximum length: 16 characters
Enumerated value: dressing index, sports index, cold index, car wash index, tourism index, UV index
content Text for explaining the implication of the index, for example, woolen sweater or thick coat for the dressing index Yes String Maximum length: 16 characters
status Status under the index Yes String Maximum length: 16 characters
The value depends on the index type.
updatetime Release date Yes Number  
mobilelink URL of the secondary page corresponding to the index of living No Interaction  

6.3.18 WeatherAlertInfo

WeatherAlertInfo delivers information on weather alerts.
Structure of WeatherAlertInfo is shown in the following table.

Expand
Component Name Description Required or Not Type Value Range
title Title Yes String Maximum length: 128 characters
content Main body of the alert Yes String Maximum length: 256 characters
level Level on the scale of 01 to 04 Yes Integer Enumerated value:1, 2, 3, 4
levelName Designation for the level, for example blue for level 01, yellow for level 02, orange for level 03, and red for level 04 Yes String Maximum length: 32
Enumerated value: blue, yellow, orange, red
publictime Release date Yes Number  
type Code indicating the type of the alert, ranging from 01 to 14, with each of the codes explained below:
01: typhoon
02: rainstorm
03: snowstorm
04: cold wave
05: gale
06: sandstorm
07: high temperature
08: drought
09: lightning
10: hail
11: frost injury
12: dense fog
13: haze
14: road icing
Yes Integer Enumerated value: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
typeName Designation for the type of the alert. For the code of each type, the value is as follows:
01: typhoon
02: rainstorm
03: snowstorm04: cold wave
05: gale
06: sandstorm
07: high temperature
08: drought
09: lightning
10: hail
11: frost injury
12: dense fog
13: haze
14: road icing
Yes String Maximum length: 32 characters
Enumerated value: typhoon, rainstorm, snowstorm, cold wave, gale, sandstorm, high temperature, drought, lightning, hail, frost injury, dense fog, haze, road icing