public void GetUrl_one_location() { var req = new ElevationRequest(); req.Locations.Add(new LatLng(40.714728, -73.998672)); string expected = "json?locations=40.714728,-73.998672"; string actual = req.ToUri().OriginalString; Assert.AreEqual(expected, actual); }
/// <summary> /// Sends the specified request to the Google Maps Elevation web /// service and parses the response as an ElevationResponse /// object. /// </summary> /// <param name="request"></param> /// <returns></returns> public ElevationResponse GetResponse(ElevationRequest request) { var url = new Uri(this.BaseUri, request.ToUri()); return(Internal.Http.Get(url).As <ElevationResponse>()); }
public async Task <ElevationResponse> GetResponseAsync(ElevationRequest request) { var url = new Uri(baseUri, request.ToUri()); return(await http.GetAsync <ElevationResponse>(url)); }
/// <summary> /// Sends the specified request to the Google Maps Elevation web /// service and parses the response as an ElevationResponse /// object. /// </summary> /// <param name="request"></param> /// <returns></returns> public ElevationResponse GetResponse(ElevationRequest request) { var url = new Uri(baseUri, request.ToUri()); return(http.Get <ElevationResponse>(url)); }
/// <summary> /// Sends the specified request to the Google Maps Elevation web /// service and parses the response as an ElevationResponse /// object. /// </summary> /// <param name="request"></param> /// <returns></returns> public ElevationResponse GetResponse(ElevationRequest request) { var url = new Uri(this.BaseUri, request.ToUri()); return Internal.Http.Get(url).As<ElevationResponse>(); }