Finish gist
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package de.jeyp91.tippliga;
|
||||
|
||||
import com.google.common.io.Resources;
|
||||
import de.jeyp91.gists.GistProvider;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.json.simple.JSONArray;
|
||||
@@ -8,9 +8,6 @@ import org.json.simple.JSONObject;
|
||||
import org.json.simple.parser.JSONParser;
|
||||
import org.json.simple.parser.ParseException;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class TLWMatchesCreatorTipperPokal extends TLWMatchesCreatorBase{
|
||||
@@ -30,21 +27,21 @@ public class TLWMatchesCreatorTipperPokal extends TLWMatchesCreatorBase{
|
||||
this.league = league;
|
||||
this.matchdays = matchdays;
|
||||
|
||||
URL tipperListUrl = Resources.getResource(season + "\\" + configFileName);
|
||||
URL tipperTeamConfigUrl = Resources.getResource("Tipper_Team_Config.json");
|
||||
|
||||
GistProvider prov = GistProvider.getInstance();
|
||||
|
||||
this.TLWMatches = new ArrayList<>();
|
||||
|
||||
try {
|
||||
JSONParser jsonParser = new JSONParser();
|
||||
|
||||
String tipperListString = Resources.toString(tipperListUrl, StandardCharsets.UTF_8);
|
||||
String tipperListString = prov.getTippligaConfig(season, configFileName);
|
||||
this.tipperList = (JSONObject) jsonParser.parse(tipperListString);
|
||||
|
||||
String tipperTeamConfigString = Resources.toString(tipperTeamConfigUrl, StandardCharsets.UTF_8);
|
||||
String tipperTeamConfigString = prov.getTippligaBaseConfig("Tipper_Team_Config.json");
|
||||
this.tipperTeamConfig = (JSONArray) jsonParser.parse(tipperTeamConfigString);
|
||||
|
||||
} catch (IOException | ParseException e) {
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user