Ejemplo n.º 1
0
        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;
                }
            }
        }
Ejemplo n.º 2
0
 public PoiData GetPois(GetPoisSearchQueryParams queryParams)
 {
     return GetPoisAsync(queryParams).ResultSynchronizer();
 }