Skip to content

AvivHavivyan/MashovAPI

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MashovAPI

An open-source API for the Israeli Mashov school management system, written in Java. This is a replacement for the API written in Kotlin.

Installation

Installations for gradle:

// ...
repositories {
  // ...
  maven {
    url 'https://dl.bintray.com/rootatkali/facecode'
  }
}

// ...

dependencies {
  implementation 'de.faceco:MashovAPI:1.0.5-android' // For the latest version, also works in JDK environments
}

For more platforms, see the Bintray repo.

Usage

This is how to start using the API:

API api = API.getInstance();

The first step is to fetch a single school, or all of the schools:

// Single school
int schoolId = 580019;
api.fetchSchool(schoolId);

// All the schools
School[] all = api.allSchools();

After selecting a school, you need to log in:

LoginInfo loginInfo = api.login(2020, "username", "password");

After logging in, you can either read the login info or request more data, such as the grades of the student:

Grade[] grades = api.getGrades();
int gradeSum = 0;
for (Grade g : grades) {
  gradeSum += g.getGrade();
}
System.out.println(gradeSum / grades.length);

About

API for the Mashov system from Israel written in Java.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%