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, encodingDetector, executor, PARAM_CLASS_REGEX, scheduleData| Constructor and Description |
|---|
LegionBoardParser(SubstitutionScheduleData scheduleData,
CookieProvider cookieProvider) |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getAllClasses()
Get a list of all available classes.
|
List<String> |
getAllTeachers()
Get a list of all available teachers.
|
SubstitutionSchedule |
getSubstitutionSchedule()
Downloads and parses the substitution schedule
|
contains, getClassesFromJson, getCredential, getInstance, httpGet, httpGet, httpPost, httpPost, httpPost, httpPost, recognizeType, setCredentialpublic LegionBoardParser(SubstitutionScheduleData scheduleData, CookieProvider cookieProvider)
public SubstitutionSchedule getSubstitutionSchedule() throws IOException, org.json.JSONException, CredentialInvalidException
BaseParsergetSubstitutionSchedule in interface SubstitutionScheduleParsergetSubstitutionSchedule in class BaseParserSubstitutionScheduleIOException - Connection or parsing errororg.json.JSONException - Error with the JSON configurationCredentialInvalidException - the supplied credential (BaseParser.setCredential(Credential) is
not correctpublic List<String> getAllClasses() throws IOException, org.json.JSONException, CredentialInvalidException
BaseParsergetAllClasses in class BaseParserIOException - Connection or parsing errororg.json.JSONException - Error with the JSON configurationCredentialInvalidExceptionpublic List<String> getAllTeachers() throws IOException, org.json.JSONException, CredentialInvalidException
BaseParsernull.getAllTeachers in class BaseParserIOException - Connection or parsing errororg.json.JSONException - Error with the JSON configurationCredentialInvalidException