4 releases (2 breaking)

0.3.0 Sep 11, 2024
0.2.1 Apr 22, 2018
0.2.0 Apr 21, 2018
0.1.0 Mar 17, 2018

#505 in Web programming

Download history 375/week @ 2024-09-09 23/week @ 2024-09-16 6/week @ 2024-09-23 14/week @ 2024-09-30

131 downloads per month

MIT license

35KB
764 lines

untis-rs

Library for accessing the Untis JSON-RPC API.

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.


lib.rs:

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.

Dependencies

~5–17MB
~216K SLoC