Add getCurrentSchoolyear and getSchoolyears
This commit is contained in:
parent
c6562f7db3
commit
7382ac59c6
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
package ley.untis.data;
|
||||
|
||||
public class Schoolyear {
|
||||
public int id;
|
||||
public String name;
|
||||
public int startDate;
|
||||
public int endDate;
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package ley.untis.data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class SchoolyearResponse extends ArrayList<Schoolyear> {
|
||||
|
||||
}
|
Loading…
Reference in New Issue