private static async Task <List <Category> > GetRemote() { var response = await HttpUtil.PerformGetRequest(_url); if (response.status == HttpStatusCode.OK) { SaveToDisk(response.data); return(_parser.ToList(response.data)); } return(null); }
private static async Task <List <Order> > GetRemote(DateTime from, DateTime to) { var response = await HttpUtil.PerformGetRequest(_url, new Dictionary <string, string> { ["start"] = String.Format("{0:yyyy-MM-dd}", from), ["end"] = String.Format("{0:yyyy-MM-dd}", to) }); if (response.status == HttpStatusCode.OK) { var result = _parser.ToList(response.data); UpdateDisk(result); return(result); } return(null); }