public async Task <IActionResult> Events(string date) { TempData["DefaultDate"] = date ?? DateTime.Now.Date.ToString("yyyy-MM-dd"); var result = await _client.GetJsonResult <List <EventModel> >($"{APIUrl}/GetEvents/{TempData["DefaultDate"]}"); return(View(result)); }
public async Task <T> GetData <T>(string queryParams, string param1 = "") { switch (ResponseTypes) { case ServiceResponseTypes.XML: return(await _client.GetXMLResult <T>($"{APIUrl}{queryParams}", param1)); default: return(await _client.GetJsonResult <T>($"{APIUrl}{queryParams}")); } }