Sunrise and Sunset
Get the sunrise and sunset times for any location around the world for the next 60 days.
| Interface code | Interface | Class |
|---|---|---|
| astronomySun | Sunrise and sunset data | AstronomySunResponse |
Parameters
AstronomySunParameter
-
location(required)The location to be queried, support LocationID or comma-separated longitude and latitude (decimal, up to 2 decimal places), LocationID can be obtained by GeoAPI. Example:location=101010100orlocation=116.41,39.92 -
date(required)Set the date, up to 60 days in the future (including today). The date format is yyyyMMdd. Example:date=20200531
Sample code
public void astronomySun(AstronomySunParameter parameter, Callback<AstronomySunResponse> callback);
Response
AstronomySunResponse
-
codeSee Status Code -
updateTimeAPI last update time -
fxLinkResponsive web page of this data, for embedded in website or APP -
sunriseSunrise time. Maybe null in high latitude area -
sunsetSunset time. Maybe null in high latitude area -
refer.sourcesData source and other statements, may be null -
refer.licenseData license, may be null