public async Task <PoiData> GetPoisAsync(GetPoisSearchQueryParams queryParams) { using (var client = new HttpClient()) { var url = string.Format("{0}/{1}?{2}", _url, "get_pois", queryParams.ToUrlParams()); var response = await client.GetAsync(url); var content = await response.Content.ReadAsStringAsync(); try { return(ResponseUtils.BuildPoiResponse(content).FirstOrDefault()); } catch { return(null); } } }
public PoiData GetPois(GetPoisSearchQueryParams queryParams) { return(GetPoisAsync(queryParams).ResultSynchronizer()); }