diff --git a/src/main/java/trap/report/DownloadHelper.java b/src/main/java/trap/report/DownloadHelper.java index de2ec39..76176b3 100644 --- a/src/main/java/trap/report/DownloadHelper.java +++ b/src/main/java/trap/report/DownloadHelper.java @@ -20,14 +20,7 @@ public void downloadFiles(String[] trapTypes) throws IOException, URISyntaxExcep long start = System.currentTimeMillis(); System.out.println("Started downloading files"); - Map fileUrls = new HashMap<>(); - fileUrls.put("singles", "https://metabase.sssfonline.com/public/question/8648faf9-42e8-4a9c-b55d-2f251349de7f.csv"); - fileUrls.put("doubles", "https://metabase.sssfonline.com/public/question/5d5a78a5-2356-477f-b1b8-fe6ee11d25b1.csv"); - fileUrls.put("handicap", "https://metabase.sssfonline.com/public/question/69ca55d9-3e18-45bc-b57f-73aeb205ece8.csv"); - fileUrls.put("skeet", "https://metabase.sssfonline.com/public/question/c697d744-0e06-4c3f-a640-fea02f9c9ecd.csv"); - fileUrls.put("clays", "https://metabase.sssfonline.com/public/question/2c6edb1a-a7ee-43c2-8180-ad199a57be55.csv"); - fileUrls.put("fivestand", "https://metabase.sssfonline.com/public/question/3c5aecf2-a9f2-49b2-a11f-36965cb1a964.csv"); - fileUrls.put("doublesskeet", "https://metabase.sssfonline.com/public/question/bdd61066-6e29-4242-b6e9-adf286c2c4ae.csv"); + Map fileUrls = getFileUrls(); Charset charset = StandardCharsets.UTF_8; for (String type : trapTypes) { @@ -44,4 +37,16 @@ public void downloadFiles(String[] trapTypes) throws IOException, URISyntaxExcep } System.out.println("Files downloaded in " + (System.currentTimeMillis() - start) + " ms"); } + + private static Map getFileUrls() { + Map fileUrls = new HashMap<>(); + fileUrls.put("singles", "https://metabase.sssfonline.com/public/question/8648faf9-42e8-4a9c-b55d-2f251349de7f.csv"); + fileUrls.put("doubles", "https://metabase.sssfonline.com/public/question/5d5a78a5-2356-477f-b1b8-fe6ee11d25b1.csv"); + fileUrls.put("handicap", "https://metabase.sssfonline.com/public/question/69ca55d9-3e18-45bc-b57f-73aeb205ece8.csv"); + fileUrls.put("skeet", "https://metabase.sssfonline.com/public/question/c697d744-0e06-4c3f-a640-fea02f9c9ecd.csv"); + fileUrls.put("clays", "https://metabase.sssfonline.com/public/question/2c6edb1a-a7ee-43c2-8180-ad199a57be55.csv"); + fileUrls.put("fivestand", "https://metabase.sssfonline.com/public/question/3c5aecf2-a9f2-49b2-a11f-36965cb1a964.csv"); + fileUrls.put("doublesskeet", "https://metabase.sssfonline.com/public/question/bdd61066-6e29-4242-b6e9-adf286c2c4ae.csv"); + return fileUrls; + } }