Skip to content

Commit

Permalink
Merge pull request #77 from aVolpe/fix/gnb_url_2
Browse files Browse the repository at this point in the history
fix: GNB exchange url
  • Loading branch information
aVolpe authored Mar 8, 2024
2 parents 8f47f58 + 15d3cc6 commit 1573946
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
17 changes: 15 additions & 2 deletions src/main/java/py/com/volpe/cotizacion/GathererManager.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package py.com.volpe.cotizacion;

import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.data.util.Pair;
import org.springframework.stereotype.Service;
Expand Down Expand Up @@ -30,7 +29,6 @@
* @since 5/2/18
*/
@Service
@AllArgsConstructor
@Log4j2
public class GathererManager {

Expand All @@ -39,6 +37,21 @@ public class GathererManager {
private final ExecutionRepository executionRepository;
private final QueryResponseRepository queryResponseRepository;

public GathererManager(List<Gatherer> gathererList, PlaceRepository placeRepository, ExecutionRepository executionRepository, QueryResponseRepository queryResponseRepository) {

this.gathererList = gathererList;
this.placeRepository = placeRepository;
this.executionRepository = executionRepository;
this.queryResponseRepository = queryResponseRepository;

log.info("""
Staring GathererManager, available gatherers:
\t- '{}'
""", this.gathererList
.stream().map(g -> g.getCode()).collect(Collectors.joining("'\n\t- '")));
}

/**
* This is in charge of initializing the database (place and branches).
*
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/py/com/volpe/cotizacion/gatherer/GNB.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class GNB implements Gatherer {

private final HTTPHelper helper;

private static final String WS_URL = "https://www.bancognb.com.py/Yaguarete/public/quotations";
private static final String WS_URL = "https://www.bancognb.com.py/public/currency_quotations";

@Override
public List<QueryResponse> doQuery(Place place, List<PlaceBranch> branches) {
Expand Down

0 comments on commit 1573946

Please sign in to comment.