string PlaceDescriptionService::summaryDescription(const string& latitude, const string& longitude) const { auto request = createGetRequestUrl(latitude, longitude); auto response = get(request); AddressExtractor extractor; auto address = extractor.addressFrom(response); return address.summaryDescription(); }
string PlaceDescriptionService::summaryDescription( const string& latitude, const string& longitude) const { auto jsonResponse = http_->get(createGetRequestUrl(latitude, longitude)); AddressExtractor extractor; auto address = extractor.addressFrom(jsonResponse); return summaryDescription(address); }
string PlaceDescriptionService::summaryDescription( const string& latitude, const string& longitude) const { auto getRequestUrl = "lat=" + latitude + "&lon=" + longitude; auto jsonResponse = http_->get(getRequestUrl); // ... AddressExtractor extractor; auto address = extractor.addressFrom(jsonResponse); return address.road + ", " + address.city + ", " + address.state + ", " + address.country; }
string PlaceDescriptionService::summaryDescription( const string& response) const { AddressExtractor extractor; auto address = extractor.addressFrom(response); return address.summaryDescription(); }