#api-bindings #webuntis #untis

untis

Rust library to access the webuntis jsonrpc

3 unstable releases

Uses old Rust 2015

0.2.1 Apr 22, 2018
0.2.0 Apr 21, 2018
0.1.0 Mar 17, 2018

#1641 in Data structures

Download history 1/week @ 2023-11-10 1/week @ 2023-11-17 3/week @ 2023-11-24 8/week @ 2023-12-01 1/week @ 2023-12-08 3/week @ 2023-12-15 6/week @ 2023-12-22 3/week @ 2023-12-29 1/week @ 2024-01-12 6/week @ 2024-01-19 4/week @ 2024-01-26 3/week @ 2024-02-02 5/week @ 2024-02-09 40/week @ 2024-02-16 105/week @ 2024-02-23

153 downloads per month

MIT license

21KB
568 lines

untis-rs

Rust library to access the webuntis jsonrpc

fn main() {
    let mut untis = Units::new("server", "school", "user", "password");
    let today = Local::today().naive_local();
    
    let info = untis.login().expect("Failed to login");

    let _statusdata  = untis.status_data()                      .expect("Failed to get status data" );
    let _holidays    = untis.holidays()                         .expect("Failed to get holidays"    );
    let _rooms       = untis.rooms()                            .expect("Failed to get rooms"       );
    let _classes     = untis.classes()                          .expect("Failed to get classes"     );
    let _subjects    = untis.subjects()                         .expect("Failed to get subjects"    );
    let _timetable   = untis.timetable(info.class_id, 1, today) .expect("Failed to get timetable"   );
    let _departments = untis.departments()                      .expect("Failed to get departments" );
    // teachers

    untis.logout().expect("Failed to logout");
}

Dependencies

~16–27MB
~459K SLoC