Как я могу получить часы работы с помощью служб местоположения AWS?JAVA

Программисты JAVA общаются здесь
Anonymous
Как я могу получить часы работы с помощью служб местоположения AWS?

Сообщение Anonymous »

Я пытаюсь получить информацию о местах на основе образцов кода, однако я не могу получить часы работы. Демо -веб -приложение в AWS показывает это как можно использовать значение. < /P>
Это то, что я пытаюсь: < /p>

Код: Выделить всё

    // Build the search text from parameters
String searchText = String.format("%s %s %s %s", name, addressLine1, city, state);

// Create search request
SearchPlaceIndexForTextRequest searchRequest = SearchPlaceIndexForTextRequest.builder()
.indexName(placesIndex)
.text(searchText)
.build();

// Execute search
SearchPlaceIndexForTextResponse searchResponse = locationClient.searchPlaceIndexForText(searchRequest);

if (searchResponse.hasResults() && !searchResponse.results().isEmpty()) {
// Get the first result's place ID
Optional results = searchResponse.results().stream().findFirst();

String placeId = results.get().placeId();

logger.debug("place id: {}", placeId);

// Create get place request
GetPlaceRequest placeRequest = GetPlaceRequest.builder()
.placeId(placeId)
.indexName(placesIndex)
.language("en")  // Specify language for the response
.build();
}
< /code>
Однако я никогда не получаю несколько часов назад, например, на McDonalds я получаю следующее: < /p>
{"businessHours":"{\"addressNumber\":\"510\",\"categories\":[\"PointOfInterestType\"],\"country\":\"USA\",\"geometry\":{\"point\":[-116.2429,43.60939]},\"interpolated\":false,\"label\":\"McDonald\\u0027s, 510 N Orchard St, Boise, ID 83706-1979, United States\",\"municipality\":\"Boise\",\"neighborhood\":\"Morris Hill\",\"postalCode\":\"83706-1979\",\"region\":\"Idaho\",\"street\":\"N Orchard St\",\"subRegion\":\"Ada\",\"supplementalCategories\":[\"Fast Food\"],\"timeZone\":{\"name\":\"America/Boise\",\"offset\":-25200}}"}
Но пример приложения показывает:
< /p>
может ли этот API вернуть отмеченные часы? < /P>

Подробнее здесь: https://stackoverflow.com/questions/794 ... n-services

Вернуться в «JAVA»