Projekt

Obecné

Profil

Stáhnout (1.65 KB) Statistiky
| Větev: | Tag: | Revize:
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using System.Threading.Tasks;
6

    
7
namespace ServerApp.DataDownload
8
{
9
	interface IDataDownloader
10
	{
11
		/// <summary>
12
		/// Downloads json file - returns contents of said file
13
		/// </summary>
14
		/// <returns> Path to file </returns>
15
		public string DownloadWeatherPrediction();
16

    
17
		/// <summary>
18
		/// Downloads selected type and time span of data in the desired format, returns a list of full paths to all successfully saved files. 
19
		/// If some of the files already existed and were not overwritten, then the returned List contains paths to these files also.
20
		/// </summary>
21
		/// <param name="type">The requested data type</param>
22
		/// <param name="format">The data format</param>
23
		/// <param name="startDate">The start date</param>
24
		/// <param name="endDate">The end date</param>
25
		/// <returns>A list of full paths to all saved files</returns>
26
		public List<string> DownloadData(DataType type, DataFormat format, Date startDate, Date endDate);
27

    
28
		/// <summary>
29
		/// Retrieves all data files with dates falling within the specified range. If not all data for the specified range is found
30
		/// then returns also file/s with month 0 if exists.
31
		/// If startDate and/or endDate are null, then returns all files from the given subdirectory.
32
		/// </summary>
33
		/// <param name="subDirectory">The subdirectory to search</param>
34
		/// <param name="startDate">The start date</param>
35
		/// <param name="endDate">The end date</param>
36
		/// <returns>A list of all retrieved data files from the requested time span</returns>
37
		public List<string> GetData(string subDirectory, Date startDate, Date endDate);
38
	}
39
}
(3-3/3)