This commit is contained in:
@@ -11,10 +11,10 @@ import java.util.List;
|
||||
public class SearchApiToYandexResponseMapper {
|
||||
private final ObjectMapper objectMapper = new ObjectMapper();
|
||||
|
||||
public YandexSearchResponse mapToYandexResponse(String searchApiJson, int page, int pageSize) throws IOException {
|
||||
public YandexSearchResponse mapToYandexResponse(String searchApiJson, int page, int pageSize, String findType) throws IOException {
|
||||
|
||||
JsonNode root = objectMapper.readTree(searchApiJson);
|
||||
JsonNode visualMatches = root.path("visual_matches");
|
||||
JsonNode visualMatches = root.path(findType);
|
||||
|
||||
YandexSearchResponse response = new YandexSearchResponse();
|
||||
List<YandexSearchResponse.ImageResult> images = new ArrayList<>();
|
||||
|
||||
Reference in New Issue
Block a user