}
@Override
- public PGNTournament getTournament(String tournamentId) throws ChessHogScannerException {
+ public PGNTournament scanTournament(String tournamentId) throws ChessHogScannerException {
String decodeTournament = decodeUrlByRegex(
assignUrl(tournamentId, null),
getSettings().getTournamentGamesUrlRegex()
for (String gameId : tournamentFormat.gameUrls()) {
tournament.addGame(
- getGame(gameId, tournamentId)
+ scanGame(gameId, tournamentId)
);
}
String tournamentId = arenaFormat.findTournament(tournamentName);
return tournamentId != null
- ? getTournament(tournamentId)
+ ? scanTournament(tournamentId)
: null;
}
@Override
- public PGNGame getGame(String gameId) throws ChessHogScannerException {
+ public PGNGame scanGame(String gameId) throws ChessHogScannerException {
throw new ChessHogScannerException(
"ChessBomb does not support searching game without a tournament name!"
);
}
@Override
- public PGNGame getGame(String gameId, String tournamentId) throws ChessHogScannerException {
+ public PGNGame scanGame(String gameId, String tournamentId) throws ChessHogScannerException {
String decodeGame = decodeUrlByRegex(
assignUrl(gameId, tournamentId, true),
getSettings().getGameUrlRegex()
);
}
+ @Override
+ public PGNGame scanUrl(String gameUrl) throws ChessHogScannerException {
+ return null;
+ }
+
private String decodeUrlByRegex(String url, String regex) throws ChessHogScannerException {
String encodeString = match(
url,