Intelligent Assistant
Chat with our virtual assistant to get answers promptly.
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
Before importing content data, check the total data volume and daily data change volume by using the following checklist.
| 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. |
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
| 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
| 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. |
</>
Method: POST
URL: /sports/teams
Function: To obtain the information about sports teams.
None
Name: requestBody
Mandatory: Yes
Type: SportsTeamInfoReq
Description: Request message.
1. Status code: 200
Response body type: SportsTeamInfoRsp
Description: The query is successful and the query result is returned.
Method: POST
URL: /sports/leagues
Function: To obtain information about sports leagues.
None
Name: requestBody
Mandatory: Yes
Type: SportsLeagueInfoReq
Description: Request message.
1. Status code: 200
Response body type: SportsLeagueInfoRsp
Description: The query is successful and the query result is returned.
Method: POST
URL: /sports/schedules
Function: To obtain information about sports schedules.
None
Name: requestBody
Mandatory: Yes
Type: SportsScheduleInfo
Description: Request message.
1. Status code: 200
Response body type: SportsScheduleInfoRsp
Description: The query is successful and the query result is returned.
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).
| Type | Value Range |
|---|---|
| string | Enumerated values: NBA, UK_EPL, ITA_SERIEA, ESP_LALIGA, GEM_BUNDESLIGA, FRA_L1, CN_CBA, and CN_CSL |
Time format: yyyyMMddHHmmss
| Type | Value Range |
|---|---|
| string | Regular expression pattern: [0-9]{14} |
Date format: yyyy-HH-dd
| Type | Value Range |
|---|---|
| string | Regular expression pattern: [0-9]{4}-[0-9]{1,2}-[0-9]{1,2} |
Query by league ID list.
| Parameter Name | Description | Mandatory | Type | Value Range |
|---|---|---|---|---|
| leagueIds | League ID. Use commas (,) to separate multiple league IDs. | No | LeagueId[] | Maximum number of items: 32 |
| Parameter Name | Description | Mandatory | Type | Value Range |
|---|---|---|---|---|
| data | Yes | SportsTeamInfoItem[] | Maximum number of items: 32 |
Query by league ID list.
No parameter.
| Parameter Name | Description | Mandatory | Type | Value Range |
|---|---|---|---|---|
| data | Yes | SportsLeagueInfoItem[] | Maximum number of items: 32 |
| 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 |
| 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 |
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.
| 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 |
| Parameter Name | Description | Mandatory | Type | Value Range |
|---|---|---|---|---|
| data | Yes | SportsScheduleInfoItem[] | Maximum number of items: 256 |
| 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 |
Information about the competition.
| 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 |
Team information.
| 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 |
| 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 |
Redirect to a native app.
| 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 |
Redirect to a Quick app.
| 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 |
Single image information.
| 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 |
Image information. At least one image must be provided.
| Parameter Name | Description | Mandatory | Type | Value Range |
|---|---|---|---|---|
| small | Small image. | No | Image | |
| medium | Medium image. | No | Image | |
| large | Large image. | No | Image |
API key weather Info is used for providing ready access to weather information.
The following describes the request for weather information.
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.
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.
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:
- {
- "slots": {
- "ip": {
- "name": "ip",
- "slotType": "string",
- "values": [
- {"real":"10.10.10.10"}
- ]
- },
- "city": {
- "name": "city",
- "slotType": "string",
- "values": [
- {"real":"Nanjing"}
- ]
- },
- "district": {
- "name": "district",
- "slotType": "string",
- "values": [
- {"real":"Yuhuatai District"}
- ]
- },
- "county": {
- "name": "county",
- "slotType": "string",
- "values": [
- {"real":"Jiangning County"}
- ]
- }
- }
- }
| 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 |
The following describes the response that delivers the weather information.
Example Response Message:
- {
- "items":[{
- "aqi":{
- "co":7,
- "no2":23,
- "o3":10,
- "pm10":52,
- "pm25":104,
- "so2":7,
- "aqivalue":137,
- "aqivalueText":"good",
- "aqidesc":"The air is fresh. It is good to go for a walk outside."
- },
- "city":{
- "name":"Nanjing",
- "timezone":"Asia/shanghai",
- "provicename":"Jiangsu Province",
- "countryname":"China"
- },
- "condition":{
- "weatherid":21,
- "cnweatherid":21,
- "humidity":"60",
- "temperature":25,
- "realfeel":20,
- "winddir":"NW",
- "windspeed":3,
- "updatetime":1547119922807,
- "pressure":1020 ,
- "uVIndex":1,
- "uVIndexText":"weak",
- "mobileLink":{
- "webURL":"webURL",
- "deepLink":{
- "url":"",
- "appName":"appName",
- "appPackage":"appPackage",
- "minVersion":1.0,
- "minAndroidAPILevel":1.0
- },
- "quickApp":{
- "url":"url",
- "minPlatformVersion":1.0,
- "minVersion":1.0
- }
- }
- },
- "dailys":{
- "dailyweathers":[
- {
- "moonphase":"WaxingGibbous",
- "moonRise":1547119922807,
- "moonSet":1547119922807,
- "sunRise":1547119922807,
- "sunSet":1547119922807,
- "maxTemp":27,
- "minTemp":17,
- "conditionDay":{
- "weatherid":21,
- "cnweatherid":21,
- "winddir":"E",
- "windlevel":2,
- "windspeed":3
- },
- "conditionNight":{
- "weatherid":21,
- "cnweatherid":21,
- "winddir":"NW",
- "windlevel":2,
- "windspeed":3
- },
- "publicTime":1547119922807,
- "sources":[""]
- }
- ],
- "publictime":1547119922807,
- "mobileLink":{
- "webURL":"webURL",
- "deepLink":{
- "url":"",
- "appName":"appName",
- "appPackage":"appPackage",
- "minVersion":1.0,
- "minAndroidAPILevel":1.0
- },
- "quickApp":{
- "url":"url",
- "minPlatformVersion":1.0,
- "minVersion":1.0
- }
- }
- },
- "hourlys":{
- "hourlyweathers": [{
- "weatherid":21,
- "cnweatherid":21,
- "Isdaynight":false,
- "rainProbability":30,
- "date":1547119922807,
- "temp":27
- }],
- "mobileLink":{
- "webURL":"webURL",
- "deepLink":{
- "url":"",
- "appName":"appName",
- "appPackage":"appPackage",
- "minVersion":1.0,
- "minAndroidAPILevel":1.0
- },
- "quickApp":{
- "url":"url",
- "minPlatformVersion":1.0,
- "minVersion":1.0
- }
- }
- },
- "liveInfos": [{
- "code": "1",
- "level": 2,
- "name": "dressing index",
- "updatetime": 1550490100768,
- "day": "2019-02-18",
- "content": "woolen sweater or thick coat" ,
- "status": "cold"
- }, {
- "code": "2",
- "level": 3,
- "name": "sports index",
- "updatetime": 1550490100765,
- "day": "2019-02-18",
- "content": "",
- "status": "unfavorable"
- }, {
- "code": "3",
- "level": 3,
- "name": "cold index",
- "updatetime": 1550490100762,
- "day": "2019-02-18",
- "content": "",
- "status": "easy to catch cold"
- }, {
- "code": "4",
- "level": 1,
- "name": "car wash index",
- "updatetime": 1550490100764,
- "day": "2019-02-18",
- "content": "",
- "status": "favorable"
- }, {
- "code": "5",
- "level": 1,
- "name": "travel index",
- "updatetime": 1550490100762,
- "day": "2019-02-18",
- "content": "",
- "status": "unfavorable"
- }, {
- "code": "6",
- "level": 1,
- "name": "UV index",
- "updatetime": 1550490100764,
- "day": "2019-02-18",
- "content": "",
- "status": "weakest UV light"
- }],
- "alert":{
- "title":"title",
- "content":"main body",
- "level":2,
- "LevelName":"yellow",
- "publicTime":1547119922807,
- "type":1,
- "typeName":"typhoon"
- }
- }]
- }
| Component Name | Description | Required or Not | Type | Value Range |
|---|---|---|---|---|
| items | Yes | WeatherInfoDetail[] | Maximum number of items: 1 |
Structure of WeatherInfoDetail is shown in the following table.
| 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 |
WeatherAqi delivers information on the air quality index.
Structure of WeatherAqi is shown in the following table.
| 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 |
WeatherCity delivers information on the city, including the time zone of the city or area.
| 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 |
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.
| 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. |
WinddirDef delivers the wind direction.
Structure of WinddirDef is shown in the following table.
| Type | Value Range |
|---|---|
| String | Maximum length: 16 Enumerated value: NE, E, SE, S, SW, W, N, NW |
WeatherCondition delivers real-time information on current weather.
| 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 |
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.
| 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 |
DayWeatherInfo delivers information on daily weather.
Structure of DayWeatherInfo is shown in the following table.
| 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). |
DayNightCondition delivers information on daytime and night weather.
| 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 |
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.
| 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 |
DressingIdxDef delivers the dressing index, with the value explained below:
Structure of DressingIdxDef is shown in the following table.
| Type | Value Range |
|---|---|
| Integer | Enumerated value: 1, 2, 3, 4, 5, 6, 7 |
SportsIdxDef delivers the sports index, with the values explained below:
| Type | Value Range |
|---|---|
| Integer | Enumerated value: 1, 2, 3 |
ColdIdxDef delivers the cold index.
| Type | Value Range |
|---|---|
| Integer | Enumerated value: 1, 2, 3, 4 |
CarWashIdxDef delivers the car wash index.
Structure of CarWashIdxDef is shown in the following table.
| Type | Value Range |
|---|---|
| Integer | Enumerated value: 1, 2, 3, 4 |
TourismIdxDef delivers the tourism index.
Structure of TourismIdxDef is shown in the following table.
| Type | Value Range |
|---|---|
| Integer | Enumerated value: 1, 2, 3, 4 |
UVIdxDef delivers the UV index.
Structure of UVIdxDef is shown in the following table.
| Type | Value Range |
|---|---|
| Integer | Enumerated value: 1, 2, 3, 4, 5 |
WeatherLiveInfo delivers information provided for daily life based on the weather condition.
Structure of WeatherLiveInfo f is shown in the following table.
| 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 |
WeatherAlertInfo delivers information on weather alerts.
Structure of WeatherAlertInfo is shown in the following table.
| 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 |