aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Weather
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Model/Weather')
-rw-r--r--MediaBrowser.Model/Weather/WeatherForecast.cs30
-rw-r--r--MediaBrowser.Model/Weather/WeatherInfo.cs14
-rw-r--r--MediaBrowser.Model/Weather/WeatherStatus.cs38
-rw-r--r--MediaBrowser.Model/Weather/WeatherUnits.cs9
4 files changed, 91 insertions, 0 deletions
diff --git a/MediaBrowser.Model/Weather/WeatherForecast.cs b/MediaBrowser.Model/Weather/WeatherForecast.cs
new file mode 100644
index 000000000..f77d92366
--- /dev/null
+++ b/MediaBrowser.Model/Weather/WeatherForecast.cs
@@ -0,0 +1,30 @@
+using System;
+using ProtoBuf;
+
+namespace MediaBrowser.Model.Weather
+{
+ /// <summary>
+ /// Represents a weather forecase for a specific date
+ /// </summary>
+ [ProtoContract]
+ public class WeatherForecast
+ {
+ [ProtoMember(1)]
+ public DateTime Date { get; set; }
+
+ [ProtoMember(2)]
+ public int HighTemperatureFahrenheit { get; set; }
+
+ [ProtoMember(3)]
+ public int LowTemperatureFahrenheit { get; set; }
+
+ [ProtoMember(4)]
+ public int HighTemperatureCelsius { get; set; }
+
+ [ProtoMember(5)]
+ public int LowTemperatureCelsius { get; set; }
+
+ [ProtoMember(6)]
+ public WeatherConditions Condition { get; set; }
+ }
+}
diff --git a/MediaBrowser.Model/Weather/WeatherInfo.cs b/MediaBrowser.Model/Weather/WeatherInfo.cs
new file mode 100644
index 000000000..7cad4d248
--- /dev/null
+++ b/MediaBrowser.Model/Weather/WeatherInfo.cs
@@ -0,0 +1,14 @@
+using ProtoBuf;
+
+namespace MediaBrowser.Model.Weather
+{
+ [ProtoContract]
+ public class WeatherInfo
+ {
+ [ProtoMember(1)]
+ public WeatherStatus CurrentWeather { get; set; }
+
+ [ProtoMember(2)]
+ public WeatherForecast[] Forecasts { get; set; }
+ }
+}
diff --git a/MediaBrowser.Model/Weather/WeatherStatus.cs b/MediaBrowser.Model/Weather/WeatherStatus.cs
new file mode 100644
index 000000000..7019d319b
--- /dev/null
+++ b/MediaBrowser.Model/Weather/WeatherStatus.cs
@@ -0,0 +1,38 @@
+using ProtoBuf;
+
+namespace MediaBrowser.Model.Weather
+{
+ /// <summary>
+ /// Represents the current weather status
+ /// </summary>
+ [ProtoContract]
+ public class WeatherStatus
+ {
+ [ProtoMember(1)]
+ public int TemperatureFahrenheit { get; set; }
+
+ [ProtoMember(2)]
+ public int TemperatureCelsius { get; set; }
+
+ [ProtoMember(3)]
+ public int Humidity { get; set; }
+
+ [ProtoMember(4)]
+ public WeatherConditions Condition { get; set; }
+ }
+
+ public enum WeatherConditions
+ {
+ Sunny,
+ PartlyCloudy,
+ Cloudy,
+ Overcast,
+ Mist,
+ Snow,
+ Rain,
+ Sleet,
+ Fog,
+ Blizzard,
+ Thunderstorm
+ }
+}
diff --git a/MediaBrowser.Model/Weather/WeatherUnits.cs b/MediaBrowser.Model/Weather/WeatherUnits.cs
new file mode 100644
index 000000000..3bea67b9a
--- /dev/null
+++ b/MediaBrowser.Model/Weather/WeatherUnits.cs
@@ -0,0 +1,9 @@
+
+namespace MediaBrowser.Model.Weather
+{
+ public enum WeatherUnits
+ {
+ Fahrenheit,
+ Celsius
+ }
+}