From 670a53258ef79ee92f578335577df4f768c9d7d4 Mon Sep 17 00:00:00 2001 From: LukePulverenti Luke Pulverenti luke pulverenti Date: Tue, 11 Sep 2012 14:20:12 -0400 Subject: Some minor code cleanups --- MediaBrowser.Controller/Weather/WeatherClient.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'MediaBrowser.Controller/Weather') diff --git a/MediaBrowser.Controller/Weather/WeatherClient.cs b/MediaBrowser.Controller/Weather/WeatherClient.cs index c4abdc171e..a16244820c 100644 --- a/MediaBrowser.Controller/Weather/WeatherClient.cs +++ b/MediaBrowser.Controller/Weather/WeatherClient.cs @@ -1,13 +1,13 @@ -using System; +using MediaBrowser.Common.Logging; +using MediaBrowser.Common.Serialization; +using MediaBrowser.Model.Weather; +using System; using System.IO; using System.Linq; using System.Net; using System.Net.Cache; using System.Net.Http; using System.Threading.Tasks; -using MediaBrowser.Common.Logging; -using MediaBrowser.Common.Serialization; -using MediaBrowser.Model.Weather; namespace MediaBrowser.Controller.Weather { @@ -36,8 +36,8 @@ namespace MediaBrowser.Controller.Weather return null; } - int numDays = 5; - string apiKey = "24902f60f1231941120109"; + const int numDays = 5; + const string apiKey = "24902f60f1231941120109"; string url = "http://free.worldweatheronline.com/feed/weather.ashx?q=" + zipCode + "&format=json&num_of_days=" + numDays + "&key=" + apiKey; @@ -95,7 +95,7 @@ namespace MediaBrowser.Controller.Weather public WeatherStatus ToWeatherStatus() { - return new WeatherStatus() + return new WeatherStatus { TemperatureCelsius = int.Parse(temp_C), TemperatureFahrenheit = int.Parse(temp_F), @@ -122,7 +122,7 @@ namespace MediaBrowser.Controller.Weather public WeatherForecast ToWeatherForecast() { - return new WeatherForecast() + return new WeatherForecast { Date = DateTime.Parse(date), HighTemperatureCelsius = int.Parse(tempMaxC), -- cgit v1.2.3