#37 Added eBay data src, updated context + tests

This commit is contained in:
Marvin Scham
2023-06-06 02:11:50 +02:00
parent 39176b5dc0
commit af8993cb0f
12 changed files with 325 additions and 14 deletions

View File

@@ -43,7 +43,7 @@ public final class EbayItemDataSource extends AbstractDataSource {
* @param searchQuery Exact product name or other valid identifier.
*/
@Override
public URL createApiUrl(final String searchQuery) throws MalformedURLException {
protected URL createApiUrl(final String searchQuery) throws MalformedURLException {
return new URL(baseUrl
+ "/buy/browse/v1/item_summary/search?q="
+ searchQuery
@@ -57,7 +57,7 @@ public final class EbayItemDataSource extends AbstractDataSource {
* @param json Product data
* @return Finished ProductDTO
*/
public ProductDTO buildProductDTO(final ProductDTO product, final String json) {
protected ProductDTO buildProductDTO(final ProductDTO product, final String json) {
String root = "$.itemSummaries[0].";
ReadContext ctx = JsonPath.parse(json);