mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-04-15 04:02:53 +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.getSunset() != null ? Instant.ofEpochSecond(systemInfo.getSunset()) : null);
|
||||||
builder.sunset(systemInfo.getSunrise() != null ? Instant.ofEpochSecond(systemInfo.getSunrise()) : 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);
|
return templateService.renderEmbedTemplate(OPEN_WEATHER_MAP_RESPONSE_TEMPLATE_KEY, builder.build(), serverId);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.warn("Failed to load weather in server {}", serverId, e);
|
log.warn("Failed to load weather in server {}", serverId, e);
|
||||||
|
|||||||
@@ -33,4 +33,5 @@ public class WeatherResponseModel {
|
|||||||
private String locationName;
|
private String locationName;
|
||||||
private String countryKey;
|
private String countryKey;
|
||||||
private Color embedColor;
|
private Color embedColor;
|
||||||
|
private Long locationId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,5 +29,6 @@ public class WeatherResult {
|
|||||||
private WeatherResultSystem systemInfo;
|
private WeatherResultSystem systemInfo;
|
||||||
@SerializedName("timezone")
|
@SerializedName("timezone")
|
||||||
private Long timezoneShift;
|
private Long timezoneShift;
|
||||||
|
@SerializedName("id")
|
||||||
|
private Long locationId;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user