public GmapsClientFixture() { secretManager = new UserSecretManager(); gmapsApiKey = secretManager.GetGmapsGeocodeApiKey(); gmapsGeocodeClient = new GmapsGeocodeClient(gmapsApiKey); testAddress = "Av.Vallarta y Niño Obrero, por la cámara de comercio de Guadalajara."; geoCodeResponseTask = gmapsGeocodeClient.GetGeocodeForAddress(testAddress); }
public async Task <TweetDbo> AssignAddressObjectToTweet(TweetDbo tweetDbo, CancellationToken cancellationToken = default) { var geocode = await _gmapsGeocodeClient.GetGeocodeForAddress(tweetDbo.AddressText, cancellationToken); var geocodeDbo = _mapper.Map <GeocodeDbo>(geocode); tweetDbo.Geocode = geocodeDbo; return(tweetDbo); }