Package com.aerisweather.aeris.response
Class SunmoonResponse
- java.lang.Object
-
- com.aerisweather.aeris.response.AerisFriendlyResponse
-
- com.aerisweather.aeris.response.SunmoonResponse
-
public class SunmoonResponse extends AerisFriendlyResponse
Object to make thesunmoon
endpoint response more friendly to determine what parts of the AerisDataJSON have come back in the response.
-
-
Field Summary
-
Fields inherited from class com.aerisweather.aeris.response.AerisFriendlyResponse
response
-
-
Constructor Summary
Constructors Constructor Description SunmoonResponse(AerisDataJSON data)
Constructor the the sunmoon response.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDateTimeISO()
Get the date time ISO for the sunmoon.AerisLocation
getLocation()
Gets the Aeris location from the response.Moon
getMoonInfo()
Get the moon info for the moon.Sun
getSunInfo()
Get the info for the sun.Number
getTimestamp()
Get the timestamp-
Methods inherited from class com.aerisweather.aeris.response.AerisFriendlyResponse
getDataSource, getId, getPlace, getProfile, getProfileTimezone, getRelative
-
-
-
-
Constructor Detail
-
SunmoonResponse
public SunmoonResponse(AerisDataJSON data)
Constructor the the sunmoon response. Wraps the JSON data into a friendlier object to determine what data is available.- Parameters:
data
- JSON data
-
-
Method Detail
-
getLocation
public AerisLocation getLocation()
Description copied from class:AerisFriendlyResponse
Gets the Aeris location from the response.- Overrides:
getLocation
in classAerisFriendlyResponse
- Returns:
- the location
-
getDateTimeISO
public String getDateTimeISO()
Get the date time ISO for the sunmoon.- Returns:
- the date time ISO
-
getTimestamp
public Number getTimestamp()
Get the timestamp- Returns:
- the timestamp
-
getSunInfo
public Sun getSunInfo()
Get the info for the sun.- Returns:
- the sun info
-
getMoonInfo
public Moon getMoonInfo()
Get the moon info for the moon.- Returns:
- the moon info
-
-