mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-01-01 15:28:35 +00:00
[AB-91] adding location id to the available information for weather model
This commit is contained in:
@@ -125,6 +125,7 @@ public class OpenWeatherMap extends AbstractConditionableCommand {
|
||||
builder.sunset(systemInfo.getSunset() != null ? Instant.ofEpochSecond(systemInfo.getSunset()) : null);
|
||||
builder.sunset(systemInfo.getSunrise() != null ? Instant.ofEpochSecond(systemInfo.getSunrise()) : null);
|
||||
}
|
||||
builder.locationId(weatherResult.getLocationId());
|
||||
return templateService.renderEmbedTemplate(OPEN_WEATHER_MAP_RESPONSE_TEMPLATE_KEY, builder.build(), serverId);
|
||||
} catch (IOException e) {
|
||||
log.warn("Failed to load weather in server {}", serverId, e);
|
||||
|
||||
@@ -33,4 +33,5 @@ public class WeatherResponseModel {
|
||||
private String locationName;
|
||||
private String countryKey;
|
||||
private Color embedColor;
|
||||
private Long locationId;
|
||||
}
|
||||
|
||||
@@ -29,5 +29,6 @@ public class WeatherResult {
|
||||
private WeatherResultSystem systemInfo;
|
||||
@SerializedName("timezone")
|
||||
private Long timezoneShift;
|
||||
|
||||
@SerializedName("id")
|
||||
private Long locationId;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user