Skip to content

A Java library that provides an easy way to obtain infos from Sapienza University's Infostud

License

Notifications You must be signed in to change notification settings

matypist/openstud_driver

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenStud Driver License: GPL v3

OpenStud Driver is a Java Library to obtain info from Sapienza University's Infostud 2.0.

This library is thread-safe and Android-friendly.

Getting started

Prerequisites

This application is written with JDK8 in mind. If you don't have a Java Development Kit installed you can download it from Oracle.

Compile from sources

  • 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.

Add to your project

OpenStud Driver can be easily added to your existing project through Maven or Gradle.

Maven

  1. Add the JitPack repository
<repositories>
	<repository>
	    <id>jitpack.io</id>
	    <url>https://jitpack.io</url>
	</repository>
</repositories>
  1. Add the dependency
<dependency>
    <groupId>com.github.matypist</groupId>
    <artifactId>openstud_driver</artifactId>
    <version>0.60.6</version>
</dependency>

Gradle

  1. Add it in your root build.gradle at the end of repositories:
allprojects {
    repositories {
		maven { url 'https://jitpack.io' }
	}
}
  1. Add the dependency
dependencies {
    implementation 'com.github.matypist:openstud_driver:0.60.6'
}

Functionalities

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

Examples

Logger log = Logger.getLogger("matypist.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));

Dependencies

About

A Java library that provides an easy way to obtain infos from Sapienza University's Infostud

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%