aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Model')
-rw-r--r--MediaBrowser.Model/MediaBrowser.Model.csproj3
-rw-r--r--MediaBrowser.Model/Weather/WeatherForecast.cs30
-rw-r--r--MediaBrowser.Model/Weather/WeatherInfo.cs14
-rw-r--r--MediaBrowser.Model/Weather/WeatherStatus.cs38
4 files changed, 85 insertions, 0 deletions
diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj
index 9d9ae9f5f0..dabc6864ca 100644
--- a/MediaBrowser.Model/MediaBrowser.Model.csproj
+++ b/MediaBrowser.Model/MediaBrowser.Model.csproj
@@ -56,6 +56,9 @@
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Entities\User.cs" />
<Compile Include="Entities\UserItemData.cs" />
+ <Compile Include="Weather\WeatherForecast.cs" />
+ <Compile Include="Weather\WeatherInfo.cs" />
+ <Compile Include="Weather\WeatherStatus.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="protobuf-net">
diff --git a/MediaBrowser.Model/Weather/WeatherForecast.cs b/MediaBrowser.Model/Weather/WeatherForecast.cs
new file mode 100644
index 0000000000..f77d92366a
--- /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 0000000000..7cad4d2484
--- /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 0000000000..7019d319b7
--- /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
+ }
+}