Add getCurrentSchoolyear and getSchoolyears

This commit is contained in:
Timo Ley 2020-01-18 23:51:58 +01:00
parent c6562f7db3
commit 7382ac59c6
3 changed files with 31 additions and 0 deletions

View File

@ -197,5 +197,21 @@ public class UntisClient {
}
}
public Schoolyear getCurrentSchoolyear() throws APIRequestException {
try {
return client.invoke("getCurrentSchoolyear", new Object[0], Schoolyear.class);
} catch (Throwable e) {
throw new APIRequestException(e);
}
}
public SchoolyearResponse getSchoolyears() throws APIRequestException {
try {
return client.invoke("getSchoolyears", new Object[0], SchoolyearResponse.class);
} catch (Throwable e) {
throw new APIRequestException(e);
}
}
}

View File

@ -0,0 +1,8 @@
package ley.untis.data;
public class Schoolyear {
public int id;
public String name;
public int startDate;
public int endDate;
}

View File

@ -0,0 +1,7 @@
package ley.untis.data;
import java.util.ArrayList;
public class SchoolyearResponse extends ArrayList<Schoolyear> {
}