Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 4b847de5

Přidáno uživatelem Alex Konig před téměř 4 roky(ů)

re #8933 Testing LoginParser

Zobrazit rozdíly:

Server/ServerApp/DataDownload/DataDownloader.cs
84 84
			webClient = new WebClient();
85 85
		}
86 86

  
87
		/// <summary>
88
		/// Downloads json file
89
		/// </summary>
90
		/// <returns> Path to file </returns>
91
		public string DownloadWeatherPrediction()
92
		{
93
			// TODO either set this path as attribute or if parameter JsonParser needs an attribute that would be set through constructor
94
			string predictionSite = "http://wttr.in/Plzen,czechia?format=j1";
95

  
96
			DateTime now = DateTime.Now;
97
			WebClient webClient = new WebClient();
98
			webClient.DownloadFile(predictionSite, $"data/{now.Year}{now.Month}{now.Day}.json");
99

  
100
			return $"data/{now.Year}{now.Month}{now.Day}.json";
101
		}
102

  
87 103
		/// <summary>
88 104
		/// Creates subdirectories for all data types
89 105
		/// TBD if we want to do it this way

Také k dispozici: Unified diff