OpenStud Driver is Java Libary to obtain infos from Sapienza University's Infostud.
This library is thread-safe and Android-friendly.
This application is written with JDK8 in mind. If you don't have a Java Development Kit installed you can download it from Oracle.
git clone
or download this repo.- Open a terminal in the directory where the sources are stored.
- Execute
mvn install -DskipTests
. You will find the .jar file in the target folder.
OpenStud Driver can be easily added to your existing project through Maven or Gradle.
Maven
- Add the JitPack repository
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
- Add the dependency
<dependency>
<groupId>com.github.LithiumSR</groupId>
<artifactId>openstud_driver</artifactId>
<version>0.60.0</version>
</dependency>
Gradle
- Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
- Add the dependency
dependencies {
implementation 'com.github.LithiumSR:openstud_driver:0.60.0'
}
Authentication
- Login
- Security question and password recovery
- Passsword reset
Profile
- Student infos
- Certificates
- Photo and student card
Classroom
- Classroom and timetable
Exams
- Doable and done exams
- Active and available reservations
- Insert and delete reservations
- Pdf reservation
- Calendar events
- Course surveys (OPIS)
Taxes
- Paid and unpaid taxes
- Current ISEE and ISEE history
News
- News and newsletter events
Soon(tm)
Logger log = Logger.getLogger("lithium.openstud");
//Create an OpenStud object and sign-in
Openstud os = new OpenstudBuilder().setPassword("myPassword").setStudentID(123456).setLogger(log).build();
os.login();
//Get personal infos about a student
Student st = os.getInfoStudent();
//Get a list of exams that the student hasn't passed yet
List<ExamDoable> doable = os.getExamsDoable();
//Get a list of exams that the student passed with flying colors :)
List<ExamPassed> passed = os.getExamsPassed());
//Get a list of reservations that the student has already placed
List<ExamReservation> active = os.getActiveReservations();
//Get a list of the reservations avaiable for a particular exam
List<ExamReservation> available = os.getAvailableReservations(doable.get(0),st);
//Place a reservation for a particulare session of an exam
Pair<Integer,String> pr = os.insertReservation(available.get(0));
//Download the PDF of a particular active reservation
byte[] pdf = os.getPdf(active.get(0));
//Delete an active reservation
int result = os.deleteReservation(active.get(0));