[LIB-13] Lazy scanners init, scan by URL and rename API functions
[chesshog-scanner.git] / src / main / java / org / hedgecode / chess / scanner / portal / LiChessScanner.java
index 1449392..134180e 100644 (file)
@@ -43,7 +43,7 @@ public class LiChessScanner extends AbstractSettingsScanner {
     }
 
     @Override
-    public PGNTournament getTournament(String tournamentId) throws ChessHogScannerException {
+    public PGNTournament scanTournament(String tournamentId) throws ChessHogScannerException {
         PGNTournament tournament = new PGNTournament(tournamentId);
         assignTournamentGames(tournament);
         return tournament;
@@ -57,7 +57,7 @@ public class LiChessScanner extends AbstractSettingsScanner {
     }
 
     @Override
-    public PGNGame getGame(String gameId) throws ChessHogScannerException {
+    public PGNGame scanGame(String gameId) throws ChessHogScannerException {
         String pgn = request(
                 assignUrl(gameId)
         );
@@ -67,8 +67,13 @@ public class LiChessScanner extends AbstractSettingsScanner {
     }
 
     @Override
-    public PGNGame getGame(String gameId, String tournamentId) throws ChessHogScannerException {
-        return getGame(gameId);
+    public PGNGame scanGame(String gameId, String tournamentId) throws ChessHogScannerException {
+        return scanGame(gameId);
+    }
+
+    @Override
+    public PGNGame scanUrl(String gameUrl) throws ChessHogScannerException {
+        return null;
     }
 
     private void assignTournamentGames(PGNTournament tournament) throws ChessHogScannerException {