SkillAgentSearch skills...

LibrusAPI

This is Librus Rest API coded in Java for usage in mobile and web aplications

Install / Use

/learn @RegiZz/LibrusAPI
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

LibrusApi

Docs

url/login -> params: login, password

url/timetables -> params: token, from(date), to(date)

url/grades -> params: token

url/grades/getAverage/allSubjects -> params: token

url/grades/getAverage/specificSubject -> params: token, subject(string)

url/absences/{id} -> params: token, id(in url)

url/absences -> params: token

Usage/Examples

First you need to host it on server and then you can use it like in this example:

import axios from 'axios';

const handleLogin = async () => {
    try {
      const response = await axios.post('https://your-server-ip/api/librus/login', {
        login: login,
        password: password,
      });
      if (response.status === 200) {
        setToken(response.data);
        Alert.alert('Succesfully logged in');
      } else {
        Alert.alert('Login error');
      }
    } catch (error) {
      Alert.alert('Error', error.message);
    }
  };

  const getTimetable = async () => {
    if (!token) {
      Alert.alert('You must to login first!');
      return;
    }

    try {
      const response = await axios.get('https://your-server-ip/api/librus/timetables', {
        headers: {
          Authorization: `Bearer ${token}`,
        },
        params: {
            // Date examples
          from: '2024-01-01', 
          to: '2024-01-07',   
        },
      });

      if (response.status === 200) {
        setTimetable(response.data);
      } else {
        Alert.alert('Error while fetching the timetable');
      }
    } catch (error) {
      Alert.alert('Error', error.message);
    }
  };

Badges

MIT License GPLv3 License AGPL License

Authors

View on GitHub
GitHub Stars6
CategoryDevelopment
Updated1mo ago
Forks0

Languages

Java

Security Score

70/100

Audited on Feb 11, 2026

No findings