Remove Gist
This commit is contained in:
@@ -1,19 +1,14 @@
|
||||
package de.jeyp91.tippliga;
|
||||
|
||||
import com.google.api.client.util.DateTime;
|
||||
import de.jeyp91.apifootball.APIFootballMatch;
|
||||
import de.jeyp91.gists.GistProvider;
|
||||
import de.jeyp91.tippligaforum.TippligaConfigProvider;
|
||||
import org.json.simple.JSONArray;
|
||||
import org.json.simple.JSONObject;
|
||||
import org.json.simple.parser.JSONParser;
|
||||
import org.json.simple.parser.ParseException;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
|
||||
public class TLWMatchesManagerBase {
|
||||
|
||||
@@ -27,19 +22,11 @@ public class TLWMatchesManagerBase {
|
||||
|
||||
protected void initConfigParamsFromFile(String configFileName) {
|
||||
|
||||
GistProvider prov = GistProvider.getInstance();
|
||||
String jsonConfig = prov.getTippligaConfig(configFileName);
|
||||
try {
|
||||
JSONParser jsonParser = new JSONParser();
|
||||
//Read JSON file
|
||||
JSONObject config = (JSONObject) jsonParser.parse(jsonConfig);
|
||||
this.numberOfMatchdays = ((Long) config.get("numberOfMatchdays")).intValue();
|
||||
this.matchdayConfig = (JSONArray) config.get("matchdayConfig");
|
||||
this.ko = ((Long) config.get("ko")).intValue();
|
||||
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
TippligaConfigProvider prov = new TippligaConfigProvider(this.season);
|
||||
JSONObject config = prov.getTippligaConfig(configFileName);
|
||||
this.numberOfMatchdays = ((Long) config.get("numberOfMatchdays")).intValue();
|
||||
this.matchdayConfig = (JSONArray) config.get("matchdayConfig");
|
||||
this.ko = ((Long) config.get("ko")).intValue();
|
||||
}
|
||||
|
||||
public static ArrayList<TLWMatch> getMatchesStartingFromSecondDay(ArrayList<TLWMatch> matches) {
|
||||
|
||||
Reference in New Issue
Block a user