aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/WeatherService.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-06-23 11:02:53 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-06-23 11:02:53 -0400
commit189618a75159d604e425c9318984dc2d8a9cc3f9 (patch)
treea87beed88f3f90679b6178641a8469f4129986d7 /MediaBrowser.Api/WeatherService.cs
parent0acc25735419b051c6f57a2c08b2ad6f3a969b83 (diff)
fixes #358 - Weather validation in Server configuration
Diffstat (limited to 'MediaBrowser.Api/WeatherService.cs')
-rw-r--r--MediaBrowser.Api/WeatherService.cs41
1 files changed, 0 insertions, 41 deletions
diff --git a/MediaBrowser.Api/WeatherService.cs b/MediaBrowser.Api/WeatherService.cs
deleted file mode 100644
index 25f6d237a..000000000
--- a/MediaBrowser.Api/WeatherService.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-using MediaBrowser.Controller;
-using MediaBrowser.Model.Weather;
-using ServiceStack.ServiceHost;
-using System.Linq;
-using System.Threading;
-
-namespace MediaBrowser.Api
-{
- /// <summary>
- /// Class Weather
- /// </summary>
- [Route("/Weather", "GET")]
- [Api(Description = "Gets weather information for a given location")]
- public class GetWeather : IReturn<WeatherInfo>
- {
- /// <summary>
- /// Gets or sets the location.
- /// </summary>
- /// <value>The location.</value>
- [ApiMember(Name = "Location", Description = "Us zip / City, State, Country / City, Country", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "GET")]
- public string Location { get; set; }
- }
-
- /// <summary>
- /// Class WeatherService
- /// </summary>
- public class WeatherService : BaseApiService
- {
- /// <summary>
- /// Gets the specified request.
- /// </summary>
- /// <param name="request">The request.</param>
- /// <returns>System.Object.</returns>
- public object Get(GetWeather request)
- {
- var result = Kernel.Instance.WeatherProviders.First().GetWeatherInfoAsync(request.Location, CancellationToken.None).Result;
-
- return ToOptimizedResult(result);
- }
- }
-}