Add support for google calendar
This commit is contained in:
@@ -33,21 +33,13 @@ public class CalendarConfigProvider {
|
||||
return googleCalendarConfig;
|
||||
}
|
||||
|
||||
public static String getCalendarUrl(int league) {
|
||||
|
||||
// Overwrite league from 2 to 1 because they share one calendar
|
||||
league = league == 2 ? 1 : league;
|
||||
|
||||
JSONObject leagueConfig = (JSONObject) getGoogleCalendarConfig().get(String.valueOf(league));
|
||||
public static String getCalendarUrl() {
|
||||
JSONObject leagueConfig = (JSONObject) getGoogleCalendarConfig().get(String.valueOf(1));
|
||||
return (String) leagueConfig.get("url");
|
||||
}
|
||||
|
||||
public static String getCalendarId(int league) {
|
||||
|
||||
// Overwrite league from 2 to 1 because they share one calendar
|
||||
league = league == 2 ? 1 : league;
|
||||
|
||||
JSONObject leagueConfig = (JSONObject) getGoogleCalendarConfig().get(String.valueOf(league));
|
||||
public static String getCalendarId() {
|
||||
JSONObject leagueConfig = (JSONObject) getGoogleCalendarConfig().get(String.valueOf(1));
|
||||
return (String) leagueConfig.get("id");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user