Crate untis

Source
Expand description

Library for accessing the Untis JSON-RPC API.

The core of this crate is the untis::Client struct. You can log in using untis::Client::login().

§API

This client uses the public Untis JSON-RPC API, which only has read-only, limited access.

§Examples

fn main() -> Result<(), untis::Error> {
  let results = untis::schools::search("School Name")?;
  let school = match results.first() {
    None => {
      println!("No school found");
      return Ok(());
    },
    Some(v) => v
  };

  let mut client = school.client_login("username", "password")?;

  let timetable = client.own_timetable_current_week()?;

  // profit

  Ok(())
}

For more examples, see the examples/ directory.

Modules§

jsonrpc
schools

Structs§

Class
Represents a school class.
Client
Client for accessing the Untis API. Can be constructed by Client::login() or School::client_login().
Date
Wrapper around chrono::NaiveDate for working with Untis more easily.
Department
Represents a school department.
DidItem
Holiday
A school holiday.
IdItem
Represents an element that is part of a lesson.
Lesson
A school lesson.
Room
Represents a room for school lessons.
School
A school that uses Untis.
Schoolyear
A schoolyear.
Session
A Untis session.
StatusData
A set of colors that can be used to display a timetable.
StatusDataItem
Color information to display a specific lesson.
Student
Represents a student.
Subject
Represents a school subject.
Teacher
Represents a teacher.
Time
Wrapper around chrono::NaiveDate for working with Untis more easily.

Enums§

ElementType
The different types of elements that exist in the Untis API.
Error
Represents all errors that can occur during an Untis API request.
LessonCode
Represents the status of a lesson (regular, cancelled, etc.)
LessonType
Represents the type of lesson.