public class LegionBoardParser extends BaseParser
More information can be found on the official website and on its project page on GitLab.
This parser can be accessed using "legionboard" for SubstitutionScheduleData.setApi(String).
SubstitutionScheduleData.setData(JSONObject) to configure the parser:
api (String, required)website (String, recommended)UserPasswordAuthenticationData because all
schedules on LegionBoard are protected by a login.colorProvider, cookieProvider, cookieStore, credential, debuggingDataHandler, encodingDetector, executor, PARAM_CLASS_REGEX, sardine, scheduleData| Constructor and Description |
|---|
LegionBoardParser(SubstitutionScheduleData scheduleData,
CookieProvider cookieProvider) |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.lang.String> |
getAllClasses()
Get a list of all available classes.
|
java.util.List<java.lang.String> |
getAllTeachers()
Get a list of all available teachers.
|
SubstitutionSchedule |
getSubstitutionSchedule()
Downloads and parses the substitution schedule
|
contains, getClassesFromJson, getCredential, getInstance, getLastChange, getWebdavClient, httpGet, httpGet, httpGet, httpPost, httpPost, httpPost, httpPost, isPersonal, recognizeType, setCredential, setDebuggingDataHandler, setLocalSourcepublic LegionBoardParser(SubstitutionScheduleData scheduleData, CookieProvider cookieProvider)
public SubstitutionSchedule getSubstitutionSchedule() throws java.io.IOException, org.json.JSONException, CredentialInvalidException
SubstitutionScheduleParsergetSubstitutionSchedule in interface SubstitutionScheduleParsergetSubstitutionSchedule in class BaseParserSubstitutionSchedulejava.io.IOException - Connection or parsing errororg.json.JSONException - Error with the JSON configurationCredentialInvalidException - the supplied credential (BaseParser.setCredential(Credential) is
not correctpublic java.util.List<java.lang.String> getAllClasses()
throws java.io.IOException,
org.json.JSONException,
CredentialInvalidException
BaseParsergetAllClasses in class BaseParserjava.io.IOException - Connection or parsing errororg.json.JSONException - Error with the JSON configurationCredentialInvalidExceptionpublic java.util.List<java.lang.String> getAllTeachers()
throws java.io.IOException,
org.json.JSONException,
CredentialInvalidException
BaseParsernull.getAllTeachers in class BaseParserjava.io.IOException - Connection or parsing errororg.json.JSONException - Error with the JSON configurationCredentialInvalidException